ubc.cs.JLog.Foundation
Class jKnowledgeBase
java.lang.Object
ubc.cs.JLog.Foundation.jKnowledgeBase
public class jKnowledgeBase
- extends Object
The Prolog rule definitions database.
- Version:
- %I%, %G%
- Author:
- Glendon Holst
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
definitions
protected Hashtable definitions
jKnowledgeBase
public jKnowledgeBase()
addRuleDefinitions
public void addRuleDefinitions(jRuleDefinitions rds)
- Use this method to set all the rules for a particular predicate definition at once.
Unlike the separate
addRule methods, this method only updates the rule
definition if it does not already exist. It is an error if the definition already exists
and belongs to a different library.
- Parameters:
rds - The rule definition to add.
addRule
public void addRule(jRule r)
addRuleFirst
public void addRuleFirst(jRule r)
addRuleLast
public void addRuleLast(jRule r)
removeRule
public void removeRule(jRule r)
clearRules
public void clearRules()
enumDefinitions
public Enumeration enumDefinitions()
makeRuleDefinitionDynamic
public void makeRuleDefinitionDynamic(iNameArity r)
- Convert a set of rules matching the given name and arity to dynamic rules.
- Parameters:
r - The name and arity of the rule set to convert.
getRuleDefinitionsMatch
public jRuleDefinitions getRuleDefinitionsMatch(iNameArity r)
- Access the set of rules matching the given name and arity.
- Parameters:
r - The name and arity of the rule set to retrieve.
- Returns:
- The
jRuleDefinitions rule set, or null if it
doesn't exist.
consult
public void consult()
getKeyString
protected String getKeyString(iNameArity r)
Copyright © 2011. All Rights Reserved.