R - Desired return type.public interface FormulaVisitor<R>
FormulaManager.visit(org.sosy_lab.java_smt.api.Formula, org.sosy_lab.java_smt.api.visitors.FormulaVisitor<R>) for visiting formulas.| Modifier and Type | Method and Description |
|---|---|
R |
visitBoundVariable(Formula f,
int deBruijnIdx)
Visit a variable bound by a quantifier.
|
R |
visitConstant(Formula f,
Object value)
Visit a constant, such as "true"/"false" or a numeric constant like "1" or "1.0".
|
R |
visitFreeVariable(Formula f,
String name)
Visit a free variable (such as "x", "y" or "z"), not bound by a quantifier.
|
R |
visitFunction(Formula f,
List<Formula> args,
FunctionDeclaration<?> functionDeclaration)
Visit an arbitrary, potentially uninterpreted function.
|
R |
visitQuantifier(BooleanFormula f,
QuantifiedFormulaManager.Quantifier quantifier,
List<Formula> boundVariables,
BooleanFormula body)
Visit a quantified node.
|
R visitFreeVariable(Formula f, String name)
f - Formula representing the variable.name - Variable name.R visitBoundVariable(Formula f, int deBruijnIdx)
f - Formula representing the variable.deBruijnIdx - de-Bruijn index of the bound variable, which can be used to find the
matching quantifier.R visitConstant(Formula f, Object value)
f - Formula representing the constant.value - The value of the constant. It is either of type Boolean or of a subtype of
Number, mostly a BigInteger, a BigDecimal, or a Rational.R visitFunction(Formula f, List<Formula> args, FunctionDeclaration<?> functionDeclaration)
f - Input function.args - List of argumentsfunctionDeclaration - Function declaration. Can be given to FormulaManager.makeApplication(org.sosy_lab.java_smt.api.FunctionDeclaration<T>, java.util.List<? extends org.sosy_lab.java_smt.api.Formula>) to construct a new instance of the same function with
different arguments.R visitQuantifier(BooleanFormula f, QuantifiedFormulaManager.Quantifier quantifier, List<Formula> boundVariables, BooleanFormula body)
f - Quantifier formula.quantifier - Quantifier type: either FORALL or EXISTS.boundVariables - Variables bound by the quantifier. NOTE: not all solvers hold
metadata about bound variables. In case this is not available, this method will be called
with an empty list, yet mkQuantifier will work fine with an empty list as well.body - Body of the quantifier.