Literate Racket combining mit.tex and src/spec.py, which contains a complete data description that can be turned into YAML for easy parsing. It's not a general-purpose VM description DSL, but should contain:
Types (really only 1 for 0.1 VM)
Registers
Stack (including frame stack and error handling)
Memory
Primitive operations (like pForth's primitives) that "everyone knows the meaning of" to describe the semantics of the instructions (logic, arithmetic, memory access etc.)
Execution cycle
With this it should be possible to:
run the description as an interpreter, so it can pass the test suite.
Ideally, generate all C stack/frame code from it, including stack effects of all extra instructions.
Literate Racket combining
mit.tex
andsrc/spec.py
, which contains a complete data description that can be turned into YAML for easy parsing. It's not a general-purpose VM description DSL, but should contain:With this it should be possible to: