public class Atomic extends Predicate
expressions, maxOperands
factory, type
Constructor and Description |
---|
Atomic()
Creates a default Atomic predicate.
|
Atomic(boolean value)
Creates an Atomic predicate standing for a boolean constant value.
|
Atomic(Parameter parameter)
Creates an Atomic predicate by wrapping a Parameter.
|
Modifier and Type | Method and Description |
---|---|
Atomic |
addExpression(Expression expression)
Adds an expression as an operand to this Assignment expression.
|
java.lang.Boolean |
evaluate()
Evaluates this Atomic predicate.
|
boolean |
isFalseConstant()
Returns true if this Atomic predicate wraps the boolean Constant false.
|
boolean |
isTrueConstant()
Returns true if this Atomic predicate wraps the boolean Constant true.
|
protected void |
nameCheck()
Checks the name of an Atomic predicate and sets the number of
operands.
|
Predicate |
negate()
Negates this Atomic predicate.
|
protected void |
rebindFalse()
Rebinds this Atomic predicate so that it yields false.
|
protected void |
rebindTrue()
Rebinds this Atomic predicate so that it yields true.
|
boolean |
subsumes(Predicate other)
Tests whether this Atomic predicate subsumes the other Predicate.
|
java.lang.String |
toString()
Converts this Atomic predicate to a printable string.
|
protected void |
typeCheck()
Checks the type of this Atomic predicate.
|
isConsistent, normalise, rebind, rebind, refine, setType, subsumesAllDisjunctsOf, subsumesOneConjunctOf, subsumesProposition
assign, equals, getExpressions, getType, hashCode, isAssignable, isBound, operand, resolve, setName, unbind
getName, isBottom, isOrdered
safeEquals, safeHashCode, semanticError
public Atomic()
public Atomic(Parameter parameter)
parameter
- the parameter to wrap.public Atomic(boolean value)
value
- the constant true or false.protected void nameCheck() throws SemanticError
nameCheck
in class Function
SemanticError
- if the name is illegal.protected void typeCheck() throws SemanticError
typeCheck
in class Function
SemanticError
- if a type inconsistency is detected.public Atomic addExpression(Expression expression)
addExpression
in class Function
expression
- the operand expression.public Predicate negate()
public boolean isTrueConstant()
public boolean isFalseConstant()
isFalseConstant
in class Predicate
public java.lang.Boolean evaluate()
public boolean subsumes(Predicate other)
protected void rebindTrue()
rebindTrue
in class Predicate
protected void rebindFalse()
rebindFalse
in class Predicate