Class Predicate
java.lang.Object
liquidjava.rj_language.Predicate
- Direct Known Subclasses:
BuiltinFunctionPredicate
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a predicate with the expression truePredicate(String ref, spoon.reflect.declaration.CtElement element, ErrorEmitter e) Create a new predicate with a refinementPredicate(String ref, spoon.reflect.declaration.CtElement element, ErrorEmitter e, String prefix) Create a new predicate with a refinement and a given prefix for the classCreate a predicate with the expression true -
Method Summary
Modifier and TypeMethodDescriptionchangeAliasToRefinement(Context context, spoon.reflect.factory.Factory f) changeOldMentions(String previousName, String newName, ErrorEmitter ee) Change old mentions of previous name to the new name e.g., old(previousName) -> newNamechangeStatesToRefinements(List<GhostState> ghostState, String[] toChange, ErrorEmitter ee) clone()static PredicatecreateConjunction(Predicate c1, Predicate c2) static PredicatecreateDisjunction(Predicate c1, Predicate c2) static PredicatecreateEquals(Predicate c1, Predicate c2) static PredicatecreateInvocation(String name, Predicate... Predicates) static Predicatestatic Predicatestatic PredicatecreateOperation(Predicate c1, String op, Predicate c2) static Predicateprotected ExpressioninnerParse(String ref, ErrorEmitter e, String prefix) booleannegate()protected Expressionparse(String ref, spoon.reflect.declaration.CtElement element, ErrorEmitter e) simplify()substituteVariable(String from, String to) toString()
-
Field Details
-
exp
-
prefix
-
-
Constructor Details
-
Predicate
public Predicate()Create a predicate with the expression true -
Predicate
public Predicate(String ref, spoon.reflect.declaration.CtElement element, ErrorEmitter e) throws ParsingException Create a new predicate with a refinement- Parameters:
ref-element-e-- Throws:
ParsingException
-
Predicate
public Predicate(String ref, spoon.reflect.declaration.CtElement element, ErrorEmitter e, String prefix) throws ParsingException Create a new predicate with a refinement and a given prefix for the class- Parameters:
ref-element-e-prefix-- Throws:
ParsingException
-
Predicate
Create a predicate with the expression true
-
-
Method Details
-
parse
protected Expression parse(String ref, spoon.reflect.declaration.CtElement element, ErrorEmitter e) throws ParsingException - Throws:
ParsingException
-
innerParse
-
changeAliasToRefinement
-
negate
-
substituteVariable
-
getVariableNames
-
getStateInvocations
-
changeOldMentions
Change old mentions of previous name to the new name e.g., old(previousName) -> newName -
getOldVariableNames
-
changeStatesToRefinements
public Predicate changeStatesToRefinements(List<GhostState> ghostState, String[] toChange, ErrorEmitter ee) -
isBooleanTrue
public boolean isBooleanTrue() -
toString
-
clone
-
getExpression
-
simplify
-
createConjunction
-
createDisjunction
-
createEquals
-
createITE
-
createLit
-
createOperation
-
createVar
-
createInvocation
-