jtp.rs
Class DefaultCut
java.lang.Object
|
+--jtp.proof.Proof
|
+--jtp.ReasoningStep
|
+--jtp.Cut
|
+--jtp.rs.DefaultCut
- All Implemented Interfaces:
- Cloneable, Serializable, Unifyable
- public class DefaultCut
- extends Cut
A default implementation of Cut.
- See Also:
- Serialized Form
Methods inherited from class jtp.ReasoningStep |
addContentsIfUnifyable, backtrack, clone, cloneNeedsDereferencing, collectUnifyableElements, contains, createDereferencedClone, deReferenceBindings, deReferenceElement, deReferenceList, deReferenceVariables, getCost, getInference, getSubProofs, getVariables, unify |
DefaultCut
public DefaultCut(String message,
int depth)
DefaultCut
public DefaultCut(String message)
DefaultCut
public DefaultCut(String message,
DepthMonitor dm)
setGoal
public void setGoal(Object goal)
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
getSubGoals
public List getSubGoals()
- Description copied from class:
Proof
- Returns a List of subgoals, or premises, that this Proof relies
upon to prove its
goal
. If the subgoal
list and the subproof list are equal in length, then this is
a complete proof of the goal. If the subgoal list is longer,
then this is a partial proof, and the remaining subgoals must
be proven in order to prove the goal.
- Overrides:
getSubGoals
in class Proof
- Returns:
- a list of the subgoals of this Proof
- See Also:
Proof.getSubProofs()
getExhaustedDepth
public int getExhaustedDepth()
- Description copied from class:
Cut
- 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
.
- Specified by:
getExhaustedDepth
in class Cut
- Returns:
- the depth of the exhausted part of search space.
setExhaustedDepth
public void setExhaustedDepth(int depth)
makeStep
public void makeStep()
- Description copied from class:
ReasoningStep
Bind
Variables that are keys
in bindings
map to the values in the
map.
- Overrides:
makeStep
in class ReasoningStep
isValidCut
public static boolean isValidCut(int exDepth,
DepthMonitor dm)
isValidCut
public static boolean isValidCut(ReasoningStep ps,
DepthMonitor dm)