Low-level Word-RAM subroutines and Realizes certificates (internal) #
Defines array copy/zero, argmin, minimum-cost incoming/outgoing parent selection, cycle
detection, and cycle-mask programs over Memory.Prog, together with their Realizes .exact
certificates.
Subroutines and Realizes certificates #
The tuple word encoding of the fields of encZeroArgs.
Single loop body writing 0 to dst + i.
Parameters for finding the minimum-cost active index across length n.
Word encoding of ArgMinArgs into 3 consecutive registers.
Loop state carried by argMinStep.
Single step inspecting index st.idx and updating the running minimum.
Address-fit safety precondition for one step of argMinStep.
Returns the minimum-cost active index in [0, a.n), or a.n if none is active.
Writes candidate feasibility (avw = 1 ∧ col ≠ v) and cost for column col of row v.
Address-fit safety precondition for one step of selectRowStep.
Fills candidate feasibility and cost arrays for row a.v.
Parameters for greedy parent selection across all non-root vertices at frame k.
Word encoding of SelectArgs into 4 consecutive registers.
Selects the minimum-cost active non-self outgoing parent for vertex st.v.
Safety precondition for one vertex step of selectOuterStep.
Populates frame a.k's greedy parent table and returns 1 iff all non-root vertices have an
active outgoing edge.
Parameters for checking whether vertex start lies on a directed cycle in parentBase.
Loop state carried by hasCycleStep.
Advances the parent pointer walk by one step and records if it returned to env.start.
Address-fit safety precondition for one step of hasCycleStep.
Walks a.n parent pointers from a.start and returns 1 iff a.start lies on a cycle.
Parameters for finding the smallest cycle vertex in parentBase (excluding root r).
Word encoding of FindCycleArgs into 3 consecutive registers.
Tests st.v ≠ env.r for cycle membership unless an earlier cycle vertex was already found.
Safety precondition for one vertex test in findCycleOuterStep.
Returns the least non-root vertex lying on a cycle, or a.n if the parent map is acyclic.
Word encoding of CycleMaskArgs into 4 consecutive registers.
Loop state carried by cycleMaskStep.
Address-fit safety precondition for one step of cycleMaskStep.
Walks a.n steps from a.x0, setting maskBase[v] := 1 along the cycle.
Zeros a.maskBase[0..a.n) and marks every vertex on a.x0's cycle with 1.