|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface iConsultable
iConsultable is the interface for classes that may need to
access the knowledge base before any proof attempts are made.
Usually such consulting is done after the knowledge base changes, such as
when a prolog source is consulted. The usual purpose of such consulting is to
prefetch and cache the knowledge base entries so that a search of the
knowledge base during the proof phase is not required.
| Method Summary | |
|---|---|
void |
consult(jKnowledgeBase kb)
Consult the given jKnowledgeBase and cache any invariant values (those
which would not change until the next time the jKnowledgeBase changes). |
void |
consultReset()
Called when the jKnowledgeBase changes. |
boolean |
isConsultNeeded()
Determine if cached values already exist and hence if consulting is required. |
| Method Detail |
|---|
void consult(jKnowledgeBase kb)
jKnowledgeBase and cache any invariant values (those
which would not change until the next time the jKnowledgeBase changes).
Where possible, consultable objects should minimize computation and assume that any
cached values are still accurate.
kb - the knowledge base which attempted proofs are based upon.void consultReset()
jKnowledgeBase changes. Should set all cached values to
dirty so that a following call to consult would perform a full lookup
as required.
boolean isConsultNeeded()
false if cached values are valid,
true otherwise, if consult should be
called.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||