JTP API Documentation

jtp.gmp
Class ModusPonensReasoner

java.lang.Object
  |
  +--jtp.gmp.ModusPonensReasoner
All Implemented Interfaces:
Reasoner, Serializable

public class ModusPonensReasoner
extends Object
implements Reasoner, Serializable

An asking reasoner that provides Generalized Modus Ponens reasoning functionality.

Given a Literal query to prove, this reasoner retrieves ClauseOrientations with heads that match the query from a ClauseOrientationKB store. The clauses in the ClauseOrientations are used to produce subgoals that can be proven in order to prove the query.

See Also:
Serialized Form

Method Summary
 boolean acceptable(Object o)
          Returns true if the goal is a literal.
 ReasoningStepIterator process(Object o)
          Returns an iterator over partial proofs of the goal o.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

process

public ReasoningStepIterator process(Object o)
Returns an iterator over partial proofs of the goal o. Each partial proof will have unproven subgoals which, if proven, will mean that the goal is proven through Generalized Modus Ponens.

The subgoals of each partial proof are the other literals in a Clause containing a literal that matches the goal. For example, if (p A) is the goal and this ModusPonensReasoner knows about a clause (or (not (q ?x B)) (not (s B)) (p ?x)) [in implicative form (=> (and (q ?x B) (s B)) (p ?x))], then a partial proof with unproven subgoals (q A B) and (s B) will be returned.

The Clauses to which this reasoner has access are stored in a ClauseOrientationKB.

It is also possible for this reasoner to return a complete proof for the goal if a Literal matching the goal is stored in the ClauseOrientationKB.

The iterator returned is an instance of ModusPonensRecycler. Some of the functionality mentioned above is actually implemented inside the iterator.

Specified by:
process in interface Reasoner
Parameters:
o - the goal to prove
Returns:
the ModusPonensRecycler

acceptable

public boolean acceptable(Object o)
Returns true if the goal is a literal.

Specified by:
acceptable in interface Reasoner
Returns:
true if the goal is a Literal, false otherwise.

JTP API Documentation