JTP API Documentation

jtp
Class Cut

java.lang.Object
  |
  +--jtp.proof.Proof
        |
        +--jtp.ReasoningStep
              |
              +--jtp.Cut
All Implemented Interfaces:
Cloneable, Serializable, Unifyable
Direct Known Subclasses:
DefaultCut

public abstract class Cut
extends ReasoningStep

When a reasoner returns a Cut reasoning step, it means that there are no more solutions left for the goal of the reasoning step. For example, if a relation is a function, i.e. it has only one value, and the query is for this value, then a reasoner might return one "normal" reasoning step with the answer, and then a cut reasoning step indicating that the search for more answers would be futile, at least within the indicated depth limit.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jtp.proof.Proof
bindings, goal, inference, subGoals, subProofs
 
Constructor Summary
Cut()
           
 
Method Summary
abstract  int getExhaustedDepth()
          returns the depth within which further search is futile.
 
Methods inherited from class jtp.ReasoningStep
addContentsIfUnifyable, backtrack, clone, cloneNeedsDereferencing, collectUnifyableElements, contains, createDereferencedClone, deReferenceBindings, deReferenceElement, deReferenceList, deReferenceVariables, getCost, getInference, getSubProofs, getVariables, makeStep, tracePrint, 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

Cut

public Cut()
Method Detail

getExhaustedDepth

public abstract int getExhaustedDepth()
returns the depth within which further search is futile. For example, if a reasoner returns a cut reasoning step with depth 5, it means there are no more solutions at depths 1 through 5, but there might be more at depth 6 or more. If there are no more solution whatsoever, return Integer.MAX_VALUE.

Returns:
the depth of the exhausted part of search space.

JTP API Documentation