org.eclipse.ocl.examples.codegen.cse
Class StackPlace

java.lang.Object
  extended by org.eclipse.ocl.examples.codegen.cse.AbstractPlace
      extended by org.eclipse.ocl.examples.codegen.cse.LocalPlace
          extended by org.eclipse.ocl.examples.codegen.cse.StackPlace
Direct Known Subclasses:
InnerStackPlace, OuterStackPlace

public abstract class StackPlace
extends LocalPlace


Field Summary
protected  CGElement stackElement
           
 
Fields inherited from class org.eclipse.ocl.examples.codegen.cse.LocalPlace
globalPlace
 
Constructor Summary
protected StackPlace(GlobalPlace globalPlace, CGElement stackElement)
           
 
Method Summary
static StackPlace createStackPlace(java.util.Map<CGElement,AbstractPlace> element2place, CGParameter cgParameter)
           
 CGElement getStackElement()
           
 StackPlace getStackPlace()
          Return the stack place hosting this place.
 void printHierarchy(java.lang.Appendable appendable, java.lang.String indentation)
           
 void prune()
          Eliminate CSE candidates that are not shared and do not need to be CSEs.
 void pullUp()
          Pull up all redundant child analyses that are visible in a parent to the parent.
 void pushUp()
          Push shareable analyses up the place tree.
 void rewrite()
          Rewrite the expression trees to exploit the CSEs.
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ocl.examples.codegen.cse.LocalPlace
addControlPlace, createLocalPlace, getGlobalPlace, getGlobalPlace, getLocalPlace, getLocalPlace
 
Methods inherited from class org.eclipse.ocl.examples.codegen.cse.AbstractPlace
getControlPlace, getParentPlace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stackElement

@NonNull
protected final CGElement stackElement
Constructor Detail

StackPlace

protected StackPlace(@NonNull
                     GlobalPlace globalPlace,
                     @NonNull
                     CGElement stackElement)
Method Detail

createStackPlace

@NonNull
public static StackPlace createStackPlace(@NonNull
                                                  java.util.Map<CGElement,AbstractPlace> element2place,
                                                  @NonNull
                                                  CGParameter cgParameter)

getStackElement

@NonNull
public CGElement getStackElement()

getStackPlace

@NonNull
public StackPlace getStackPlace()
Description copied from class: AbstractPlace
Return the stack place hosting this place. Returns for the GlobalPlace..

Specified by:
getStackPlace in class LocalPlace

printHierarchy

public void printHierarchy(@NonNull
                           java.lang.Appendable appendable,
                           @NonNull
                           java.lang.String indentation)
Overrides:
printHierarchy in class LocalPlace

prune

public void prune()
Description copied from class: LocalPlace
Eliminate CSE candidates that are not shared and do not need to be CSEs. For the retained CSEs select the shallowest candidate as the actaul CSE.

Overrides:
prune in class LocalPlace

pullUp

public void pullUp()
Description copied from class: LocalPlace
Pull up all redundant child analyses that are visible in a parent to the parent.

Overrides:
pullUp in class LocalPlace

pushUp

public void pushUp()
Description copied from class: LocalPlace
Push shareable analyses up the place tree. e.g. something on both then and else arms of an if can be pushed up.

Overrides:
pushUp in class LocalPlace

rewrite

public void rewrite()
Description copied from class: LocalPlace
Rewrite the expression trees to exploit the CSEs.

Overrides:
rewrite in class LocalPlace

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object