Documentation

CslibFrontier.Algorithms.WordRAM.TreeDecomposition.CSP.LeafIntro

Word-RAM leaf and introduce node handlers #

This module certifies leafNodeProg and introNodeProg (along with the private helpers introFillProg and copyBagProg). It builds in parallel with the Forget and Join handler modules.

Main definitions #

Main results #

1. Leaf node handler (leafNodeProg) #

Register arguments for the leaf node handler leafNodeProg.

  • consRawPtr : ℕ

    Base address of the serialized constraint-table array.

  • numCons : ℕ

    Number of serialized constraint tables.

  • dCur : ℕ

    Base address of the 4-word destination descriptor slot.

Instances For

    Allocate and populate the 1-entry DP table and descriptor for a leaf node.

    Memory validity, framing, NodeDescAt, and cost bound for leafNodeProg.

    2. Introduce node handler (introFillProg & introNodeProg) #

    Register arguments for the introduce node handler introNodeProg.

    • q : ℕ

      Domain size q.

    • v : ℕ

      Introduced variable label v.

    • consRawPtr : ℕ

      Base address of the serialized constraint-table array.

    • numCons : ℕ

      Number of serialized constraint tables.

    • dChild : ℕ

      Base address of the child node's 4-word descriptor slot.

    • dCur : ℕ

      Base address of the current node's 4-word descriptor slot.

    Instances For

      Materialize the bag v :: childBag, fill the expanded DP table, and write the descriptor for an introduce node.

      theorem Cslib.Algorithms.WordRAM.TreeDecomposition.introNodeProg_spec {w F_lo : ℕ} (counting : Bool) (a : IntroNodeArgs) (hq : 0 < a.q) {child : SimpleGraph.NiceTree ℕ} {cs : List (ConstraintTable a.q)} {vars : List ℕ} {s : DataStructure.Memory.State} (hwf : DataStructure.Memory.WellFormed w s) (hfit_v : WordRAM.Fits w a.v) (hcs : WordRAM.Realization.HoldsIn a.consRawPtr (List.flatMap ConstraintTable.encode cs) s) (hcs_len : cs.length = a.numCons) (hcs_hi : a.consRawPtr + (List.flatMap ConstraintTable.encode cs).length ≤ F_lo) (hchild : NodeDescAt F_lo counting a.q cs vars child a.dChild s) (hdCur : a.dCur + 4 ≤ F_lo) (hFlo : F_lo ≤ s.frontier) (hfit_peak : WordRAM.Fits w (s.frontier + ((a.v :: Lean.TreeDecomposition.bagList child).length + a.q ^ (a.v :: Lean.TreeDecomposition.bagList child).length))) :

      Memory validity, framing, NodeDescAt, and cost bound for introNodeProg.