public interface BooleanFormulaManager
| Modifier and Type | Method and Description |
|---|---|
BooleanFormula |
and(BooleanFormula bits1,
BooleanFormula bits2)
Creates a formula representing an AND of the two arguments.
|
BooleanFormula |
and(Collection<BooleanFormula> bits) |
BooleanFormula |
equivalence(BooleanFormula formula1,
BooleanFormula formula2)
Creates a formula representing an equivalence of the two arguments.
|
<T extends Formula> |
ifThenElse(BooleanFormula cond,
T f1,
T f2)
Creates a formula representing
IF cond THEN f1 ELSE f2 |
BooleanFormula |
implication(BooleanFormula formula1,
BooleanFormula formula2) |
boolean |
isFalse(BooleanFormula formula)
Check, if the formula is the formula "FALSE".
|
boolean |
isTrue(BooleanFormula formula)
Check, if the formula is the formula "TRUE".
|
BooleanFormula |
makeBoolean(boolean value)
Returns a
BooleanFormula representing the given value. |
BooleanFormula |
makeVariable(String pVar) |
BooleanFormula |
not(BooleanFormula bits)
Creates a formula representing a negation of the argument.
|
BooleanFormula |
or(BooleanFormula bits1,
BooleanFormula bits2)
Creates a formula representing an OR of the two arguments.
|
BooleanFormula |
or(Collection<BooleanFormula> bits) |
<R> R |
visit(BooleanFormulaVisitor<R> visitor,
BooleanFormula formula)
Visit the formula with the given visitor.
|
void |
visitRecursively(BooleanFormulaVisitor<TraversalProcess> rFormulaVisitor,
BooleanFormula f)
Visit the formula recursively with a given
BooleanFormulaVisitor. |
BooleanFormula |
xor(BooleanFormula bits1,
BooleanFormula bits2)
Creates a formula representing XOR of the two arguments.
|
BooleanFormula makeBoolean(boolean value)
BooleanFormula representing the given value.value - the boolean value the returned Formula should representBooleanFormula makeVariable(String pVar)
BooleanFormula equivalence(BooleanFormula formula1, BooleanFormula formula2)
formula1 - a Formulaformula2 - a Formulaformula1 <-> formula2BooleanFormula implication(BooleanFormula formula1, BooleanFormula formula2)
formula1 => formula2.boolean isTrue(BooleanFormula formula)
boolean isFalse(BooleanFormula formula)
<T extends Formula> T ifThenElse(BooleanFormula cond, T f1, T f2)
IF cond THEN f1 ELSE f2cond - a Formulaf1 - a Formulaf2 - a FormulaBooleanFormula not(BooleanFormula bits)
bits - a Formula!bitsBooleanFormula and(BooleanFormula bits1, BooleanFormula bits2)
bits1 - a Formulabits2 - a Formulabits1 & bits2BooleanFormula and(Collection<BooleanFormula> bits)
BooleanFormula or(BooleanFormula bits1, BooleanFormula bits2)
bits1 - a Formulabits2 - a Formulabits1 | bits2BooleanFormula or(Collection<BooleanFormula> bits)
BooleanFormula xor(BooleanFormula bits1, BooleanFormula bits2)
<R> R visit(BooleanFormulaVisitor<R> visitor, BooleanFormula formula)
void visitRecursively(BooleanFormulaVisitor<TraversalProcess> rFormulaVisitor, BooleanFormula f)
BooleanFormulaVisitor.
This method guarantees that the traversal is done iteratively, without using Java recursion, and thus is not prone to StackOverflowErrors.
Furthermore, this method also guarantees that every equal part of the formula is visited only once. Thus it can be used to traverse DAG-like formulas efficiently.