All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface JavaAgent.resource.fopl.KnowledgeBase

public interface KnowledgeBase
A KnowledgeBase is a set of KRSentences.

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 isInconsistent()
This function tests whether this KnowledgeBase is inconsistent.
 o sentences()
This function returns an enumerator for the KRSentences in this KnowledgeBase.
 o writeToStream(OutputStream)
This function writes the content of this KnowledgeBase to the given OutputStream.

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 isInconsistent
 public abstract boolean isInconsistent() throws IOException
This function tests whether this KnowledgeBase is inconsistent.

Returns:
true iff this KnowledgeBase is inconsistent
Throws: IOException
An exception can occur if writing to a given OutputStream for tracing fails.
 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
 o writeToStream
 public abstract void writeToStream(OutputStream os) throws IllegalArgumentException, IOException
This function writes the content of this KnowledgeBase to the given OutputStream.

Parameters:
os - theOutputStream the KRSentences is to be written to
Throws: IllegalArgumentException
An exception will occur if the given OutputStream is null.
Throws: IOException
An exception will occur if writing to the given OutputStream failed for some reason.

All Packages  Class Hierarchy  This Package  Previous  Next  Index