|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.infer.Constraint
LBJ2.infer.PropositionalConstraint
LBJ2.infer.PropositionalConstant
public class PropositionalConstant
A propositional constant is either true or
false.
| Field Summary | |
|---|---|
protected boolean |
constant
The constant value. |
static PropositionalConstant |
False
false |
static PropositionalConstant |
True
true |
| Constructor Summary | |
|---|---|
PropositionalConstant(boolean v)
Initializing constructor. |
|
| Method Summary | |
|---|---|
PropositionalConstraint |
CNF()
Produces a new, logically simplified version of this constraint in conjunctive normal form (CNF). |
void |
consolidateVariables(java.util.AbstractMap m)
Replaces all unquantified variables with the unique copy stored as a value of the given map; also instantiates all quantified variables and stores them in the given map. |
PropositionalConstraint |
DNF()
Produces a new, logically simplified version of this constraint in disjunctive normal form (DNF). |
boolean |
equals(java.lang.Object o)
Two PropositionalConstants are equivalent when their
constants are equal. |
boolean |
evaluate()
Determines whether the constraint is satisfied. |
Constraint[] |
getChildren()
Returns the children of this constraint in an array. |
int |
hashCode()
The hash code of a PropositionalConstant is the hash code
of the Boolean object formed from the constant. |
boolean |
moreGeneralThan(PropositionalConstraint c)
Compares topology to determine if this constraint is more general than the given constraint; note: this method is not required to be correct when it answers false. |
boolean |
moreSpecificThan(PropositionalAtLeast c)
Compares topology to determine if this constraint is more specific than the given at-least; note: this method is not required to be correct when it answers false. |
boolean |
moreSpecificThan(PropositionalConjunction c)
Compares topology to determine if this constraint is more specific than the given conjunction; note: this method is not required to be correct when it answers false. |
boolean |
moreSpecificThan(PropositionalConstant c)
Compares topology to determine if this constraint is more specific than the given constant; note: this method is not required to be correct when it answers false. |
boolean |
moreSpecificThan(PropositionalDisjunction c)
Compares topology to determine if this constraint is more specific than the given disjunction; note: this method is not required to be correct when it answers false. |
boolean |
moreSpecificThan(PropositionalDoubleImplication c)
Compares topology to determine if this constraint is more specific than the given double implication; note: this method is not required to be correct when it answers false. |
boolean |
moreSpecificThan(PropositionalImplication c)
Compares topology to determine if this constraint is more specific than the given implication; note: this method is not required to be correct when it answers false. |
boolean |
moreSpecificThan(PropositionalNegation c)
Compares topology to determine if this constraint is more specific than the given negation; note: this method is not required to be correct when it answers false. |
boolean |
moreSpecificThan(PropositionalVariable c)
Compares topology to determine if this constraint is more specific than the given variable; note: this method is not required to be correct when it answers false. |
PropositionalConstraint |
negate()
Produces a new propositional constraint equivalent to this constraint and that contains no negated constraints other than variables. |
void |
runVisit(Inference infer)
Calls the appropriate visit(·) method of the given
Inference for this Constraint, as per the
visitor pattern. |
PropositionalConstraint |
simplify()
Produces a new, logically simplified version of this constraint, preserving variable consolidation. |
void |
write(java.lang.StringBuffer buffer)
Creates a string respresentation of this constraint using the string representations of the objects involved. |
| Methods inherited from class LBJ2.infer.PropositionalConstraint |
|---|
clone, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final PropositionalConstant True
true
public static final PropositionalConstant False
false
protected boolean constant
| Constructor Detail |
|---|
public PropositionalConstant(boolean v)
v - The value of this constant.| Method Detail |
|---|
public void consolidateVariables(java.util.AbstractMap m)
consolidateVariables in class Constraintm - The map in which to find unique copies of the variables.public boolean evaluate()
evaluate in class Constraintpublic PropositionalConstraint simplify()
simplify in class PropositionalConstraintConstraint.consolidateVariables(java.util.AbstractMap)public PropositionalConstraint negate()
negate in class PropositionalConstraintpublic PropositionalConstraint CNF()
CNF in class PropositionalConstraintpublic PropositionalConstraint DNF()
DNF in class PropositionalConstraintpublic Constraint[] getChildren()
getChildren in class Constraintpublic boolean moreGeneralThan(PropositionalConstraint c)
false.
moreGeneralThan in class PropositionalConstraintc - The given constraint.
true if a topological analysis determined that
this constraint is more general than the given constraint.public boolean moreSpecificThan(PropositionalImplication c)
false.
moreSpecificThan in class PropositionalConstraintc - The given implication.
true if a topological analysis determined that
this constraint is more specific than the given implication.public boolean moreSpecificThan(PropositionalDoubleImplication c)
false.
moreSpecificThan in class PropositionalConstraintc - The given double implication.
true if a topological analysis determined that
this constraint is more specific than the given double
implication.public boolean moreSpecificThan(PropositionalConjunction c)
false.
moreSpecificThan in class PropositionalConstraintc - The given conjunction.
true if a topological analysis determined that
this constraint is more specific than the given conjunction.public boolean moreSpecificThan(PropositionalDisjunction c)
false.
moreSpecificThan in class PropositionalConstraintc - The given disjunction.
true if a topological analysis determined that
this constraint is more specific than the given disjunction.public boolean moreSpecificThan(PropositionalAtLeast c)
false.
moreSpecificThan in class PropositionalConstraintc - The given at-least.
true if a topological analysis determined that
this constraint is more specific than the given disjunction.public boolean moreSpecificThan(PropositionalNegation c)
false.
moreSpecificThan in class PropositionalConstraintc - The given negation.
true if a topological analysis determined that
this constraint is more specific than the given negation.public boolean moreSpecificThan(PropositionalVariable c)
false.
moreSpecificThan in class PropositionalConstraintc - The given variable.
true if a topological analysis determined that
this constraint is more specific than the given variable.public boolean moreSpecificThan(PropositionalConstant c)
false.
moreSpecificThan in class PropositionalConstraintc - The given constant.
true if a topological analysis determined that
this constraint is more specific than the given constant.public int hashCode()
PropositionalConstant is the hash code
of the Boolean object formed from the constant.
hashCode in class java.lang.ObjectPropositionalConstant.public boolean equals(java.lang.Object o)
PropositionalConstants are equivalent when their
constants are equal.
equals in class java.lang.Objecttrue iff the argument is a
PropositionalConstant set to the same value as this
constant.public void runVisit(Inference infer)
visit(·) method of the given
Inference for this Constraint, as per the
visitor pattern.
runVisit in class Constraintinfer - The inference visiting this constraint.public void write(java.lang.StringBuffer buffer)
write in class PropositionalConstraintbuffer - The output of this method will be appended to this buffer.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||