pub enum Formula {
Lit(Lit),
Paren(FormulaBox),
Neg(FormulaBox),
And(FormulaList),
Or(FormulaList),
Xor(FormulaList),
Eq(FormulaList),
}
Expand description
Represents the structure of formulas of .sat
files.
Variants§
Lit(Lit)
A single literal. This is the leaf node type of sat formulas.
Paren(FormulaBox)
Represents (f)
if f
is a valid formula.
Neg(FormulaBox)
Represents -(f)
if f
is a valid formula.
This negates the result of the inner f
.
And(FormulaList)
Represents *(f_1 .. f_k)
if f_1, .., f_k
are valid formulas.
The effect is a logical and of its inner formulas.
Or(FormulaList)
Represents +(f_1 .. f_k)
if f_1, .., f_k
are valid formulas.
The effect is a logical or of its inner formulas.
Xor(FormulaList)
Represents xor(f_1 .. f_k)
if f_1, .., f_k
are valid formulas.
The effect is a logical xor of its inner formulas.
Eq(FormulaList)
Represents =(f_1 .. f_k)
if f_1, .., f_k
are valid formulas.
The effect is a logical equals of its inner formulas.
Implementations§
Source§impl Formula
impl Formula
Sourcepub fn and(params: Vec<Formula>) -> Formula
pub fn and(params: Vec<Formula>) -> Formula
Creates a logical and formula of all given formulas in param
.
Sourcepub fn or(params: Vec<Formula>) -> Formula
pub fn or(params: Vec<Formula>) -> Formula
Creates a logical or formula of all given formulas in param
.