Graded realization of memory-oracle clients #
Realization.Realizes certifies one uniform native emitter for an existing Memory.Prog
family. Arguments and results have explicit faithful finite-register encodings. Its memory
abstraction is the entire memory function together with one frontier register; scratch consists
only of fresh registers. The entry predicate and local-work charge are visible parameters.
The charged currency adds certified local computation and control work to Memory.charge.
In particular, a query-free loop cannot acquire a constant instruction bound merely because its
memory history is empty. The emitter, scratch size and exchange constant precede every runtime
argument, word width and initial memory. Refines is a semantic projection of this certificate,
not a competing execution semantics or a second client language.
Main definitions #
memoryState: the functional whole-memory/frontier abstraction.memoryCost: the memory-level charge of the client's actual deterministic history.Realizes: uniform native realization with a combined instruction currency and register frame.Realizes.SpecBounded,RealizesBounded: frontier-bounded strengthening certifyingExecBounded w (y.regs frontier)for lifting to the Resizable Word RAM.
Main results #
Realizes.Spec.consequence,Realizes.consequence: strengthen the domain or enlarge work.Realizes.exists_refines: forget the fresh-register frame to the existingRefinesAPI.RealizesBounded.toRealizes: erase the frontier-access bound back toRealizes.
The realization certificate and its grading are original infrastructure. The memory interface, free-monad interpreter and native execution rules are reused unchanged.
The abstraction retains every cell, including unallocated and inaccessible cells.
Instances For
Bounded native data supplies the memory invariant, independently of any scratch layout.
The memory-level instruction currency uses the existing deterministic interpreter. Its transition function does not depend on the word width; admissibility is a separate premise.
Instances For
Uniformity of the mathematical interpreter across widths: only valid depends on w.
The result of the memory interpreter is independent of the admissibility width.
The final memory/frontier state is independent of the admissibility width.
Admissible sequential histories split at the actual returned value and memory state.
A semantic return issues no memory operation. Its native glue is charged separately.
Memory charges add at the actual intermediate state; the local bind charge is separate.
memoryCost_bind stated with >>=, the form do blocks elaborate to.
The execution contract for specified scratch, exchange factor and emitter. Both the existential judgment and data witnesses use this same contract.
Instances For
Existing Memory.Prog clients have a fixed emitter and a combined charge. The explicit
safe predicate may contain glue domains and fit envelopes; it is never existentially chosen.
The existing valid-history premise supplies memory admissibility. The extra one pays uniform
entry/exit overhead, so the native bound is C * charged + C with one fixed C.
Input registers may alias each other. The injective scratch bank is disjoint from all inputs and
the frontier; its first l registers hold the faithfully encoded result. Every other register,
except the frontier, is framed. All native registers and memory are bounded at entry, separately
from the functional representation.
Instances For
Strengthen the visible entry domain or enlarge the local-work charge for a specified scratch size, exchange factor and emitter, all of which are unchanged.
Strengthen the visible entry domain or enlarge the local-work charge. The entry word and memory bounds may discharge fit conditions; no executable code or domain is hidden by this rule.
Existing defined-evaluation basis simulation preserves the complete realization certificate.
The same witness derives the existing semantic Refines judgment. The intermediate
representation is fixed by the functional memory abstraction and argument/result registers.
Frontier-bounded execution contract strengthening Realizes.Spec with
ExecBounded w (y.regs frontier).
Instances For
Erase the frontier-access bound from SpecBounded back to Spec.
Strengthen the visible entry domain or enlarge the local-work charge for SpecBounded.
Uniform frontier-bounded realization of a Memory.Prog family, certifying that every native
load and store accesses an address strictly below y.regs frontier.
Instances For
Erase the frontier-access bound back to Realizes.
Strengthen the visible entry domain or enlarge the local-work charge.
Transport a frontier-bounded realization certificate along a basis simulation.
Rewire a SpecBounded emitter's inputs by a fixed index map.
Pull a RealizesBounded certificate back along a fixed register-index map.
Absorb local work dominated by a constant multiple of the memory charge plus another grading.
Pointwise equal programs have the same frontier-bounded certificates.
Strengthen the visible domain under the client's own valid history.