Documentation

CslibFrontier.Algorithms.WordRAM.TreeDecomposition.CSP.BagOps

Word-RAM bag inclusion and erasure routines #

This module certifies two materialized-bag subroutines used by the CSP dynamic program:

Main definitions #

Main results #

Scope subset test (subsetBagProg) and bag erasure (eraseBagProg) #

Register arguments for the linear scope-inclusion test subsetBagProg.

  • scopePtr : ℕ

    Base memory address of the constraint scope list.

  • scopeLen : ℕ

    Length of the constraint scope list.

  • bagPtr : ℕ

    Base memory address of the bag list.

  • bagLen : ℕ

    Length of the bag list.

Instances For

    Loop cursor and accumulator flag used by subsetBagProg and constraint scans.

    • cur : ℕ

      Current memory pointer in the scanned slice.

    • found : ℕ

      Boolean-in-ℕ accumulator flag (1 while all entries pass, 0 once falsified).

    Instances For

      Decide whether every element of the scope slice appears in the bag slice (1 iff true).

      Materialized bag erasure (eraseBagProg) #

      Allocate and copy a materialized bag with the first occurrence of args.target erased.

      Memory validity, framing, functional correctness, and cost bound for eraseBagProg.