Finite configurations for RAM simulation #
A configuration stores a finite register tuple, a natural control label, an explicit default value, and a distinct-key sparse memory. Its denotation is a generic RAM state. Denotation need not be injective: recording a default-valued cell and omitting that cell have the same semantics.
Dispatch walks a fixed finite program, comparing the current label with fixed instruction positions. Successor labels are fixed by those positions. This decomposition supports a native machine for each fixed program without requiring a uniform interpreter for encoded programs.
Main definitions #
FiniteState: finite configurations with a uniform, explicitly supplied memory default.FiniteState.step: one finite-state step, including every generic RAM check and fault.
Main results #
FiniteState.denote_step: exact one-step refinement, including continuation, halt and fault.
References #
Uses the generic RAM semantics and Mathlib's association-list memory representation.
Finite data from which a total RAM state is interpreted.
Interpret sparse memory using the supplied default. This map is not required to be injective.
Replace one register, preserving control and memory.
Replace one memory binding, preserving control, registers and the default.
Validate an existing value before moving it into a register.
Finite execution of a fixed data instruction. Checked producers include admissibility.
Moving a value commutes with interpretation, including invalid moves.
Finite data execution has exactly the generic data semantics, including failure.
The three finite outcomes use ordinary option and sum encodings.
Check the continuation label before returning the updated configuration.
Execute a fixed instruction with a fixed ordinary successor label.
Search fixed instruction positions. The successor is fixed at the matching position.
A finite-state step checks the current label before fixed-program dispatch.
Dispatch agrees with indexed lookup wherever the current label is at or above the offset.
Exact one-step refinement for arbitrary finite configurations, including all faults. No validity premise on the memory default or the initial registers is hidden in the theorem.