public abstract class DefaultFormulaVisitor<R> extends Object implements FormulaVisitor<R>
| Constructor and Description |
|---|
DefaultFormulaVisitor() |
| 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".
|
protected abstract R |
visitDefault(Formula f)
Method for default case, is called by all methods from this class if they are not overridden.
|
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,
Function<List<Formula>,Formula> newApplicationConstructor)
Visit an arbitrary, potentially uninterpreted function.
|
R |
visitQuantifier(BooleanFormula f,
QuantifiedFormulaManager.Quantifier q,
List<Formula> boundVariables,
BooleanFormula body)
Visit a quantified node.
|
protected abstract R visitDefault(Formula f)
f - Formula for the currently visited node.public R visitFreeVariable(Formula f, String name)
FormulaVisitorvisitFreeVariable in interface FormulaVisitor<R>f - Formula representing the variable.name - Variable name.public R visitBoundVariable(Formula f, int deBruijnIdx)
FormulaVisitorvisitBoundVariable in interface FormulaVisitor<R>f - Formula representing the variable.deBruijnIdx - de-Bruijn index of the bound variable, which can be used
to find the matching quantifier.public R visitConstant(Formula f, Object value)
FormulaVisitorvisitConstant in interface FormulaVisitor<R>f - Formula representing the constant.value - The value of the constant. It is either of type Boolean or of a subtype
of Number, in most cases a BigInteger, BigDecimal,
or Rational.public R visitFunction(Formula f, List<Formula> args, FunctionDeclaration functionDeclaration, Function<List<Formula>,Formula> newApplicationConstructor)
FormulaVisitorvisitFunction in interface FormulaVisitor<R>f - Input function.args - List of argumentsfunctionDeclaration - Function declarationnewApplicationConstructor - Construct a new function of the same type,
with the new arguments as given.public R visitQuantifier(BooleanFormula f, QuantifiedFormulaManager.Quantifier q, List<Formula> boundVariables, BooleanFormula body)
FormulaVisitorvisitQuantifier in interface FormulaVisitor<R>f - Quantifier formula.q - 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.