|
Building Parsers with Java | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--sjm.engine.Rule
A Rule represents a logic statement that a structure is true if a following series of other structures are true.
For example,
bachelor(X) :- male(X), unmarried(X);
is a logical rule.
A rule can make a provable version of itself, a DynamicRule, that is a essentially a copy of the structures in the rule, with a new scope and with a program to consult for other rules.
| Field Summary | |
protected Structure[] |
structures
|
| Constructor Summary | |
Rule(Structure s)
Construct a one-structure rule from the given structure. |
|
Rule(Structure[] structures)
Construct rule from the given structures. |
|
| Method Summary | |
DynamicAxiom |
dynamicAxiom(AxiomSource as)
Return a provable version of this rule. |
boolean |
equals(java.lang.Object o)
Returns true if the supplied object is an equivalent rule. |
Structure |
head()
Return the first structure in this rule. |
java.lang.String |
toString()
Returns a string representation of this rule. |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected Structure[] structures
| Constructor Detail |
public Rule(Structure[] structures)
Structure[] - the structures that make up this rule.public Rule(Structure s)
Structure - the structure that makes up this rule.| Method Detail |
public DynamicAxiom dynamicAxiom(AxiomSource as)
public boolean equals(java.lang.Object o)
object - the object to comparepublic Structure head()
public java.lang.String toString()
|
by Steve Metsker | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||