public abstract class Predicate extends Function
expressions, maxOperandsfactory, type| Constructor and Description |
|---|
Predicate()
Creates a default Predicate.
|
Predicate(java.lang.String name)
Creates a named Predicate.
|
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.Boolean |
evaluate()
Evaluates this Predicate.
|
boolean |
isConsistent()
Reports whether this Predicate is consistent.
|
boolean |
isFalseConstant()
Reports whether this Predicate is the boolean constant false.
|
Predicate |
negate()
Returns the complement of this Predicate.
|
Predicate |
normalise()
Returns this Predicate in normal form.
|
void |
rebind()
Rebinds this Predicate, so that it may be tested for satisfaction.
|
void |
rebind(java.lang.Object result)
Rebinds the unbound operands of this Predicate, so that it yields the
expected true or false result.
|
protected abstract void |
rebindFalse()
Rebinds the unbound operands of this Predicate, so that it yields false.
|
protected abstract void |
rebindTrue()
Rebinds the unbound operands of this Predicate, so that it yields true.
|
java.util.List<Predicate> |
refine()
Returns a list of refinements of this Predicate.
|
Predicate |
setType(java.lang.String type)
Sets the type of this Predicate.
|
abstract boolean |
subsumes(Predicate other)
Tests whether this Predicate subsumes the other Predicate.
|
protected boolean |
subsumesAllDisjunctsOf(Proposition other)
Tests whether this Predicate subsumes all disjuncts of the other
OR-Proposition.
|
protected boolean |
subsumesOneConjunctOf(Proposition other)
Tests whether this Predicate subsumes one conjunct of the other
AND-Proposition.
|
protected boolean |
subsumesProposition(Proposition other)
Tests whether this Predicate subsumes the other Proposition.
|
addExpression, assign, equals, getExpressions, getType, hashCode, isAssignable, isBound, nameCheck, operand, resolve, setName, toString, typeCheck, unbindgetName, isBottom, isOrderedsafeEquals, safeHashCode, semanticErrorpublic Predicate()
public Predicate(java.lang.String name)
name - the name of this Predicate.public Predicate setType(java.lang.String type)
setType in class Expressiontype - the type to set.public abstract java.lang.Boolean evaluate()
evaluate in class Expressionpublic boolean isConsistent()
public boolean isFalseConstant()
public Predicate negate()
public Predicate normalise()
public java.util.List<Predicate> refine()
public abstract boolean subsumes(Predicate other)
other - the other Predicate.protected boolean subsumesProposition(Proposition other)
other - the other Proposition.protected boolean subsumesOneConjunctOf(Proposition other)
other - an AND-Proposition.protected boolean subsumesAllDisjunctsOf(Proposition other)
other - an OR-Proposition.public void rebind()
public void rebind(java.lang.Object result)
rebind in class Expressionresult - the expected true or false result of this Predicate.protected abstract void rebindTrue()
protected abstract void rebindFalse()