harpoon.Tools.PatMat
Class Spec.StmData

java.lang.Object
  extended by harpoon.Tools.PatMat.Spec.Stm
      extended by harpoon.Tools.PatMat.Spec.StmData
Enclosing class:
Spec

public static class Spec.StmData
extends Spec.Stm

Extension of Spec.Stm representing a raw datum in memory.

See Also:
DATUM

Field Summary
 Spec.Exp data
          A IR.Tree.CONST or IR.Tree.NAME specifying the value with which to initialize this location.
 
Constructor Summary
Spec.StmData(Spec.Exp data)
          Constructs a new Spec.StmData.
 
Method Summary
 void accept(Spec.StmVisitor v)
          Applies v's visit method to this.
 Spec.Stm build(Spec.ExpList kids)
          Creates a new Spec.Stm similar to this one, using the provided Spec.ExpList of children.
 boolean canBeRootOfData()
          Checks if this Stm object is valid for Data patterns.
 Spec.ExpList kids()
          Creates an Spec.ExpList of children of this Spec.Stm.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

public final Spec.Exp data
A IR.Tree.CONST or IR.Tree.NAME specifying the value with which to initialize this location.

Constructor Detail

Spec.StmData

public Spec.StmData(Spec.Exp data)
Constructs a new Spec.StmData.

Parameters:
data - Value expression.
Method Detail

accept

public void accept(Spec.StmVisitor v)
Description copied from class: Spec.Stm
Applies v's visit method to this. This is effectively a gludge to emulate multiple dispatch. Must be reimplemented by all subclasses of Spec.Stm.
effects: Calls v.visit(this).

Specified by:
accept in class Spec.Stm
See Also:
"Design Patterns pgs. 331-344"

build

public Spec.Stm build(Spec.ExpList kids)
Description copied from class: Spec.Stm
Creates a new Spec.Stm similar to this one, using the provided Spec.ExpList of children.

Specified by:
build in class Spec.Stm

kids

public Spec.ExpList kids()
Description copied from class: Spec.Stm
Creates an Spec.ExpList of children of this Spec.Stm.

Specified by:
kids in class Spec.Stm

toString

public String toString()
Overrides:
toString in class Object

canBeRootOfData

public boolean canBeRootOfData()
Description copied from class: Spec.Stm
Checks if this Stm object is valid for Data patterns. Most patterns are for code generation, not data tables. Specific subclasses of Stm that wish to be matched when generating data tables should override this method to return true.

Overrides:
canBeRootOfData in class Spec.Stm