|
JACK 5.4 Application Interface | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectaos.jack.jak.util.Watchable
aos.jack.jak.cursor.Cursor
aos.jack.jak.beliefset.BeliefSetCursor
aos.jack.jak.beliefset.OpenWorldCursor
A Cursor that can be used over an OpenWorld beliefset. A concrete subclass of this cursor will be automatically generated for beliefsets which extend OpenWorld.
Field Summary |
Fields inherited from class aos.jack.jak.cursor.Cursor |
FALSE, falseCursor, TRUE, trueCursor, UNKNOWN |
Constructor Summary | |
OpenWorldCursor()
|
Method Summary | |
protected void |
finalize()
|
void |
finished()
This informs the cursor that it is not going to be used again. |
protected OpenWorld |
getBeliefset()
|
protected int |
getIndex()
|
Tuple |
getMatched()
Return the tuple that has been successfully matched at last next(), null otherwise. |
int[] |
getMatchedContext()
Return the context information required by restoreNextContext() to repeat the last sucessful match by next(), null if failed. |
protected int |
getTableLocation()
|
protected int |
getTableNumber()
|
void |
init(int ind,
BeliefSet db)
|
boolean |
next()
This method is called to provide a next binding by this cursor. |
void |
removeAll()
Retracts all tuples subsequently matching the cursor. |
void |
restoreNextContext(int[] matchparams)
Restore parameters for next() to match a specific tuple at a certain location. |
protected void |
setBeliefset(OpenWorld bs)
|
protected void |
setIndex(int i)
|
protected void |
setTableLocation(int i)
|
protected void |
setTableNumber(int i)
|
java.lang.String |
toString()
|
void |
undo()
Undo tells the cursor to backtrack anything it has done. |
Methods inherited from class aos.jack.jak.beliefset.BeliefSetCursor |
getBs, getChoicePoint, hash, isKeyGround, isTriggered, match, register, retractAll, unRegister |
Methods inherited from class aos.jack.jak.cursor.Cursor |
negate, reset |
Methods inherited from class aos.jack.jak.util.Watchable |
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OpenWorldCursor()
Method Detail |
public void init(int ind, BeliefSet db)
init
in class BeliefSetCursor
public boolean next()
Cursor
db.query($x) && isWhatIWant($x) && db1.query($x, $y)If the isWhatIWant() cursor simply tests its input and returns true for appropriate values then this expression would not work as expected and may go into an infinite loop.
db(1) db(2) db(3) db1(3,3)and isWhatIWant() returned true on odd numbers. Then the correct behaviour would be one result with $x=3 $y=3. However if isWhatIWant.next() always returns true on odd numbers then: $x is bound to 1,
next
in class Cursor
public java.lang.String toString()
public Tuple getMatched()
BeliefSetCursor
getMatched
in class BeliefSetCursor
public int[] getMatchedContext()
BeliefSetCursor
getMatchedContext
in class BeliefSetCursor
public void restoreNextContext(int[] matchparams)
restoreNextContext
in class BeliefSetCursor
public void removeAll()
removeAll
in class BeliefSetCursor
public void undo()
Cursor
undo
in class Cursor
public void finished()
Cursor
finished
in class BeliefSetCursor
protected void finalize()
protected void setIndex(int i)
protected int getIndex()
protected void setTableNumber(int i)
protected int getTableNumber()
protected void setTableLocation(int i)
protected int getTableLocation()
protected void setBeliefset(OpenWorld bs)
protected OpenWorld getBeliefset()
|
JACK 5.4 Application Interface | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.