|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcode.term.Variable
public class Variable
Term representation for free variables.
| Field Summary | |
|---|---|
private static java.lang.IllegalStateException |
argException
Exceptions thrown by Variable |
static java.lang.String |
autoVarPrefix
Prefix for program-generated variable names. |
private static int |
counter
Counter for program-generated variable names. |
private static java.lang.IllegalStateException |
eqBool
|
private java.lang.String |
name
|
private static java.lang.IllegalStateException |
replaceException
|
| Constructor Summary | |
|---|---|
Variable()
Constructor for the Variable object |
|
Variable(java.lang.String name)
Constructor for the Variable object |
|
| Method Summary | ||
|---|---|---|
|
accept(code.term.visitor.TermVisitor<R,T> v,
T o)
Accepts the visitor by passing this term as a parameter to the visit method of the visitor. |
|
Term[] |
getArgument()
Returns an empty list of terms since free variables do not have arguments. |
|
Term |
getArgument(byte number)
Throws an exception since free variables do not have arguments. |
|
Instruction[] |
getCode()
Returns an empty list since free variables are not rewritten. |
|
byte |
getKind()
Returns the kind for variables. |
|
java.lang.String |
getName()
Returns the name of this variable. |
|
int |
getRoot()
Returns the root id of this term. |
|
java.lang.String |
getRootSymbol()
Returns the root symbol of this term. |
|
boolean |
isHNF()
Returns true since free variables are in head normal form. |
|
boolean |
isNF()
Returns true since variables are in normal form. |
|
java.lang.String |
toString()
Returns the String representation of this variable. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static int counter
public static final java.lang.String autoVarPrefix
private static final java.lang.IllegalStateException argException
private static final java.lang.IllegalStateException replaceException
private static final java.lang.IllegalStateException eqBool
private final java.lang.String name
| Constructor Detail |
|---|
public Variable(java.lang.String name)
name - The name of this variablepublic Variable()
| Method Detail |
|---|
public java.lang.String getRootSymbol()
getRootSymbol in interface TermImplpublic int getRoot()
getRoot in interface TermImplpublic Term[] getArgument()
getArgument in interface TermImplpublic Term getArgument(byte number)
getArgument in interface TermImplnumber - Description of the Parameter
public byte getKind()
getKind in interface TermImplpublic java.lang.String getName()
public Instruction[] getCode()
getCode in interface TermImplpublic boolean isHNF()
isHNF in interface TermImplpublic boolean isNF()
isNF in interface TermImplpublic java.lang.String toString()
toString in class java.lang.Object
public <R,T> R accept(code.term.visitor.TermVisitor<R,T> v,
T o)
accept in interface TermImpl
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||