public interface UnsafeFormulaManager
| Modifier and Type | Method and Description |
|---|---|
List<Formula> |
getAllArgs(Formula f) |
Formula |
getArg(Formula f,
int n) |
int |
getArity(Formula f) |
String |
getName(Formula f)
Returns the name of the formula (or function)
|
BooleanFormula |
getQuantifiedBody(Formula pQuantifiedFormula)
Get the body of the given, quantified, formula.
|
boolean |
isAtom(Formula f)
Deprecated.
Use the
visit(FormulaVisitor, Formula) instead. |
boolean |
isBoundVariable(Formula f) |
boolean |
isFreeVariable(Formula f) |
boolean |
isNumber(Formula pTt) |
boolean |
isQuantification(Formula f)
Deprecated.
Use
visit(FormulaVisitor, Formula) instead. |
boolean |
isUF(Formula f) |
boolean |
isVariable(Formula f) |
<T extends Formula> |
replaceArgs(T f,
List<Formula> args)
Replaces the arguments of the given formula
|
<T extends Formula> |
replaceArgsAndName(T f,
String newName,
List<Formula> args)
Replaces the name and the arguments of the given formula.
|
BooleanFormula |
replaceQuantifiedBody(BooleanFormula pF,
BooleanFormula pNewBody)
Replace the body of a quantified formula.
|
<T extends Formula> |
splitNumeralEqualityIfPossible(T f)
If the given formula is a numeral (i.e., non-boolean) equality "x = y",
return a list
x<=y, x>=y. |
Formula |
substitute(Formula f,
Map<Formula,Formula> fromToMapping)
Substitute every occurrence of any item from
changeFrom
in formula f to the corresponding occurrence from changeTo. |
<R> R |
visit(FormulaVisitor<R> visitor,
Formula f) |
int getArity(Formula f)
Formula getArg(Formula f, int n)
List<Formula> getAllArgs(Formula f)
@Deprecated boolean isAtom(Formula f)
visit(FormulaVisitor, Formula) instead.boolean isVariable(Formula f)
boolean isFreeVariable(Formula f)
boolean isBoundVariable(Formula f)
boolean isNumber(Formula pTt)
boolean isUF(Formula f)
@Deprecated boolean isQuantification(Formula f)
visit(FormulaVisitor, Formula) instead.BooleanFormula getQuantifiedBody(Formula pQuantifiedFormula)
Precondition: isQuantification(Formula) returns true for this formula.
BooleanFormula replaceQuantifiedBody(BooleanFormula pF, BooleanFormula pNewBody)
Precondition: isQuantification(Formula) returns true for the first parameter.
<T extends Formula> T replaceArgsAndName(T f, String newName, List<Formula> args)
<T extends Formula> T replaceArgs(T f, List<Formula> args)
<T extends Formula> List<T> splitNumeralEqualityIfPossible(T f)
x<=y, x>=y.
Otherwise, return the unchanged formula. Note: 1) Returned list always has one or two elements. 2) Conjunction over the returned list is equivalent to the input formula.
Formula substitute(Formula f, Map<Formula,Formula> fromToMapping)
changeFrom
in formula f to the corresponding occurrence from changeTo.
E.g. if changeFrom contains a variable a and
changeTo contains a variable b all occurrences of a
will be changed to b in the returned formula.
f - Formula to change.fromToMapping - Mapping of old and new formula parts.<R> R visit(FormulaVisitor<R> visitor, Formula f)