Executable runs without a prescribed step limit #
Ram.runUntil repeatedly uses the existing machine transition until halt, fault
or an invalid program counter. It retains the same exact transition count and
stopping reasons as Ram.run, without requesting an operational budget.
The implementation uses Lean's partial_fixpoint: it is executable and has
proved unfolding equations. A divergent execution keeps running; the logical
value none represents the least fixed point, not a runtime report detecting
divergence. Every returned some is related to a finite bounded run below.
Correctness proofs can instead supply a terminating Ram.Exec directly.
Tail-recursive execution using the existing successor and status functions.
count records transitions already performed. No step limit is selected.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A backend-independent executable runner without an operational step limit.
Equations
- Ram.Runner.runUntilWith next status s = Ram.Runner.loopUntil next status 0 s
Instances For
Any bounded run that actually stops is the result of the unbounded runner.
A returned result has a finite execution witness. This direction uses the least-fixed-point induction principle, not an assumed termination argument.
The unbounded and bounded drivers agree on all finite outcomes, including faults and invalid program counters. Neither reports divergence as a fault.
Execute actual machine transitions until the machine stops. Divergent
programs keep running; the logical none is not a computable divergence test.
Equations
- Ram.runUntil code s = Ram.Runner.runUntilWith (Ram.step code) Ram.State.status s
Instances For
A terminating execution gives the executable result and exact count, without requiring the user to propose an instruction budget.
Returned outcomes have an actual transition trace and the reported terminal
condition; the unbounded runner cannot return outOfFuel.
A successful unbounded run is exactly a finite halted machine execution, with the same final state and exact transition count in both directions.