com.svincent.moksa
Class Continuation

java.lang.Object
  |
  +--com.svincent.moksa.WamObject
        |
        +--com.svincent.moksa.Continuation

public class Continuation
extends WamObject

This is the Continuation concept, made explicit, for clarity. It would be possible to use PrologTerms to build Continuations, or use Instructions directly as their own continuations (I tried both), but this seems the least confusing, particularly for somebody like me: with relatively little experience working on systems written in C-P style.


Constructor Summary
protected Continuation(Rule _rule, PrologTerm[] _registers, Continuation _next)
          Construct a new Continuation which will call the given goal, then proceed on to the 'next' continuation.
 
Method Summary
 Continuation exec(Wam wam)
          Execute this continuation.
static Continuation make(PrologEngine engine, PrologTerm goal, Continuation next)
          Make a new Continuation for the given (possibly compound) goal 'goal'.
 void tag(java.io.PrintWriter out)
          Retrieve a human-readable String for this object.
 
Methods inherited from class com.svincent.moksa.WamObject
tag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Continuation

protected Continuation(Rule _rule,
                       PrologTerm[] _registers,
                       Continuation _next)

Construct a new Continuation which will call the given goal, then proceed on to the 'next' continuation.

Make Continuations using the static Continuation.make methods.

Method Detail

exec

public Continuation exec(Wam wam)
                  throws PrologException
Execute this continuation.

make

public static Continuation make(PrologEngine engine,
                                PrologTerm goal,
                                Continuation next)
                         throws PrologException

Make a new Continuation for the given (possibly compound) goal 'goal'. Use 'next' as the terminating Continuation.


tag

public void tag(java.io.PrintWriter out)
Retrieve a human-readable String for this object.
Overrides:
tag in class WamObject



This is documentation for Moksa Prolog, which can be found at http://www.svincent.com/moksa/

Copyright © 1999 Shawn P. Vincent.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.