tip.node
Class PProgram

java.lang.Object
  extended by tip.node.Node
      extended by tip.node.PProgram
All Implemented Interfaces:
Cloneable, NodeInterface
Direct Known Subclasses:
AProgram

public abstract class PProgram
extends Node

PProgram is the super class of all program classes.


Constructor Summary
PProgram()
           
 
Method Summary
abstract  PProgram clone()
          Returns a deep clone of this PProgram node.
abstract  PProgram clone(Map<Node,Node> oldToNewMap)
          Creates a deep clone of this PProgram node while putting all old node-new node relations in the map oldToNewMap.
abstract  int[] getCode()
          Returns the code field of this PProgram node.
abstract  Map<String,AFuncDecl> getFunctionEnv()
          Returns the function_env field of this PProgram node.
abstract  LinkedList<AFuncDecl> getFunctions()
          Returns the possibly empty list of AFuncDecl nodes that are the functions children of this PProgram node.
 NodeEnum kindNode()
          Returns the NodeEnum corresponding to the type of this Node node.
abstract  void setCode(int[] value)
          Sets the code field of this PProgram node.
abstract  void setFunctionEnv(Map<String,AFuncDecl> value)
          Sets the function_env field of this PProgram node.
abstract  void setFunctions(List<? extends AFuncDecl> value)
          Sets the functions children of this PProgram node.
 
Methods inherited from class tip.node.Node
apply, apply, apply, apply, checkOptionalInvariant, getAncestor, getAncestor, getAncestor, getChildren, getChildren, getChildren, getDescendants, getDescendants, getDescendants, getDescendants, isOptionalInvariant, parent, replaceBy, setOptionalInvariant
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PProgram

public PProgram()
Method Detail

clone

public abstract PProgram clone()
Returns a deep clone of this PProgram node.

Specified by:
clone in interface NodeInterface
Specified by:
clone in class Node
Returns:
a deep clone of this PProgram node

clone

public abstract PProgram clone(Map<Node,Node> oldToNewMap)
Creates a deep clone of this PProgram node while putting all old node-new node relations in the map oldToNewMap.

Specified by:
clone in interface NodeInterface
Specified by:
clone in class Node
Parameters:
oldToNewMap - the map filled with the old node-new node relation
Returns:
a deep clone of this PProgram node

getFunctions

public abstract LinkedList<AFuncDecl> getFunctions()
Returns the possibly empty list of AFuncDecl nodes that are the functions children of this PProgram node.

Returns:
the possibly empty list of AFuncDecl nodes that are the functions children of this PProgram node

setFunctions

public abstract void setFunctions(List<? extends AFuncDecl> value)
Sets the functions children of this PProgram node.

Parameters:
value - the new functions children of this PProgram node

getFunctionEnv

public abstract Map<String,AFuncDecl> getFunctionEnv()
Returns the function_env field of this PProgram node.

Returns:
the function_env field of this PProgram node

setFunctionEnv

public abstract void setFunctionEnv(Map<String,AFuncDecl> value)
Sets the function_env field of this PProgram node.

Parameters:
value - the new function_env field of this PProgram node

getCode

public abstract int[] getCode()
Returns the code field of this PProgram node.

Returns:
the code field of this PProgram node

setCode

public abstract void setCode(int[] value)
Sets the code field of this PProgram node.

Parameters:
value - the new code field of this PProgram node

kindNode

public NodeEnum kindNode()
Returns the NodeEnum corresponding to the type of this Node node.

Specified by:
kindNode in class Node
Returns:
the NodeEnum for this node