All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class prolog.Predicate

java.lang.Object
   |
   +----prolog.Predicate

public abstract class Predicate
extends Object
implements Cloneable, Serializable
The abstract base class of the predicate representations - essentially just a bucket in a hashtable.

See Also:
ClauseIndex, CompiledPredicate, DynamicPredicate, InterpretedPredicate, JITPredicate

Variable Index

 o arity
 o functor
 o hash
 o next

Constructor Index

 o Predicate()

Method Index

 o compile_call(ClauseCodeGen, Term[], boolean)
Compiles a call to this predicate.
 o redo(Term[], Prolog, ChoicePoint)
Redo a goal, i.e.
 o toString()
 o unify(Term[], Prolog)
Resolve the given goal in the context of a Prolog engine.

Variables

 o hash
 transient int hash
 o functor
 public String functor
 o arity
 public int arity
 o next
 transient Predicate next

Constructors

 o Predicate
 protected Predicate()

Methods

 o unify
 public abstract boolean unify(Term args[],
                               Prolog p) throws PrologException
Resolve the given goal in the context of a Prolog engine.

Parameters:
goal - the goal to be resolved.
 o redo
 public abstract boolean redo(Term args[],
                              Prolog p,
                              ChoicePoint cp) throws PrologException
Redo a goal, i.e. on backtracking.

 o compile_call
 public boolean compile_call(ClauseCodeGen ccg,
                             Term args[],
                             boolean lastcall)
Compiles a call to this predicate. This method should be overridden by other classes that can do a better job than a generic call.

Parameters:
lastcall - this call is a last call.
 o toString
 public abstract String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index