Compiler and offline partial evaluator aimed at the 3 futamura projections
- Scheme 82.8%
- C 13%
- Python 2.3%
- Shell 1.2%
- Makefile 0.7%
| assets | ||
| bin | ||
| bootstrap | ||
| examples | ||
| src | ||
| tests | ||
| .gitignore | ||
| Makefile | ||
| README.md | ||
| vm.scm | ||
vanguard
its current executable slice establishes the semantic core then carries a fixed register vm through analysis specialisation residualisation and native execution
important notes
bootstrap/vg-scheme.cis a temporary evaluator used because the build environment does not provide chez racket guile or another scheme runtime. compiler passes interpreters analyses and the specialiser remain scheme. the c evaluator is not part of the compiler pipeline.- hygienic expansion currently covers the implemented surface forms
whenunlesslet*andandor. this is scope based hygiene rather than textual renaming but it is not yet a completesyntax-rulesorsyntax-casesystem. - binding time analysis currently classifies anf bindings and propagates known closures without the full interprocedural fixed point and store abstraction required by a self applicable specialiser.
- the native path lowers closure converted cfg and ssa through the system v x86_64 calling convention with tagged 64 bit values heap allocated closures and proper tail jumps for register arities.
- the generated assembly is linked by the host system linker. the emitted elf is executed and compared with both semantic oracles before the native command reports a match
todo
- implement precise copying collection driven by compiler generated stack maps
- compute binding time and effect summaries to a fixed point over recursive procedures and relevant store projections
- add polyvariant specialisation pending procedure memoisation widening most specific generalisation and homeomorphic embedding
- split compile time and residual stores without permitting opaque host values in serialised specialisation state
- rewrite the specialiser in the exact scheme subset it specialises
- derive the standalone vm compiler through the second futamura projection
- specialise a scheme in scheme interpreter then complete the reproducible native bootstrap
- derive and validate the third futamura projection against unrelated interpreters