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

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.ControlPlace
Direct Known Subclasses:
CatchPlace, IfPlaces.ElsePlace, IfPlaces.ThenPlace, LetPlaces.InPlace, ThrowPlace

public class ControlPlace
extends LocalPlace

A ControlPlace is associated with a location in the CG AST such as the then or else (but not condition) ig a CGIfExp at which child nodes cannot be hoisted without violating control dependencies.


Field Summary
protected  HashedAnalyses hashedAnalyses
           
protected  LocalPlace parentPlace
           
protected  CGValuedElement placedElement
           
 
Fields inherited from class org.eclipse.ocl.examples.codegen.cse.LocalPlace
globalPlace
 
Constructor Summary
ControlPlace(LocalPlace parentPlace, CGValuedElement cgElement)
           
 
Method Summary
 void addAnalysis(AbstractAnalysis anAnalysis)
           
static AbstractPlace createControlPlace(java.util.Map<CGElement,AbstractPlace> element2place, CGValuedElement cgElement)
           
static ControlPlace getControlPlace(java.util.Map<CGElement,AbstractPlace> element2place, CGValuedElement cgElement)
           
 int getDepth()
           
 HashedAnalyses getHashedAnalyses()
           
 LocalPlace getParentPlace()
          Return the parent of this place, which is self for the GlobalPlace.
 SimpleAnalysis getSimpleAnalysis()
           
 StackPlace getStackPlace()
          Return the stack place hosting this place.
 void printHierarchy(java.lang.Appendable appendable, java.lang.String indentation)
           
 void prune()
          Filter the element analyses to discard non-SharedAnalysis and to return a partitioning of the results by minimum depth.
 void pullUp()
          Pull up all redundant child analyses that are visible in a parent to the parent.
 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, pushUp
 
Methods inherited from class org.eclipse.ocl.examples.codegen.cse.AbstractPlace
getControlPlace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parentPlace

@NonNull
protected final LocalPlace parentPlace

placedElement

@NonNull
protected final CGValuedElement placedElement

hashedAnalyses

@NonNull
protected final HashedAnalyses hashedAnalyses
Constructor Detail

ControlPlace

public ControlPlace(@NonNull
                    LocalPlace parentPlace,
                    @NonNull
                    CGValuedElement cgElement)
Method Detail

createControlPlace

@NonNull
public static AbstractPlace createControlPlace(@NonNull
                                                       java.util.Map<CGElement,AbstractPlace> element2place,
                                                       @NonNull
                                                       CGValuedElement cgElement)

getControlPlace

@NonNull
public static ControlPlace getControlPlace(@NonNull
                                                   java.util.Map<CGElement,AbstractPlace> element2place,
                                                   @NonNull
                                                   CGValuedElement cgElement)

addAnalysis

public void addAnalysis(@NonNull
                        AbstractAnalysis anAnalysis)

getDepth

public int getDepth()

getHashedAnalyses

@NonNull
public HashedAnalyses getHashedAnalyses()

getParentPlace

@NonNull
public LocalPlace getParentPlace()
Description copied from class: AbstractPlace
Return the parent of this place, which is self for the GlobalPlace.

Specified by:
getParentPlace in class AbstractPlace

getSimpleAnalysis

@NonNull
public SimpleAnalysis getSimpleAnalysis()

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()
Filter the element analyses to discard non-SharedAnalysis and to return a partitioning of the results by minimum depth.

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

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