|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectalice.tuprolog.Term
Term class is the root abstract class for prolog data type
Struct
,
Var
,
Number
,
Serialized FormField Summary | |
static Term |
FALSE
|
static Term |
TRUE
|
Constructor Summary | |
Term()
|
Method Summary | |
Term |
copyGoal(java.util.AbstractMap vars,
int idExecCtx)
gets a engine's copy of this term. |
Term |
copyResult(java.util.Collection goalVars,
java.util.List resultVars)
gets a copy of this term for the output |
static Term |
createTerm(java.lang.String st)
Static service to create a Term from a string. |
static Term |
createTerm(java.lang.String st,
alice.tuprolog.OperatorManager op)
Static service to create a Term from a string, providing an external operator manager. |
boolean |
equals(java.lang.Object t)
Tests for the equality of two object terms The comparison follows the same semantic of the isEQU method. |
abstract void |
free()
Unlink variables inside the term |
static java.util.Iterator |
getIterator(java.lang.String text)
Gets an iterator providing a term stream from a source text |
abstract Term |
getTerm()
Gets the actual term referred by this Term. |
abstract boolean |
isAtom()
is this term a prolog (alphanumeric) atom? |
abstract boolean |
isAtomic()
is this term a constant prolog term? |
abstract boolean |
isCompound()
is this term a prolog compound term? |
abstract boolean |
isEmptyList()
is this term a null term? |
abstract boolean |
isEqual(Term t)
Tests if this term is (logically) equal to another |
abstract boolean |
isGreater(Term t)
is term greater than term t? |
abstract boolean |
isGround()
is this term a ground term? |
abstract boolean |
isList()
is this term a prolog list? |
abstract boolean |
isNumber()
Deprecated. Use instanceof Number instead. |
abstract boolean |
isStruct()
Deprecated. Use instanceof Struct instead. |
abstract boolean |
isVar()
Deprecated. Use instanceof Var instead. |
Term |
iteratedGoalTerm()
The iterated-goal term G of a term T is a term defined recursively as follows: if T unifies with ^(_, Goal) then G is the iterated-goal term of Goal else G is T |
boolean |
match(Term t)
Tests if this term is unifiable with an other term. |
static Term |
parse(java.lang.String st)
Deprecated. Use createTerm(String) instead. |
static Term |
parse(java.lang.String st,
alice.tuprolog.OperatorManager op)
Deprecated. Use createTerm(String, OperatorManager) instead. |
void |
resolveTerm()
Resolves variables inside the term If the variables has been already resolved, no renaming is done. |
boolean |
unify(Prolog mediator,
Term t1)
Try to unify two terms |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Term TRUE
public static final Term FALSE
Constructor Detail |
public Term()
Method Detail |
public abstract boolean isNumber()
public abstract boolean isStruct()
public abstract boolean isVar()
public abstract boolean isEmptyList()
public abstract boolean isAtomic()
public abstract boolean isCompound()
public abstract boolean isAtom()
public abstract boolean isList()
public abstract boolean isGround()
public boolean equals(java.lang.Object t)
public abstract boolean isGreater(Term t)
public abstract boolean isEqual(Term t)
public abstract Term getTerm()
public abstract void free()
public void resolveTerm()
public Term copyGoal(java.util.AbstractMap vars, int idExecCtx)
idExecCtx
- Execution Context identifiedpublic Term copyResult(java.util.Collection goalVars, java.util.List resultVars)
public boolean unify(Prolog mediator, Term t1)
mediator
- have the reference of EngineManagert1
- the term to unify
public boolean match(Term t)
t
- the term to checked
public static Term createTerm(java.lang.String st) throws InvalidTermException
st
- the string representation of the term
InvalidTermException
- if the string does not represent a valid termpublic static Term parse(java.lang.String st) throws InvalidTermException
createTerm(String)
instead.
InvalidTermException
public static Term createTerm(java.lang.String st, alice.tuprolog.OperatorManager op) throws InvalidTermException
st
- the string representation of the termop
- the operator manager used to build the term
InvalidTermException
- if the string does not represent a valid termpublic static Term parse(java.lang.String st, alice.tuprolog.OperatorManager op) throws InvalidTermException
createTerm(String, OperatorManager)
instead.
InvalidTermException
public static java.util.Iterator getIterator(java.lang.String text)
public Term iteratedGoalTerm()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |