public final class ExpressionLogic
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
baseFunctions |
Constructor and Description |
---|
ExpressionLogic(TheorySymbol baseTheory)
Create judgement processor.
|
Modifier and Type | Method and Description |
---|---|
static BooleanLiteral |
booleanFormula(boolean value)
Convert boolean to truth formula.
|
static Term |
booleanTerm(boolean value)
Convert boolean to constant term.
|
Formula |
deriveFormula(ValueExpression exp,
java.util.Vector<Formula> pre)
Translate a program expression to an equivalent logic formula.
|
Selector[] |
deriveSelector(Term base,
Selector sel,
java.util.Vector<Formula> pre)
Convert program selector to one or two logic selectors.
|
Term |
deriveTerm(ValueExpression exp,
java.util.Vector<Formula> pre)
Translate a program expression to an equivalent logic term.
|
static IntLiteral |
intLiteral(java.lang.String digits)
Construct integer literal.
|
Formula |
notNullFormula(Term term)
Create formula that term of object/array type is not null.
|
static Formula |
notNullFormula(Term term,
Type booleanType)
Create formula that term of object/array type is not null.
|
Formula |
nullFormula(Term term)
Create formula that term of object/array type is null.
|
static Formula |
nullFormula(Term term,
Type booleanType)
Create formula that term of object/array type is null.
|
public ExpressionLogic(TheorySymbol baseTheory)
baseTheory
- the base theorypublic Term deriveTerm(ValueExpression exp, java.util.Vector<Formula> pre)
exp
- the program expression.pre
- the vector to which to add preconditions (may be null)public Formula deriveFormula(ValueExpression exp, java.util.Vector<Formula> pre)
exp
- the program expression.pre
- the vector to which to add preconditions (may be null)public Selector[] deriveSelector(Term base, Selector sel, java.util.Vector<Formula> pre)
base
- the logic form of the base expression.sel
- the program selector.pre
- the vector to which to add preconditions (may be null)public static Term booleanTerm(boolean value)
value
- a boolean value.public static BooleanLiteral booleanFormula(boolean value)
value
- a boolean value.public static IntLiteral intLiteral(java.lang.String digits)
digits
- the digits of the literal.public Formula nullFormula(Term term)
term
- the term.public Formula notNullFormula(Term term)
term
- the term.public static Formula nullFormula(Term term, Type booleanType)
term
- the term.booleanType
- the boolean type to be used.