Fil-C on Nix

Filnix wiki

mbrock/filnix/nanofil

frame

nanofil also configuration, config

A configuration is the whole state of a run in the model: the running frame, the suspended callers (each with how it will read its callee's result), memory, and the fuel left. A frame is one invocation: its function, its temporaries, its named locals, whether it is doomed, and its point.

  • Semantics.v: config with c_frame, c_callers, c_mem, c_fuel; frame with fr_fn, fr_env, fr_locals, fr_doomed, fr_at.

  • A frame's point is Snapshot (a variadic callee about to snapshot its arguments, an allocation), Enter (about to run block l, entered from a predecessor or none), or Exec (inside block l with instructions left, then a jump).

  • interp.pl has no such term: it is big-step, so the frame is its ctx... term and Env, the callers are Prolog's own stack, and memory and fuel are sMem, Fuel. The model makes them explicit so that Campaign 3's invariants can be stated between any two steps.

The subtlety: the proofs speak of every frame, not only the running one. The single-definition invariant holds in each waiting caller too, and a waiting caller is never doomed.

Defined in Semantics.v; see rocq.md, Decisions.