Class DefaultBooleanFormulaVisitor<R>
- java.lang.Object
-
- org.sosy_lab.java_smt.api.visitors.DefaultBooleanFormulaVisitor<R>
-
- Type Parameters:
R
- Return type for each traversal operation.
- All Implemented Interfaces:
BooleanFormulaVisitor<R>
public abstract class DefaultBooleanFormulaVisitor<R> extends Object implements BooleanFormulaVisitor<R>
A formula visitor which allows for the default implementation.
-
-
Constructor Summary
Constructors Constructor Description DefaultBooleanFormulaVisitor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description R
visitAnd(List<BooleanFormula> pOperands)
Visit an AND-expression with an arbitrary number of boolean arguments.R
visitAtom(BooleanFormula pAtom, FunctionDeclaration<BooleanFormula> decl)
Visit an SMT atom.R
visitBoundVar(BooleanFormula var, int deBruijnIdx)
Visit a boolean variable bound by a quantifier.R
visitConstant(boolean value)
Visit a constant with a given value.protected abstract R
visitDefault()
R
visitEquivalence(BooleanFormula pOperand1, BooleanFormula pOperand2)
Visit an equivalence between two formulas of boolean sort:operand1 = operand2
.R
visitIfThenElse(BooleanFormula pCondition, BooleanFormula pThenFormula, BooleanFormula pElseFormula)
Visit an if-then-else expression.R
visitImplication(BooleanFormula pOperand1, BooleanFormula pOperand2)
Visit an implication.R
visitNot(BooleanFormula pOperand)
Visit a NOT-expression.R
visitOr(List<BooleanFormula> pOperands)
Visit an OR-expression with an arbitrary number of boolean arguments.R
visitQuantifier(QuantifiedFormulaManager.Quantifier quantifier, BooleanFormula quantifiedAST, List<Formula> boundVars, BooleanFormula body)
Visit a quantifier: forall- or exists-.R
visitXor(BooleanFormula operand1, BooleanFormula operand2)
Visit a XOR-expression.
-
-
-
Method Detail
-
visitDefault
protected abstract R visitDefault()
-
visitConstant
public R visitConstant(boolean value)
Description copied from interface:BooleanFormulaVisitor
Visit a constant with a given value.- Specified by:
visitConstant
in interfaceBooleanFormulaVisitor<R>
- See Also:
BooleanFormulaManager.makeBoolean(boolean)
-
visitBoundVar
public R visitBoundVar(BooleanFormula var, int deBruijnIdx)
Description copied from interface:BooleanFormulaVisitor
Visit a boolean variable bound by a quantifier.- Specified by:
visitBoundVar
in interfaceBooleanFormulaVisitor<R>
-
visitAtom
public R visitAtom(BooleanFormula pAtom, FunctionDeclaration<BooleanFormula> decl)
Description copied from interface:BooleanFormulaVisitor
Visit an SMT atom. An atom can be a theory expression, constant, or a variable.This is anything with a boolean sort which is not covered by the cases above.
- Specified by:
visitAtom
in interfaceBooleanFormulaVisitor<R>
-
visitNot
public R visitNot(BooleanFormula pOperand)
Description copied from interface:BooleanFormulaVisitor
Visit a NOT-expression.- Specified by:
visitNot
in interfaceBooleanFormulaVisitor<R>
- Parameters:
pOperand
- Negated term.- See Also:
BooleanFormulaManager.not(org.sosy_lab.java_smt.api.BooleanFormula)
-
visitAnd
public R visitAnd(List<BooleanFormula> pOperands)
Description copied from interface:BooleanFormulaVisitor
Visit an AND-expression with an arbitrary number of boolean arguments.An AND-expression with zero arguments is equisatisfiable to 'TRUE'. An AND-expression with one argument is equal to the argument itself. In all other cases, default boolean logic applies.
- Specified by:
visitAnd
in interfaceBooleanFormulaVisitor<R>
- See Also:
BooleanFormulaManager.and(org.sosy_lab.java_smt.api.BooleanFormula, org.sosy_lab.java_smt.api.BooleanFormula)
-
visitOr
public R visitOr(List<BooleanFormula> pOperands)
Description copied from interface:BooleanFormulaVisitor
Visit an OR-expression with an arbitrary number of boolean arguments.An OR-expression with zero arguments is equisatisfiable to 'TRUE'. An OR-expression with one argument is equal to the argument itself. In all other cases, default boolean logic applies.
- Specified by:
visitOr
in interfaceBooleanFormulaVisitor<R>
- See Also:
BooleanFormulaManager.or(org.sosy_lab.java_smt.api.BooleanFormula, org.sosy_lab.java_smt.api.BooleanFormula)
-
visitXor
public R visitXor(BooleanFormula operand1, BooleanFormula operand2)
Description copied from interface:BooleanFormulaVisitor
Visit a XOR-expression.- Specified by:
visitXor
in interfaceBooleanFormulaVisitor<R>
- See Also:
BooleanFormulaManager.xor(org.sosy_lab.java_smt.api.BooleanFormula, org.sosy_lab.java_smt.api.BooleanFormula)
-
visitEquivalence
public R visitEquivalence(BooleanFormula pOperand1, BooleanFormula pOperand2)
Description copied from interface:BooleanFormulaVisitor
Visit an equivalence between two formulas of boolean sort:operand1 = operand2
.- Specified by:
visitEquivalence
in interfaceBooleanFormulaVisitor<R>
- See Also:
BooleanFormulaManager.equivalence(org.sosy_lab.java_smt.api.BooleanFormula, org.sosy_lab.java_smt.api.BooleanFormula)
-
visitImplication
public R visitImplication(BooleanFormula pOperand1, BooleanFormula pOperand2)
Description copied from interface:BooleanFormulaVisitor
Visit an implication.- Specified by:
visitImplication
in interfaceBooleanFormulaVisitor<R>
- See Also:
BooleanFormulaManager.implication(org.sosy_lab.java_smt.api.BooleanFormula, org.sosy_lab.java_smt.api.BooleanFormula)
-
visitIfThenElse
public R visitIfThenElse(BooleanFormula pCondition, BooleanFormula pThenFormula, BooleanFormula pElseFormula)
Description copied from interface:BooleanFormulaVisitor
Visit an if-then-else expression.- Specified by:
visitIfThenElse
in interfaceBooleanFormulaVisitor<R>
- See Also:
BooleanFormulaManager.ifThenElse(org.sosy_lab.java_smt.api.BooleanFormula, T, T)
-
visitQuantifier
public R visitQuantifier(QuantifiedFormulaManager.Quantifier quantifier, BooleanFormula quantifiedAST, List<Formula> boundVars, BooleanFormula body)
Description copied from interface:BooleanFormulaVisitor
Visit a quantifier: forall- or exists-.- Specified by:
visitQuantifier
in interfaceBooleanFormulaVisitor<R>
- Parameters:
quantifier
- Quantifier type: FORALL- or EXISTS-quantifiedAST
- AST of the quantified node. Provided because it is difficult to re-create from the parameters.boundVars
- Variables bound by this quantifier.body
- Body of the quantified expression.- See Also:
QuantifiedFormulaManager.mkQuantifier(org.sosy_lab.java_smt.api.QuantifiedFormulaManager.Quantifier, java.util.List<? extends org.sosy_lab.java_smt.api.Formula>, org.sosy_lab.java_smt.api.BooleanFormula)
,QuantifiedFormulaManager.forall(java.util.List<? extends org.sosy_lab.java_smt.api.Formula>, org.sosy_lab.java_smt.api.BooleanFormula)
,QuantifiedFormulaManager.exists(java.util.List<? extends org.sosy_lab.java_smt.api.Formula>, org.sosy_lab.java_smt.api.BooleanFormula)
-
-