All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface JavaAgent.resource.cdl.KnowledgeBase

public interface KnowledgeBase
A KnowledgeBase is a set of KRSentences. A KnowledgeBase, like a KRSentence, does not enforce much functionality. The idea is rather that if a function can be defined for Class implementing a KnowledgeBase then the function name and order of parameters can be assumed as described below. This allows other classes to test for the existence of these functions and assume that they are not implemented if it cannot find them. Thus, here is the intentional interface definition:

See Also:
KRSentence

Method Index

 o assert(KRSentence)
This function can be used to add knowledge to this KnowledgeBase.
 o clone()
This function generates a copy of this KnowledgeBase that holds the same knowledge in the same formalism.
 o evaluate(KRSentence)
This function takes a KRSentence and evaluates it against this KnowledgeBase.
 o sentences()
This function returns an enumerator for the KRSentences in this KnowledgeBase.

Methods

 o clone
 public abstract Object clone()
This function generates a copy of this KnowledgeBase that holds the same knowledge in the same formalism.

Returns:
a copy of this KnowledgeBase
Overrides:
clone in class Object
 o assert
 public abstract void assert(KRSentence sent) throws IllegalArgumentException, FormalismException
This function can be used to add knowledge to this KnowledgeBase.

Parameters:
sent - the KRSentence holding the new knowledge
Throws: IllegalArgumentException
An exception will occur if the given KRSentence is null.
Throws: FormalismException
An exception will occur if the given KRSentence is not of the right Formalism.
 o evaluate
 public abstract boolean evaluate(KRSentence sent) throws IllegalArgumentException, FormalismException, IOException
This function takes a KRSentence and evaluates it against this KnowledgeBase.

Parameters:
sent - the KRSentence to be evaluated
Returns:
true iff the given KRSentence could be derived from the KnowledgeBase
Throws: IllegalArgumentException
An exception will occur if the given KRSentence is null.
Throws: FormalismException
An exception will occur if the given KRSentence is not of the right Formalism.
Throws: IOException
An exception can occur if writing to a given OutputStream for tracing fails.
 o sentences
 public abstract Enumeration sentences()
This function returns an enumerator for the KRSentences in this KnowledgeBase.

Returns:
an Enumeration for the KRSentences in this KnowledgeBase

All Packages  Class Hierarchy  This Package  Previous  Next  Index