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%
Find a file
2026-09-02 16:47:02 +00:00
assets initial 2026-09-02 16:09:42 +00:00
bin lower closure cfg and ssa to x86_64 2026-09-02 16:47:02 +00:00
bootstrap initial 2026-09-02 16:09:42 +00:00
examples add tagged heap closures and native tail calls 2026-09-02 16:47:02 +00:00
src add tagged heap closures and native tail calls 2026-09-02 16:47:02 +00:00
tests initial 2026-09-02 16:09:42 +00:00
.gitignore lower closure cfg and ssa to x86_64 2026-09-02 16:47:02 +00:00
Makefile add tagged heap closures and native tail calls 2026-09-02 16:47:02 +00:00
README.md add tagged heap closures and native tail calls 2026-09-02 16:47:02 +00:00
vm.scm initial 2026-09-02 16:09:42 +00:00

vanguard

vanguard compiling and specialising scheme in vim

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.c is 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 when unless let* and and or. this is scope based hygiene rather than textual renaming but it is not yet a complete syntax-rules or syntax-case system.
  • 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