JTP API Documentation

jtp.frame.fc
Class RuleCreationReasoningStep

java.lang.Object
  |
  +--jtp.proof.Proof
        |
        +--jtp.ReasoningStep
              |
              +--jtp.frame.fc.RuleCreationReasoningStep
All Implemented Interfaces:
Cloneable, Serializable, Unifyable
Direct Known Subclasses:
ActionCreationReasoningStep

public class RuleCreationReasoningStep
extends ReasoningStep

A proof step representing the creation of a horn clause to be use by the forward-chaining mechanisms in jtp.frame.fc. The proof step itself is either created directly by the user (a direct assertion) or generated through forward-chaining.

The horn clause may have been created directly by the user (in which case the step will have no subgoals or subproofs), or it may have been "unrolled".

An unrolled clause represents an inference in which one input is a clause (or (not A1) (not A2) ... (not An) C) containing a set of variables V. The other input is a literal B that unifies with some Ai in the clause. The consequence of the step is a new clause from which Ai has been removed, and substitutions have been made for the bindings induced by unifying Ai with B.

As an example, suppose the inputs are the clause

    (=> (and (type ?x ?subc)
             (subClassOf ?subc ?superc))
        (type ?x ?superc))
 
and the literal
    (subClassOf Dog Mammal)
 
(subClassOf Dog Mammal) unifies with (subClassOf ?subc ?superc) with bindings {?subc = Dog, ?superc = Mammal} The result (goal) of this proof step is therefore the clause
   (=> (type ?x Dog)
       (type ?x Mammal))
 

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jtp.proof.Proof
bindings, goal, inference, subGoals, subProofs
 
Constructor Summary
RuleCreationReasoningStep(Clause cl, String ruleID)
           
RuleCreationReasoningStep(Clause cl, String ruleID, List subProofSteps)
           
RuleCreationReasoningStep(Clause cl, String ruleID, URL kbLocation)
           
 
Method Summary
protected  RuleCreationReasoningStep createChildlessClone()
           
 URL getKBLocation()
           
 Clause getRuleClause()
           
 String getRuleID()
           
protected  void setRuleClause(Clause cl)
           
 void setRuleID(String id)
           
protected  void setSubProofs(List subProofSteps)
           
 String tracePrint()
          Returns a string that describes the inference that this reasoning step makes.
 
Methods inherited from class jtp.ReasoningStep
addContentsIfUnifyable, backtrack, clone, cloneNeedsDereferencing, collectUnifyableElements, contains, createDereferencedClone, deReferenceBindings, deReferenceElement, deReferenceList, deReferenceVariables, getCost, getInference, getSubProofs, getVariables, makeStep, unify
 
Methods inherited from class jtp.proof.Proof
getBindings, getGoal, getSubGoals, toString, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleCreationReasoningStep

public RuleCreationReasoningStep(Clause cl,
                                 String ruleID)

RuleCreationReasoningStep

public RuleCreationReasoningStep(Clause cl,
                                 String ruleID,
                                 List subProofSteps)

RuleCreationReasoningStep

public RuleCreationReasoningStep(Clause cl,
                                 String ruleID,
                                 URL kbLocation)
Method Detail

getKBLocation

public URL getKBLocation()

getRuleID

public String getRuleID()

setRuleID

public void setRuleID(String id)

getRuleClause

public Clause getRuleClause()

setRuleClause

protected void setRuleClause(Clause cl)

setSubProofs

protected void setSubProofs(List subProofSteps)

createChildlessClone

protected RuleCreationReasoningStep createChildlessClone()

tracePrint

public String tracePrint()
Description copied from class: ReasoningStep
Returns a string that describes the inference that this reasoning step makes.

Specified by:
tracePrint in class ReasoningStep

JTP API Documentation