|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJSHOP2.CompileTimeObject
JSHOP2.Term
JSHOP2.TermCall
public class TermCall
Each call term, both at compile time and at run time, is an instance of this class.
Field Summary | |
---|---|
private List |
args
The list that represents the arguments of the call term. |
private Calculate |
calculate
The Java implementation of the function that is called in this call term. |
private java.lang.String |
func
The name of the function that is called in this call term as a String . |
Fields inherited from class JSHOP2.CompileTimeObject |
---|
endl |
Constructor Summary | |
---|---|
TermCall(List argsIn,
Calculate calculateIn,
java.lang.String funcIn)
To initialize this call term. |
|
TermCall(List argsIn,
java.lang.String funcIn)
To initialize this call term. |
Method Summary | |
---|---|
Term |
bind(Term[] binding)
To apply a given binding to the list of arguments of the function call. |
boolean |
equals(Term t)
Whether or not another term is equivalent to the result of this call term. |
boolean |
findUnifier(Term t,
Term[] binding)
Find a unifier between the result of this call term and another given term. |
boolean |
isGround()
Check the argument list of this call term for variables. |
java.lang.String |
toCode()
This function produces Java code to create this call term. |
java.lang.String |
toString()
This function is used to print this call term. |
Methods inherited from class JSHOP2.Term |
---|
isNil, merge, merge, print |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private List args
(CDR ct)
where ct
is this call term.
private Calculate calculate
private java.lang.String func
String
.
Constructor Detail |
---|
public TermCall(List argsIn, java.lang.String funcIn)
argsIn
- the argument list.funcIn
- the name of the function to be applied.public TermCall(List argsIn, Calculate calculateIn, java.lang.String funcIn)
argsIn
- the argument list.calculateIn
- the Java implementation of the function to be applied.funcIn
- the name of the function to be applied.Method Detail |
---|
public Term bind(Term[] binding)
bind
in class Term
binding
- an array of terms, indexed by the integers associated with
variable symbols.
public boolean equals(Term t)
equals
in class Term
t
- the term being compared to this term.
true
if the two terms are equal, false
otherwise.public boolean findUnifier(Term t, Term[] binding)
findUnifier
in class Term
t
- the term with which we are finding a unifier.binding
- the unifier to be returned.
false
if the two terms can not be unified,
true
otherwise.public boolean isGround()
isGround
in class Term
true
if this term is ground, false
otherwise.public java.lang.String toCode()
toCode
in class CompileTimeObject
String
.public java.lang.String toString()
toString
in class Term
String
that shows the value of this
term.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |