code.term
Class TermImplBuiltin

java.lang.Object
  extended by code.term.TermImplBuiltin
All Implemented Interfaces:
TermImpl
Direct Known Subclasses:
TermImplChar, TermImplFloat, TermImplInt, TermImplOpaque, TermImplString

public abstract class TermImplBuiltin
extends java.lang.Object
implements TermImpl

Term representation for built in terms (eg ints, chars, ect).

Since:
June 17, 2003
Author:
Sergio Antoy

Field Summary
private static java.lang.IllegalStateException argException
           
 
Constructor Summary
protected TermImplBuiltin()
          Creates a new TepmImplBuiltin.
 
Method Summary
 Term[] getArgument()
          Gets the argument attribute of the TermImplBuiltin object
 Term getArgument(byte number)
          Throws the argument exception since built ins do not have arguments
 Instruction[] getCode()
          This is no code for rewritting builtins so this returns an empty list.
 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 of this term.
 boolean isHNF()
          Returns true since all builtins are in head normal form.
 boolean isNF()
          Returns true since all builtins are in normal form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface code.term.TermImpl
accept
 

Field Detail

argException

private static final java.lang.IllegalStateException argException
Constructor Detail

TermImplBuiltin

protected TermImplBuiltin()
Creates a new TepmImplBuiltin.

Method Detail

getRootSymbol

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

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

getRoot

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

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

getArgument

public Term[] getArgument()
Gets the argument attribute of the TermImplBuiltin object

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

getArgument

public Term getArgument(byte number)
Throws the argument exception since built ins do not have arguments

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 since all builtins are in head normal form.

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

isNF

public boolean isNF()
Returns true since all builtins are in normal form.

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

getCode

public Instruction[] getCode()
This is no code for rewritting builtins so this returns an empty list.

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