cucapra/dahlia

Separate well formedness and affine checking from typechecker

Closed this issue · 0 comments

The current typechecker is written as a single monolithic function that does simple typechecking (check operands to + are numbers etc.), affine resource tracking (memory read/writes don't conflict), and well formedness checks (let bound arrays and record literals have types).

This issue to separate these things into three distinct passes. Separating well formedness from type checking should be easier than separating affine checking.

The order of passes should be:

Parser > Well Formedness > Type Check > Affine Check > ....