ubc.cs.JLog.Builtins.Goals
Class jOpGoal
java.lang.Object
ubc.cs.JLog.Foundation.jGoal
ubc.cs.JLog.Builtins.Goals.jOpGoal
- All Implemented Interfaces:
- iName, iNameArity
public class jOpGoal
- extends jGoal
| Fields inherited from class ubc.cs.JLog.Foundation.jGoal |
next |
priority
protected jTerm priority
specifier
protected jTerm specifier
operation
protected jTerm operation
jOpGoal
public jOpGoal(jTerm t1,
jTerm t2,
jTerm t3)
prove
public boolean prove(iGoalStack goals,
iGoalStack proved)
- Description copied from class:
jGoal
- Attempt to prove the goal represented by this
jGoal.
Goal must not be on either stack to prove (pop off goals stack before prove call).
Goal must place itself on the appropriate stack before returning.
proved stack if 'proved', goals stack otherwise.
Since proved doesn't pop the stack we don't need a try/catch block.
Must be called at least once before calling retry.
- Specified by:
prove in class jGoal
- Parameters:
goals - iGoalStack containing goals yet to be proved.proved - iGoalStack containing evaluated goals (goals
that may already be proved, or awaiting their child goals
to be proved).
- Returns:
boolean is true if this goal ended up on
proved, false otherwise.
retry
public boolean retry(iGoalStack goals,
iGoalStack proved)
- Description copied from class:
jGoal
- Attempt to prove the goal represented by this
jGoal.
Goal must not be on either stack to retry (pop off proved stack before retry call).
Goal must place itself on the goal stack, and normally need not pop either stack.
Since retry doesn't pop the stack we don't need a try/catch block.
- Specified by:
retry in class jGoal
- Parameters:
goals - iGoalStack containing goals yet to be proved.proved - iGoalStack containing evaluated goals (goals
that may already be proved, or awaiting their child goals
to be proved).
- Returns:
boolean is true if the prover should attempt
a prove on this goal, false otherwise.
getPriority
protected int getPriority(jTerm t)
getSpecifier
protected int getSpecifier(jTerm t)
registerOperations
protected void registerOperations(pOperatorRegistry registry,
int pri,
int stype)
registerOperation
protected void registerOperation(jTerm t,
pOperatorRegistry registry,
int pri,
int stype)
getName
public String getName()
- Description copied from interface:
iName
- Returns the name of this instance.
- Returns:
String containing name of this instance.
getArity
public int getArity()
- Description copied from interface:
iNameArity
- Returns the arity of this instance.
- Returns:
int whose value is the arity of this instance.
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2011. All Rights Reserved.