|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectai.krr.fol.KnowledgeBase
public class KnowledgeBase
A KnowledgeBase is effectively a set of Sentences believed to be true.
Field Summary | |
---|---|
protected java.util.List<Sentence> |
beliefs
the List of Sentences that hold in this KB |
Constructor Summary | |
---|---|
KnowledgeBase()
|
Method Summary | |
---|---|
void |
add(Sentence stmt)
This function asserts the given Sentence in this KnowledgeBase. |
boolean |
entails(Sentence stmt)
This function tests whether the given Sentence holds in this KnowledgeBase. |
boolean |
falsifies(Sentence stmt)
This function tests whether the given Sentence does not hold in this KnowledgeBase. |
void |
prettyPrint(int indent,
java.io.Writer w,
inf.compilers.SyntaxAdaptor sa)
|
static KnowledgeBase |
read(java.io.Reader r,
inf.compilers.SyntaxAdaptor<KnowledgeBase> sa)
|
void |
retract(Sentence stmt)
This function deletes the given Sentence from this KnowledgeBase. |
void |
write(java.io.Writer w,
inf.compilers.SyntaxAdaptor sa)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<Sentence> beliefs
Constructor Detail |
---|
public KnowledgeBase()
Method Detail |
---|
public void write(java.io.Writer w, inf.compilers.SyntaxAdaptor sa) throws inf.compilers.ExpressivenessException, java.io.IOException
write
in interface inf.compilers.SyntaxAdaptable
inf.compilers.ExpressivenessException
java.io.IOException
public void prettyPrint(int indent, java.io.Writer w, inf.compilers.SyntaxAdaptor sa) throws inf.compilers.ExpressivenessException, java.io.IOException
prettyPrint
in interface inf.compilers.SyntaxAdaptable
inf.compilers.ExpressivenessException
java.io.IOException
public void add(Sentence stmt)
This function asserts the given Sentence in this KnowledgeBase.
stmt
- the Sentence that is to hold in this KnowledgeBasepublic void retract(Sentence stmt)
This function deletes the given Sentence from this KnowledgeBase.
stmt
- the Sentence that is not to hold in this KnowledgeBasepublic boolean entails(Sentence stmt)
This function tests whether the given Sentence holds in this KnowledgeBase.
stmt
- the Sentence that may or may not be true
public boolean falsifies(Sentence stmt)
This function tests whether the given Sentence does not hold in this KnowledgeBase.
stmt
- the Sentence that may or may not be true
public static KnowledgeBase read(java.io.Reader r, inf.compilers.SyntaxAdaptor<KnowledgeBase> sa) throws inf.compilers.ExpressivenessException, java.text.ParseException, java.io.IOException
inf.compilers.ExpressivenessException
java.text.ParseException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |