JavaScript:Verifier: Difference between revisions

Jump to navigation Jump to search
(Add initial text describing project.)
 
 
Line 8: Line 8:
* type rules: for each primitive operation (add; subtract; fetch), a function that looks at the types of the operands and computes the type of the result --- or complains if the operation is ill-typed.
* type rules: for each primitive operation (add; subtract; fetch), a function that looks at the types of the operands and computes the type of the result --- or complains if the operation is ill-typed.
* An "abstract interpreter" for LIR that starts with the known types of the inputs and then walks the code applying the type rules for the operations in the code.
* An "abstract interpreter" for LIR that starts with the known types of the inputs and then walks the code applying the type rules for the operations in the code.
We could stage the work as follows:
 
== Stages ==
 
* Start with a trivial type system, perhaps with types "tagged value", "integer", "pointer", "float".  Ensure that we never ld the result of a float-valued LIR, etc.  This allows us to get the interpreter working on the LIR vocabulary.
* Start with a trivial type system, perhaps with types "tagged value", "integer", "pointer", "float".  Ensure that we never ld the result of a float-valued LIR, etc.  This allows us to get the interpreter working on the LIR vocabulary.
* Elaborate the type system to know about objects, shapes, pointers to floats, dense arrays, etc.
* Elaborate the type system to know about objects, shapes, pointers to floats, dense arrays, etc.
Confirmed users
496

edits

Navigation menu