|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A term of the lambda-calculus.
Field Summary | |
static int |
TYPE_ABSTRACTION
|
static int |
TYPE_APPLICATION
|
static int |
TYPE_VARIABLE
|
Method Summary | |
Abstraction |
buildAbstraction()
Builds and returns an Abstraction whose body is this Term and which has no bound variable. |
Abstraction |
buildAbstraction(Variable boundVariable)
Builds and returns an Abstraction whose body is this Term and with the given bound variable. |
Abstraction |
buildAbstraction(Variable[] boundVariables)
Builds and returns an Abstraction whose body is this Term and with the given bound variables. |
Application |
buildApplication(Term argument)
Builds and returns an Application whose function is this Term and the argument is given. |
Application |
buildApplication(Term argument,
long functionExponent)
Builds and returns an Application whose function is this Term and the argument is given. |
java.util.Set |
freeVariables()
Returns the set of free variables of this Term. |
int |
getTermType()
Returns the type of this term. |
boolean |
isAbstraction()
Returns true if this Term is an Abstraction. |
boolean |
isApplication()
Returns true if this Term is an Application. |
boolean |
isVariable()
Returns true if this Term is a Variable. |
java.lang.String |
toText()
Returns a text representation of this Term. |
Field Detail |
public static final int TYPE_VARIABLE
public static final int TYPE_ABSTRACTION
public static final int TYPE_APPLICATION
Method Detail |
public int getTermType()
public boolean isVariable()
public boolean isAbstraction()
public boolean isApplication()
public java.util.Set freeVariables()
public java.lang.String toText()
public Abstraction buildAbstraction()
public Abstraction buildAbstraction(Variable boundVariable)
boundVariable
- a Variable used once within this Term.
public Abstraction buildAbstraction(Variable[] boundVariables)
boundVariables
- a set of variables used each once within this Term.
public Application buildApplication(Term argument)
argument
- a Term.
public Application buildApplication(Term argument, long functionExponent)
argument
- a Term.functionExponent
- a function exponent.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |