All Packages Class Hierarchy This Package Previous Next Index
Class prolog.Clause
java.lang.Object
|
+----prolog.Clause
- public class Clause
- extends Object
- implements Cloneable, Serializable
Represents a clause, which consist of a head (a Compound Term)
and, optionally, a body (a GoalList).
-
body
-
-
head
-
-
numVars
- Number of vars in this clause.
-
parsed
- The parsed version of this clause.
-
Clause(Compound, Goal, Compound, int)
- Creates a new Clause.
-
Clause(Compound, Prolog)
- Creates a new Clause, converting a parsed clause of either
of the forms: Head. or ':-'(Head, Body) into the
internal representation.
-
normalise(TypeDictionary)
- Normalises this clause into the format specified in andrewt's
doctoral thesis (more or less).
-
toString()
-
head
public Compound head
body
public Goal body
parsed
public Compound parsed
- The parsed version of this clause.
numVars
public int numVars
- Number of vars in this clause.
Clause
public Clause(Compound parsed,
Prolog p)
- Creates a new Clause, converting a parsed clause of either
of the forms: Head. or ':-'(Head, Body) into the
internal representation.
- Parameters:
- parsed - the parsed form of this clause.
Clause
public Clause(Compound head,
Goal body,
Compound parsed,
int numVars)
- Creates a new Clause.
- Parameters:
- head - the head of this clause.
- body - the body of this clause.
- parsed - the parsed form of this clause: ':-'(Head, Body).
- numVars - the number of variables in this clause.
normalise
Clause normalise(TypeDictionary types)
- Normalises this clause into the format specified in andrewt's
doctoral thesis (more or less). This makes it easier to compile as
unifications are tightly restricted in form.
Note we don't typeify() the top-level arguments - so if
head_args[i].ti == null, arg i isn't used.
- See Also:
- compileClauses, normalise
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index