code.term
Class TermImplUser

java.lang.Object
  extended by code.term.TermImplUser
All Implemented Interfaces:
TermImpl

public class TermImplUser
extends java.lang.Object
implements TermImpl

Term representation for user defined terms.

Since:
June 17, 2003
Author:
Sergio Antoy

Field Summary
private  Term[] argument
           
private  int root
           
 
Constructor Summary
TermImplUser(int root, Term[] argument)
          Constructor for the TermImplUser object
 
Method Summary
<R,T> R
accept(code.term.visitor.TermVisitor<R,T> v, T o)
          Accepts the visitor by passing this term as a parameter to the visit method on the visitor.
 Term[] getArgument()
          Returns the list of arguments for this term.
 Term getArgument(byte number)
          Returns the numberth argument of this term.
 Instruction[] getCode()
          Returns the bytecode in object format used to rewrite this term.
 byte getKind()
          Returns the kind of this term
 int getRoot()
          Returns the root id of this term.
 java.lang.String getRootSymbol()
          Returns the root symbol for this term.
 boolean isHNF()
          Returns true if this term is in head normal form.
 boolean isNF()
          Returns true if this term is in normal form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

private int root

argument

private Term[] argument
Constructor Detail

TermImplUser

public TermImplUser(int root,
                    Term[] argument)
Constructor for the TermImplUser object

Parameters:
root - Description of the Parameter
argument - Description of the Parameter
Method Detail

getRoot

public int getRoot()
Returns the root id of this term.

Specified by:
getRoot in interface TermImpl
Returns:
The root value

getRootSymbol

public java.lang.String getRootSymbol()
Returns the root symbol for this term.

Specified by:
getRootSymbol in interface TermImpl
Returns:
The rootSymbol value

getArgument

public Term[] getArgument()
Returns the list of arguments for this term.

Specified by:
getArgument in interface TermImpl
Returns:
The argument value

getArgument

public Term getArgument(byte number)
Returns the numberth argument of this term.

Specified by:
getArgument in interface TermImpl
Parameters:
number - Description of the Parameter
Returns:
The argument value

getKind

public byte getKind()
Returns the kind of this term

Specified by:
getKind in interface TermImpl
Returns:
The kind value

isHNF

public boolean isHNF()
Returns true if this term is in head normal form.

Specified by:
isHNF in interface TermImpl
Returns:
The hNF value

isNF

public boolean isNF()
Returns true if this term is in normal form.

Specified by:
isNF in interface TermImpl
Returns:
The nF value

getCode

public Instruction[] getCode()
Returns the bytecode in object format used to rewrite this term.

Specified by:
getCode in interface TermImpl
Returns:
The code value

accept

public <R,T> R accept(code.term.visitor.TermVisitor<R,T> v,
                      T o)
Accepts the visitor by passing this term as a parameter to the visit method on the visitor.

Specified by:
accept in interface TermImpl
Returns:
Object