Method Summary |
|
public void | addConsumer(ConsumerChoicePointFrame ccp) Add a new client choince point to consume results from this generator. |
public void | checkForCompletions() Check for deadlocked states where none of the generators we are (indirectly)
dependent on can run. |
public static void | checkForCompletions(Collection completions) Check for deadlocked states across a collection of generators which have
been run. |
public Generator | getGenerator() |
public boolean | isComplete() Return true if the generator is complete. |
public boolean | isReady() Return true if the generator is ready to be scheduled (i.e. |
public void | notifyBlockedOn(ConsumerChoicePointFrame ccp) Notify that the interpreter has now blocked on the given choice point. |
public void | notifyFinished(ConsumerChoicePointFrame ccp) Notify this context that the given choice point has terminated
and can be remove from the wait list. |
public void | notifyResults() Signal dependents that we have new results. |
public int | numResults() Return the number of results available from this context. |
protected static void | postCompletionCheckScan(Set visited) Scan the result of a (set of) completion check(s) to detect which of the
unknowns are actually live and set the remaining (deadlocked) states
to complete. |
protected void | propagateLive(Set filter) Propagate liveness state forward to consuming generators, but only those
within the filter set. |
public void | pump() Start this generator running for the first time. |
public void | pump(LPInterpreterState context) Start this generator running from the given previous blocked generating
choice point. |
public void | removeConsumer(ConsumerChoicePointFrame ccp) Remove a terminated consuming choice point from the state set. |
protected LFlag | runCompletionCheck(Set visited) Check whether this generator is live (indirectly dependent on a ready
generator), dead (complete) or in a deadlock loop which might or
might not be live (unknown). |
public void | setComplete() Signal that this generator is complete, no more results can be created. |
public void | setReady(ConsumerChoicePointFrame ccp) Directly set that this generator is ready (because the generator
for one of its generatingCPs has produced new results). |