public abstract class RecursiveFormulaVisitor extends FormulaVisitor<Void>
Allows to traverse DAG-like formulas without an exponential explosion.
| Modifier | Constructor and Description |
|---|---|
protected |
RecursiveFormulaVisitor(FormulaManager pFmgr) |
| Modifier and Type | Method and Description |
|---|---|
Void |
visit(Formula f)
Designated entry point.
|
Void |
visitBoundVariable(Formula f,
String name,
int deBruijnIdx)
Visit a variable bound by a quantifier.
|
Void |
visitConstant(Formula f,
Object value)
Visit a constant, such as "true"/"false" or a numeric constant like "1" or "1.0".
|
Void |
visitFreeVariable(Formula f,
String name)
Visit a free variable (such as "x", "y" or "z"), not bound by a quantifier.
|
Void |
visitFunction(Formula f,
List<Formula> args,
String functionName,
Function<List<Formula>,Formula> newApplicationConstructor,
boolean isUninterpreted)
Visit an arbitrary, potentially uninterpreted function.
|
Void |
visitQuantifier(BooleanFormula f,
QuantifiedFormulaManager.Quantifier q,
BooleanFormula body,
Function<BooleanFormula,BooleanFormula> newBodyConstructor)
Visit a quantified node.
|
protected RecursiveFormulaVisitor(FormulaManager pFmgr)
public final Void visit(Formula f)
FormulaVisitorvisit in class FormulaVisitor<Void>public Void visitFreeVariable(Formula f, String name)
FormulaVisitorvisitFreeVariable in class FormulaVisitor<Void>f - Formula representing the variable.name - Variable name.public Void visitBoundVariable(Formula f, String name, int deBruijnIdx)
FormulaVisitorvisitBoundVariable in class FormulaVisitor<Void>f - Formula representing the variable.name - Variable namedeBruijnIdx - de-Bruijn index of the bound variable, which can be used
to find the matching quantifier.public Void visitConstant(Formula f, Object value)
FormulaVisitorvisitConstant in class FormulaVisitor<Void>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 Void visitFunction(Formula f, List<Formula> args, String functionName, Function<List<Formula>,Formula> newApplicationConstructor, boolean isUninterpreted)
FormulaVisitorvisitFunction in class FormulaVisitor<Void>f - Input function.args - List of argumentsfunctionName - Name of the function (such as "and" or "or")newApplicationConstructor - Construct a new function of the same type,
with the new arguments as given.isUninterpreted - Special flag for UFs.public Void visitQuantifier(BooleanFormula f, QuantifiedFormulaManager.Quantifier q, BooleanFormula body, Function<BooleanFormula,BooleanFormula> newBodyConstructor)
FormulaVisitorvisitQuantifier in class FormulaVisitor<Void>f - Quantifierq - Quantifier type: either FORALL or EXISTS.body - Body of the quantifier.newBodyConstructor - Constructor to replace a quantified body.