interpreter
nanofil
The interpreter is interp.pl, nanofil's executable meaning of the IR: a relation from a module, a function, arguments and fuel to an outcome, with CLP(Z) integers so that it runs in every direction. The Rocq model transcribes it, and the outcome gate checks that the two agree on every run line of the corpus.
Entry points:
interp:run/5, orinterp:module_prepared/2once andinterp:run_prepared/5many times. The tests also compare it with the native code nanofil and clang emit (difftest, progtest).Rocq: Semantics.v transcribes its steps, small-step where interp.pl is big-step; Run.v's
Driver InterpRuntime(Driver,InterpRuntime) runs them with the interpreter's allocator and free. "The interpreter's runtime" meansInterpRuntime, which proves every runtime axiom.
The subtlety: it is the deterministic explicit-free subset, not a GC simulator: no reclamation, no concurrent or signal-handler frees, no free singleton. It has been both more permissive than native (an object past 2^64, now refused) and stricter (a freed snapshot's renew, now a trap); each was fixed toward native.
See guide.md, 13. Running it and interp.pl's header.
Linked from
- Buffer.v: interp_buffer_never_panics
- Chain.v: interp_access_checked
- Doomed.v: interp_doomed_checked
- Guard.v: interp_guard_checked
- Renew.v: interp_reuse_checked
- Run.v: data_base
- Runtime.v: InterpRuntime
- Runtime.v: lifetime_step
- Semantics.v: outcome
- Soundness.v: interp_valid_no_unchecked
- Soundness.v: unchecked_op
- asm_fixed
- campaign
- pizlonate
- Cycle.v
- Extract.v
- Sum.v