|
JTP API Documentation | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The basic interface for a reasoner.
This is the principal functional component of the architecture. A backward-chaining reasoner is an object that can accept goals and find proofs for the answers it returns. Correspondingly, the reasoner interface includes two methods. Both methods take a single argument - the goal.
There are no formal limitations on what can be a goal for a backward-chaining reasoner, as long as it understands it. In current JTP implementation, goals typically correspond to first-order logic sentences expressed in the form of data structures defined in jtp.fol package; most often literals.
| Method Summary | |
boolean |
acceptable(Object goal)
decides if the goal is suitable for being processed by this reasoner. |
ReasoningStepIterator |
process(Object goal)
This method attempts to find proof for the goal. |
| Method Detail |
public ReasoningStepIterator process(Object goal)
throws ReasoningException
Example. A reasoner that performs unification of the goal with facts in a
knowledge base can return the following enumeration for the goal (parent joe ?x):
(parent joe fred) with variable assignment
?x=fred,(parent joe mary) with variable assignment
?x=mary.
goal - the goal: either a query or an assertion
ReasoningExceptionpublic boolean acceptable(Object goal)
Example. Many reasoners only process literals with certain predicates and arity. These reasoners will use those criteria to determine acceptability, for example a reasoner dealing with equality could accept goals that are:
|
JTP API Documentation | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||