All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class prolog.Goal

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

public abstract class Goal
extends Object
implements Cloneable, Serializable
Represents a logical connective in the body of a clause.


Constructor Index

 o Goal()

Method Index

 o compile(ClauseCodeGen)
 o instantiate(Term[])
Instantiate a list of Goals with the given substitutions.
 o normalise(Variable[], int, Vector, TypeDictionary)
Copies and normalises the body of a predicate.
 o redo(Term[], Prolog, ChoicePoint)
 o toString()
 o unify(Term[], Prolog)

Constructors

 o Goal
 Goal()

Methods

 o unify
 public abstract boolean unify(Term insts[],
                               Prolog p) throws PrologException
 o redo
 public abstract boolean redo(Term insts[],
                              Prolog p,
                              ChoicePoint cp) throws PrologException
 o instantiate
 abstract void instantiate(Term insts[])
Instantiate a list of Goals with the given substitutions. We overwrite the old Compound objects in the tree with their instantiated counterparts.

 o normalise
 abstract Goal normalise(Variable vars[],
                         int next_free_var,
                         Vector new_vars,
                         TypeDictionary types)
Copies and normalises the body of a predicate.

The body consists of unify()'s and calls to other predicates. Ensure the following conditions hold:

 1. All unifications have the form: unify(X, S).
      where: X is a variable
             S is one of: variable
                          number
                          structure containing new variables.
 2. Calls contain variables only.
 

See Also:
normalise
 o compile
 boolean compile(ClauseCodeGen ccg)
Parameters:
side_effects - have any calls up to now caused side effects?
 o toString
 public abstract String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index