Documentation

CslibFrontier.Algorithms.WordRAM.LRAT.Scan

An LRAT checker on the word RAM: scanning a hinted clause #

The literal loop of the word-RAM LRAT checker (Cslib.Algorithms.WordRAM.LRAT.litLoop) scans a hinted clause for the literals that are not false. This file states what it computes as a fold over the clause (Cslib.Algorithms.WordRAM.LRAT.scanLits), relates the fold to the filter that Cslib.Logic.PL.CNF.propagateHints takes, and proves that the loop computes the fold.

The fold of the literal loop #

The state of the literal loop, held in the registers has, unit and bad.

  • found : Bool

    Whether a literal that is not false has been found.

  • code : ℕ

    The code of the first such literal.

  • conflict : Bool

    Whether two different such literals have been found.

Instances For

    The state of the literal loop after a literal: a false literal is skipped; the first non-false literal is recorded; a later one different from it sets conflict.

    The state of the literal loop after a clause.

    The abstract state of the scan after the non-false literals f.

    theorem Cslib.Algorithms.WordRAM.LRAT.scanLits_eq (F : Logic.PL.Literal ℕ → Bool) (ls : List (Logic.PL.Literal ℕ)) :
    scanLits F { found := false, code := 0, conflict := false } ls = scanOf (List.filter (fun (l : Logic.PL.Literal ℕ) => !F l) ls)

    The fold computes the filter. Scanning a clause from the initial state gives the abstract state of its non-false literals.

    The literal loop #

    The literal loop computes the fold scanLits F of the clause at lptr, where F l says that the cell of the complement of l holds the stamp, and leaves memory unchanged.