class TransformToCnf extends CnfBuilder
Plaisted transformation: used for conversion of a propositional formula into conjunctive normal form (CNF) (input format for SAT solver). A simple conversion into CNF via Shannon expansion would also be possible but it's worst-case complexity is exponential (in the number of variables) and thus even simple problems could become untractable. The Plaisted transformation results in an _equisatisfiable_ CNF-formula (it generates auxiliary variables) but runs with linear complexity. The common known Tseitin transformation uses bi-implication, whereas the Plaisted transformation uses implication only, thus the resulting CNF formula has (on average) only half of the clauses of a Tseitin transformation. The Plaisted transformation uses the polarities of sub-expressions to figure out which part of the bi-implication can be omitted. However, if all sub-expressions have positive polarity (e.g., after transformation into negation normal form) then the conversion is rather simple and the pseudo-normalization via NNF increases chances only one side of the bi-implication is needed.
- Source
- Solving.scala
- Alphabetic
- By Inheritance
- TransformToCnf
- CnfBuilder
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new TransformToCnf(symbolMapping: SymbolMapping)
Value Members
-
def
addClauseProcessed(clause: Clause): Unit
- Definition Classes
- CnfBuilder
- def apply(p: CNF.Prop): Solvable
-
def
buildCnf: Array[Clause]
- Definition Classes
- CnfBuilder
-
def
constFalse: Lit
- Definition Classes
- CnfBuilder
-
lazy val
constTrue: Lit
- Definition Classes
- CnfBuilder
- def convertSym(sym: CNF.Sym): Lit
-
def
isConst(l: Lit): Boolean
- Definition Classes
- CnfBuilder
-
var
literalCount: Int
- Definition Classes
- TransformToCnf → CnfBuilder
-
def
newLiteral(): Lit
- returns
new Tseitin variable
- Definition Classes
- CnfBuilder
The Scala compiler and reflection APIs.