    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

##

assert(KRSentence)
  This function can be used to add knowledge to this KnowledgeBase.
clone()
  This function generates a copy of this KnowledgeBase that holds the same knowledge in the same formalism.
evaluate(KRSentence)
  This function takes a KRSentence and evaluates it against this KnowledgeBase.
isInconsistent()
  This function tests whether this KnowledgeBase is inconsistent.
sentences()
  This function returns an enumerator for the KRSentences in this KnowledgeBase.
writeToStream(OutputStream)
  This function writes the content of this KnowledgeBase to the given OutputStream.

##

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

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.

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.

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.

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

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