Core Chu–Liu/Edmonds phase programs and Realizes certificates (internal) #
Defines bestEntryProg, bestExitProg, contractTablesProg, expandLevelProg, and
edmondsCoreProg over Memory.Prog, together with their Realizes .exact certificates.
Parameters for scanning arcs entering a cycle from non-cycle vertex u.
- n : ℕ
Matrix dimension (number of vertices).
- u : ℕ
Source non-cycle vertex index
u. - adjBase : ℕ
- costBase : ℕ
- maskBase : ℕ
Base address of the
n-word0/1cycle-membership mask. - predOut : ℕ
Output base address for candidate feasibility indicators (
nwords). - costOut : ℕ
Output base address for candidate signed costs (
nwords).
Writes candidate feasibility (inY = 1 ∧ auy = 1) and cost for target y from env.u.
Address-fit safety precondition for one step of bestEntryRowStep.
Fills candidate entry feasibility and cost arrays for source vertex a.u.
Computes and stores the best cycle-entry vertex bEntry[u] into frame env.k.
Safety precondition for one source vertex in bestEntryOuterStep.
Parameters for scanning arcs exiting a cycle toward column col with reduced costs.
- n : ℕ
Matrix dimension (number of vertices).
- col : ℕ
Target column index
col. - adjBase : ℕ
- costBase : ℕ
- maskBase : ℕ
Base address of the
n-word0/1cycle-membership mask. - parentBase : ℕ
Base address of the
n-word selected cycle-parent array. - predOut : ℕ
Output base address for candidate feasibility indicators (
nwords). - costOut : ℕ
Output base address for candidate signed reduced costs (
nwords).
Writes candidate exit feasibility and reduced cost c[x][col] - c[x][f[x]] at row x.
Address- and arithmetic-fit safety precondition for one step of bestExitRowStep.
Fills candidate exit feasibility and reduced cost arrays for target column a.col.
Computes and stores the best cycle-exit vertex bExit[col] into frame env.k.
Safety precondition for one target column in bestExitOuterStep.
Writes contracted adjacency bit (u, col) into nextAdjBase.
Writes contracted signed cost (u, col) into nextCostBase using reduced exit costs.
Address- and arithmetic-fit safety precondition for one contracted cell (u, col).
Contracts one cell (env.u, col) in cost then adjacency order.
Contracts row a.u across all columns into nextAdjBase/nextCostBase.
Contracts row u across all columns into nextAdjBase/nextCostBase.
Safety precondition for contracting row u in contractOuterStep.
Builds contracted adjacency and reduced-cost tables in nextAdjBase/nextCostBase.
Builds contracted tables and copies them back into curAdjBase/curCostBase.
Computes the expanded parent for vertex v and writes it to nextParentBase.
Address-fit safety precondition for expanding vertex v in expandRowStep.
Expands all a.n parent entries at level a.k into nextParentBase.
Uncontracts stack frame a.k, updating curParentBase with the expanded parent array.
Safety precondition for uncontracting stack frame a.k in expandLevelProg.
Forward contraction loop state (status: 0 active, 1 acyclic feasible, 2 infeasible).
Performs one full contraction round at frame a.k around cycle vertex a.x0.
Safety precondition for one full contraction round contractRoundBodyProg.
Executes one step of the forward contraction pass (noop once st.status ≠ 0).
Safety precondition for one forward contraction iteration in forwardStep.
Runs up to a.n forward contraction rounds from an initialized workspace.
Expands stack frame env.depth - (j + 1) at backward step j.
Safety precondition for one backward expansion iteration in backwardStep.
Expands all a.depth contracted frames back into curParentBase.
Full in-workspace Chu–Liu/Edmonds solver: forward contraction followed by backward cycle
expansion, returning 1 iff feasible.