|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jtp.gmp.Utils
Utils.java Created: Thu Jan 4 02:24:58 2001
Constructor Summary | |
Utils()
|
Method Summary | |
static ReasoningStep |
deriveFrom(Literal goal,
ReasoningStep subStep)
|
static ReasoningStep |
deriveFrom(Literal goal,
ReasoningStep subStep,
List varStack)
tries to derive a proof for a literal from a pre-existing reasoning step. |
static ReasoningStep |
deriveFrom(Literal goal,
ReasoningStep subStep,
List varStack,
ModusPonensProofStep reusableStep)
tries to derive a proof for a literal from a pre-existing reasoning step. |
static void |
restoreVariableSet(Collection vars)
Restores the variables modified by unify(jtp.fol.Literal, jtp.gmp.ClauseOrientation, java.util.Collection, java.util.List) to pristine condition. |
static boolean |
unify(Literal goal,
ClauseOrientation hc,
Collection vars,
List varStack)
Performs unification of a goal with the head of the clause orientation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Utils()
Method Detail |
public static boolean unify(Literal goal, ClauseOrientation hc, Collection vars, List varStack)
restoreVariableSet(java.util.Collection)
on the collection (whether or not the operation succeeded).
The resulting variable bindings can be used in modus ponens reasoning or other forms of resolution.
Note that this function ignores the literal's relation symbol and polarity - this is supposed to have
been taken care of by the KB indexing mechanism!
goal
- the goal to unify with the clause.hc
- the clause orientationvars
- the collection of the variables found in the clause.varStack
- will hold the list of bound variables from both the literal and the clause, if the
operation succeeds.
public static ReasoningStep deriveFrom(Literal goal, ReasoningStep subStep)
public static ReasoningStep deriveFrom(Literal goal, ReasoningStep subStep, List varStack)
goal
- the literal that we are trying to derive.subStep
- the pre-existing reasoning stepvarStack
- the variable stack to use.public static ReasoningStep deriveFrom(Literal goal, ReasoningStep subStep, List varStack, ModusPonensProofStep reusableStep)
ModusPonensProofStep
. The supplied
reasoning step is reused if:
goal
- the literal that we are trying to derive.subStep
- the pre-existing reasoning stepvarStack
- the variable stack to use.reusableStep
- try and reuse this reasoning step, if not null
.public static void restoreVariableSet(Collection vars)
unify(jtp.fol.Literal, jtp.gmp.ClauseOrientation, java.util.Collection, java.util.List)
to pristine condition. Variables are all unbound,
and the collection is cleared.
vars
- the collection of variables to restore.
|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |