|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectubc.cs.JLog.Foundation.jRuleDefinitions
public class jRuleDefinitions
This class represents an ordered collection of jRules
of the same name and arity. This is designed for statically defined
rules that cannot change during a proof.
| Field Summary | |
|---|---|
protected boolean |
builtin
|
protected String |
library
|
protected int |
rule_arity
|
protected String |
rule_name
|
protected Vector |
rules
|
| Constructor Summary | |
|---|---|
protected |
jRuleDefinitions()
Constructor for use by sub-classes which set up the members themeselves. |
|
jRuleDefinitions(String name,
int arity)
|
| Method Summary | |
|---|---|
void |
addRule(jRule fn)
Add a rule to the definitions. |
void |
addRuleFirst(jRule fn)
Add a rule to the begining of the rule definitions. |
void |
addRuleLast(jRule fn)
Add a rule to the end of the rule definitions. |
void |
clearRules()
|
void |
consult(jKnowledgeBase kb)
|
jPredicateGoal |
createGoal(jCompoundTerm t)
|
Enumeration |
enumRules()
|
int |
getArity()
Returns the arity of this instance. |
String |
getLibrary()
Get the name of the library associated with this operator. |
String |
getName()
Returns the name of this instance. |
jRule |
getRuleAt(int n)
|
boolean |
isBuiltin()
Determine if rules are builtin predicates. |
boolean |
match(iNameArity fn)
Determine if rules match the given name and arity. |
boolean |
prove(jPredicateGoal pg,
iGoalStack goals)
|
void |
removeRule(jRule fn)
Remove a rule from the rule definitions. |
boolean |
retry(jPredicateGoal pg)
|
boolean |
sameLibrary(String lib)
|
void |
setLibrary(String lib)
Set the name of the library associated with this rule definition. |
int |
size()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Vector rules
protected String rule_name
protected int rule_arity
protected String library
protected boolean builtin
| Constructor Detail |
|---|
protected jRuleDefinitions()
public jRuleDefinitions(String name,
int arity)
| Method Detail |
|---|
public String getName()
iName
getName in interface iNameString containing name of this instance.public int getArity()
iNameArity
getArity in interface iNameArityint whose value is the arity of this instance.public boolean isBuiltin()
true if these rules are builtin predicates,
false otherwise.public void setLibrary(String lib)
InvalidLibraryEntryException in this
case). The default is a null valued library.
lib - The name of the library.public String getLibrary()
null.public boolean sameLibrary(String lib)
public int size()
public jRule getRuleAt(int n)
public final boolean match(iNameArity fn)
fn - The given name and arity.
true if these rules have the same name and arity
as the given argument, false otherwise.public void addRule(jRule fn)
fn - The jRule to add.public void addRuleFirst(jRule fn)
fn - The jRule to add.public void addRuleLast(jRule fn)
fn - The jRule to add.public void removeRule(jRule fn)
fn - The jRule to remove.public void clearRules()
public Enumeration enumRules()
public jPredicateGoal createGoal(jCompoundTerm t)
public void consult(jKnowledgeBase kb)
public final boolean prove(jPredicateGoal pg,
iGoalStack goals)
public boolean retry(jPredicateGoal pg)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||