Kernel Prolog with Fluent based Builtins

tarau.jinni
Class Prog

java.lang.Object
  |
  +--tarau.jinni.Term
        |
        +--tarau.jinni.Nonvar
              |
              +--tarau.jinni.SystemObject
                    |
                    +--tarau.jinni.Fluent
                          |
                          +--tarau.jinni.Source
                                |
                                +--tarau.jinni.Prog

public class Prog
extends Source
implements java.lang.Runnable

Basic toplevel Prolog Engine. Loads and executes Prolog programs and spawns threads executing on new Prolog Engine objects as well as networking threads and synchronized local and remote Linda transactions


Field Summary
private  java.util.Stack orStack
           
private  Prog parent
           
static int tracing
           
private  Trail trail
           
 
Fields inherited from class tarau.jinni.Fluent
persistent
 
Fields inherited from class tarau.jinni.SystemObject
ctr, ordinal
 
Fields inherited from class tarau.jinni.Term
CONST, INT, JAVA, REAL, VAR
 
Constructor Summary
Prog(Clause goal, Prog parent)
          Creates a Prog starting execution with argument "goal"
 
Method Summary
static Term ask_engine(Prog p)
           
static Term firstSolution(Term X, Term G)
          Computes a copy of the first solution X of Goal G.
 Term getElement()
           
 Prog getParent()
           
 Trail getTrail()
           
static Prog new_engine(Term X, Term G)
           
 void run()
           
 void stop()
           
 
Methods inherited from class tarau.jinni.Source
toFun, toList
 
Methods inherited from class tarau.jinni.Fluent
getPersistent, setPersistent, trailMe, undo
 
Methods inherited from class tarau.jinni.SystemObject
bind_to, getArity, name, toString
 
Methods inherited from class tarau.jinni.Nonvar
eq, listify, unify_to
 
Methods inherited from class tarau.jinni.Term
action, charsToString, copy, exec, exec, fromString, getKey, isBuiltin, isClause, matches, matching_copy, numbervars, pprint, pprint, reaction, ref, stringToChars, toChars, toClause, token, toObject, toTerm, toUnquoted, unify, varsOf
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

trail

private Trail trail

orStack

private java.util.Stack orStack

parent

private Prog parent

tracing

public static int tracing
Constructor Detail

Prog

public Prog(Clause goal,
            Prog parent)
Creates a Prog starting execution with argument "goal"
Method Detail

getTrail

public final Trail getTrail()

getParent

public final Prog getParent()

getElement

public Term getElement()
Overrides:
getElement in class Source

stop

public void stop()
Overrides:
stop in class Fluent

firstSolution

public static Term firstSolution(Term X,
                                 Term G)
Computes a copy of the first solution X of Goal G.

new_engine

public static Prog new_engine(Term X,
                              Term G)

ask_engine

public static Term ask_engine(Prog p)

run

public void run()
Specified by:
run in interface java.lang.Runnable

Kernel Prolog with Fluent based Builtins