Node descriptor framing invariants and generic DP table-fill lemma #
This module provides the shared node-descriptor machinery used across all three parallel node
handler modules (LeafIntro, Forget, and Join) as well as NodeStep/Pass:
writeDescProg: writes a 4-word node descriptor[bagPtr, bagLen, tblPtr, tblLen].FrameOutsideRange: framing invariant preserving all previously allocated words outside a single descriptor slice[lo, hi).NodeDescAt: semantic invariant tying a 4-word descriptor slot tobagList SanddpInstTree counting q cs vars S.tableFillProg_spec: generic indexed loop specification used byintroFillProg,forgetFillProg, andjoinFillProg.
Main definitions #
Cslib.Algorithms.WordRAM.TreeDecomposition.DescWriteArgs: arguments forwriteDescProg.Cslib.Algorithms.WordRAM.TreeDecomposition.writeDescProg: 4-word node descriptor writer.Cslib.Algorithms.WordRAM.TreeDecomposition.NodeDescAt: descriptor-slot invariant for a subtree.
Main results #
Cslib.Algorithms.WordRAM.TreeDecomposition.writeDescProg_spec,Cslib.Algorithms.WordRAM.TreeDecomposition.writeDescProg_realizes: correctness and realization ofwriteDescProg.Cslib.Algorithms.WordRAM.TreeDecomposition.NodeDescAt.frame,Cslib.Algorithms.WordRAM.TreeDecomposition.NodeDescAt.mono_frontier: descriptor framing lemmas.Cslib.Algorithms.WordRAM.TreeDecomposition.tableFillProg_spec: shared DP table-fill lemma.
Descriptor writes, framing invariants, and the four nice-tree node handlers #
Register arguments for the 4-word node descriptor writer writeDescProg.
- dCur : ℕ
Base address of the 4-word descriptor slot for the current tree node.
- bagPtr : ℕ
Base address of the materialized bag slice.
- bagLen : ℕ
Length of the materialized bag slice.
- tblPtr : ℕ
Base address of the DP table slice.
- tblLen : ℕ
Length of the DP table slice (
q ^ bagLen).
Instances For
Tuple equivalence encoding DescWriteArgs into Word-RAM registers.
Write the 4-word descriptor [bagPtr, bagLen, tblPtr, tblLen] at a.dCur.
Memory validity, descriptor storage, and range-framing spec for writeDescProg.
Exact-basis Word-RAM realization certificate for writeDescProg.
Invariant asserting that descriptor slot [d, d + 4) in memory s correctly references
the materialized bag and DP table of subtree S, both allocated at or above F_lo.
Descriptor slot lies strictly below the dynamic allocation threshold
F_lo.Materialized bag pointer lies at or above
F_lo.Stored bag length equals
(bagList S).length.Materialized bag slice agrees with
bagList S.Materialized DP table pointer lies at or above
F_lo.Stored DP table length equals
q ^ (bagList S).length.Materialized DP table slice agrees with
dpInstTree counting q cs vars S.
Frame NodeDescAt across writes strictly restricted to [lo, hi) (with hi ≤ F_lo).
Lift NodeDescAt monotonically across frontier-preserving allocations/writes.
Generic invariant-preserving loop specification for filling a contiguous DP table slice
[tblPtr, tblPtr + tblLen) in index order 0, 1, ..., tblLen - 1.