• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
        • Ipasir$a
        • Building-an-ipasir-solver-library
        • Ipasir-formula
          • Ipasir-set-mux
          • Ipasir-cancel-new-clause
          • Ipasir-cancel-assumption
          • Ipasir-set-xor
          • Ipasir-set-and
          • Ipasir-set-iff
          • Ipasir-add-binary
          • Ipasir-add-4ary
          • Ipasir-set-or
          • Ipasir-add-ternary
          • Ipasir-set-buf
          • Ipasir-add-unary
          • Ipasir-add-clauses
          • Ipasir-add-list
          • Ipasir-add-clauses-ordered
          • Ipasir-add-list-ordered
          • Ipasir-add-empty
        • Ipasir-bump-activity-vars$a
        • Ipasir-set$a
        • Ipasir-bump-activity-vars$c
        • Ipasir-get$a
        • Ipasir-set-limit$c
        • Ipasir-failed$c
        • Ipasir-assume$c
        • Ipasir-add-lit$c
        • Ipasir-val$c
        • Ipasir-set$c
        • With-local-ipasir
        • Ipasir-solve$c
        • Ipasir-init$c
        • Ipasir-finalize-clause$c
        • Ipasir-some-history$c
        • Ipasir-solved-assumption$c
        • Ipasir-release$c
        • Ipasir-reinit$c
        • Ipasir-input$c
        • Ipasir-get$c
        • Ipasir-get-status$c
        • Ipasir-get-curr-stats$c
        • Ipasir-get-assumption$c
        • Ipasir-empty-new-clause$c
        • Ipasir-callback-count$c
        • Ipasir-val
        • Ipasir-solve
        • Ipasir-set-limit
        • Ipasir-reinit
        • Ipasir-failed
        • Ipasir-callback-count
        • Ipasir-release
        • Ipasir-input
        • Ipasir-init
        • Ipasir-finalize-clause
        • Ipasir-assume
        • Ipasir-add-lit
      • Aignet
      • Aig
      • Satlink
      • Truth
      • Ubdds
      • Bdd
      • Faig
      • Bed
      • 4v
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Ipasir

Ipasir-formula

Tools for constructing the ipasir formula.

We provide several helper functions for constructing formulas:

  • ipasir-add-*ary add a fixed-length clause to the formula
  • ipasir-add-list adds a clause from a list to the formula
  • ipasir-set-* add clauses restricting the literal out to be assigned the given logical function of the other input literals

These all have a guard saying that the current new-clause of the ipasir stobj must be empty, and they preserve this property unconditionally.

Subtopics

Ipasir-set-mux
Add clauses restricting out to be (if test then else).
Ipasir-cancel-new-clause
Identity function in execution; in the logic, ensures that the new-clause field of the ipasir is empty, which it must be by the guard.
Ipasir-cancel-assumption
Identity function in execution; in the logic, ensures that the assumption field of the ipasir is empty, which it must be by the guard.
Ipasir-set-xor
Add clauses restricting out to be the XOR of in1 and in2.
Ipasir-set-and
Add clauses restricting out to be the AND of in1 and in2.
Ipasir-set-iff
Add clauses restricting out to be the IFF of in1 and in2.
Ipasir-add-binary
Add a binary clause to the formula
Ipasir-add-4ary
Add a 4-literal clause to the formula
Ipasir-set-or
Add clauses restricting out to be the OR of in1 and in2.
Ipasir-add-ternary
Add a ternary clause to the formula
Ipasir-set-buf
Add clauses restricting out to have the same value as in.
Ipasir-add-unary
Add a unary clause to the formula, permanently restricting the given literal to be true.
Ipasir-add-clauses
Add a list of clauses to the formula
Ipasir-add-list
Add a clause (given as a list of literals) to the formula
Ipasir-add-clauses-ordered
Add a list of clauses to the formula
Ipasir-add-list-ordered
Add a clause (given as a list of literals) to the formula
Ipasir-add-empty
Add an empty clause. Likely useless because the solver is then unsat forever.