ROSE 0.11.145.147
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType > Class Template Reference

Description

template<class InheritedAttributeType, class SynthesizedAttributeType>
class AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >

Definition at line 66 of file AstCombinedProcessing.h.

Inheritance diagram for AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >:
Inheritance graph
[legend]
Collaboration diagram for AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >:
Collaboration graph
[legend]

Public Types

typedef AstTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType > TraversalType
 
typedef TraversalTypeTraversalPtr
 
typedef std::vector< TraversalPtrTraversalPtrList
 
typedef std::vector< InheritedAttributeType > InheritedAttributeTypeList
 
typedef std::vector< SynthesizedAttributeType > SynthesizedAttributeTypeList
 
typedef AstTopDownBottomUpProcessing< std::vector< InheritedAttributeType > *, std::vector< SynthesizedAttributeType > * > Superclass
 
typedef Superclass::SynthesizedAttributesList SynthesizedAttributesList
 
- Public Types inherited from AstTopDownBottomUpProcessing< std::vector< InheritedAttributeType > *, std::vector< SynthesizedAttributeType > * >
typedef SgTreeTraversal< std::vector< InheritedAttributeType > *, std::vector< SynthesizedAttributeType > * >::SynthesizedAttributesList SynthesizedAttributesList
 
typedef SynthesizedAttributesList SubTreeSynthesizedAttributes
 
- Public Types inherited from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType >
typedef StackFrameVector< SynthesizedAttributeType > SynthesizedAttributesList
 

Public Member Functions

 AstCombinedTopDownBottomUpProcessing ()
 default constructor
 
 AstCombinedTopDownBottomUpProcessing (const TraversalPtrList &)
 constructor that makes an internal copy of an existing list of traversals
 
void addTraversal (TraversalPtr)
 simple function for adding a traversal to the internal list
 
TraversalPtrList & get_traversalPtrListRef ()
 function for obtaining a reference to the internal list of traversals, you can use this for any container operations you like (deleting elements etc.)
 
- Public Member Functions inherited from AstTopDownBottomUpProcessing< std::vector< InheritedAttributeType > *, std::vector< SynthesizedAttributeType > * >
std::vector< SynthesizedAttributeType > * traverse (SgNode *node, std::vector< InheritedAttributeType > * inheritedValue)
 evaluates attributes on the entire AST
 
std::vector< SynthesizedAttributeType > * traverseWithinFile (SgNode *node, std::vector< InheritedAttributeType > * inheritedValue)
 evaluates attributes only at nodes which represent the same file as where the evaluation was started
 
- Public Member Functions inherited from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType >
SynthesizedAttributeType traverse (SgNode *basenode, InheritedAttributeType inheritedValue, t_traverseOrder travOrder=preandpostorder)
 
SynthesizedAttributeType traverseWithinFile (SgNode *basenode, InheritedAttributeType inheritedValue, t_traverseOrder travOrder=preandpostorder)
 
void traverseInputFiles (SgProject *projectNode, InheritedAttributeType inheritedValue, t_traverseOrder travOrder=preandpostorder)
 
 SgTreeTraversal (const SgTreeTraversal &)
 
const SgTreeTraversaloperator= (const SgTreeTraversal &)
 

Protected Member Functions

virtual InheritedAttributeTypeList * evaluateInheritedAttribute (SgNode *astNode, InheritedAttributeTypeList *inheritedValues)
 pure virtual function which must be implemented to compute the inherited attribute at a node
 
virtual SynthesizedAttributeTypeList * evaluateSynthesizedAttribute (SgNode *astNode, InheritedAttributeTypeList *inheritedValues, SynthesizedAttributesList synthesizedAttributes)
 pure virtual function which must be implemented to compute the synthesized attribute at a node.
 
virtual SynthesizedAttributeTypeList * defaultSynthesizedAttribute (InheritedAttributeTypeList *)
 
virtual void atTraversalStart ()
 Function called at the start of the traversal, before any node is visited; override if necessary, the default implementation is a no-op.
 
virtual void atTraversalEnd ()
 
- Protected Member Functions inherited from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType >
virtual InheritedAttributeType evaluateInheritedAttribute (SgNode *astNode, InheritedAttributeType inheritedValue)=0
 
virtual SynthesizedAttributeType evaluateSynthesizedAttribute (SgNode *n, InheritedAttributeType in, SynthesizedAttributesList l)=0
 
virtual void setNodeSuccessors (SgNode *node, SuccessorsContainer &succContainer)
 
virtual SynthesizedAttributeType defaultSynthesizedAttribute (InheritedAttributeType inh)
 
void set_useDefaultIndexBasedTraversal (bool)
 

Protected Attributes

TraversalPtrList traversals
 

Additional Inherited Members

- Protected Types inherited from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType >
typedef AstSuccessorsSelectors::SuccessorsContainer SuccessorsContainer
 
typedef SuccessorsContainer & SuccessorsContainerRef
 

Member Typedef Documentation

◆ TraversalType

template<class InheritedAttributeType , class SynthesizedAttributeType >
typedef AstTopDownBottomUpProcessing<InheritedAttributeType, SynthesizedAttributeType> AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >::TraversalType

Definition at line 70 of file AstCombinedProcessing.h.

◆ TraversalPtr

template<class InheritedAttributeType , class SynthesizedAttributeType >
typedef TraversalType* AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >::TraversalPtr

Definition at line 71 of file AstCombinedProcessing.h.

◆ TraversalPtrList

template<class InheritedAttributeType , class SynthesizedAttributeType >
typedef std::vector<TraversalPtr> AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >::TraversalPtrList

Definition at line 72 of file AstCombinedProcessing.h.

◆ InheritedAttributeTypeList

template<class InheritedAttributeType , class SynthesizedAttributeType >
typedef std::vector<InheritedAttributeType> AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >::InheritedAttributeTypeList

Definition at line 73 of file AstCombinedProcessing.h.

◆ SynthesizedAttributeTypeList

template<class InheritedAttributeType , class SynthesizedAttributeType >
typedef std::vector<SynthesizedAttributeType> AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >::SynthesizedAttributeTypeList

Definition at line 74 of file AstCombinedProcessing.h.

◆ Superclass

template<class InheritedAttributeType , class SynthesizedAttributeType >
typedef AstTopDownBottomUpProcessing<std::vector<InheritedAttributeType> *, std::vector<SynthesizedAttributeType> *> AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >::Superclass

Definition at line 75 of file AstCombinedProcessing.h.

◆ SynthesizedAttributesList

template<class InheritedAttributeType , class SynthesizedAttributeType >
typedef Superclass::SynthesizedAttributesList AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >::SynthesizedAttributesList

Definition at line 76 of file AstCombinedProcessing.h.

Constructor & Destructor Documentation

◆ AstCombinedTopDownBottomUpProcessing()

default constructor

Definition at line 196 of file AstCombinedProcessingImpl.h.

Member Function Documentation

◆ addTraversal()

template<class InheritedAttributeType , class SynthesizedAttributeType >
void AstCombinedTopDownBottomUpProcessing< I, S >::addTraversal ( TraversalPtr  )

simple function for adding a traversal to the internal list

Definition at line 212 of file AstCombinedProcessingImpl.h.

◆ get_traversalPtrListRef()

template<class I , class S >
AstCombinedTopDownBottomUpProcessing< I, S >::TraversalPtrList & AstCombinedTopDownBottomUpProcessing< I, S >::get_traversalPtrListRef ( )

function for obtaining a reference to the internal list of traversals, you can use this for any container operations you like (deleting elements etc.)

Definition at line 220 of file AstCombinedProcessingImpl.h.

◆ evaluateInheritedAttribute()

template<class InheritedAttributeType , class SynthesizedAttributeType >
AstCombinedTopDownBottomUpProcessing< I, S >::InheritedAttributeTypeList * AstCombinedTopDownBottomUpProcessing< I, S >::evaluateInheritedAttribute ( SgNode astNode,
InheritedAttributeTypeList *  inheritedValue 
)
protectedvirtual

◆ evaluateSynthesizedAttribute()

template<class InheritedAttributeType , class SynthesizedAttributeType >
AstCombinedTopDownBottomUpProcessing< I, S >::SynthesizedAttributeTypeList * AstCombinedTopDownBottomUpProcessing< I, S >::evaluateSynthesizedAttribute ( SgNode ,
InheritedAttributeTypeList *  ,
SynthesizedAttributesList   
)
protectedvirtual

pure virtual function which must be implemented to compute the synthesized attribute at a node.

The list of synthesized attributes consists of the synthesized attributes computed at the children node of the current node. The inherited attribute value is computed by evaluateInheritedAttribute at the same node and simply passed to this function. Use the typedef SynthesizedAttributeList as type for the synthesized attributes list.

Implements AstTopDownBottomUpProcessing< std::vector< InheritedAttributeType > *, std::vector< SynthesizedAttributeType > * >.

Definition at line 261 of file AstCombinedProcessingImpl.h.

◆ defaultSynthesizedAttribute()

template<class InheritedAttributeType , class SynthesizedAttributeType >
AstCombinedTopDownBottomUpProcessing< I, S >::SynthesizedAttributeTypeList * AstCombinedTopDownBottomUpProcessing< I, S >::defaultSynthesizedAttribute ( InheritedAttributeTypeList *  )
protectedvirtual

Definition at line 316 of file AstCombinedProcessingImpl.h.

◆ atTraversalStart()

template<class I , class S >
void AstCombinedTopDownBottomUpProcessing< I, S >::atTraversalStart ( )
protectedvirtual

Function called at the start of the traversal, before any node is visited; override if necessary, the default implementation is a no-op.

Reimplemented from AstTopDownBottomUpProcessing< std::vector< InheritedAttributeType > *, std::vector< SynthesizedAttributeType > * >.

Definition at line 334 of file AstCombinedProcessingImpl.h.

◆ atTraversalEnd()

template<class I , class S >
void AstCombinedTopDownBottomUpProcessing< I, S >::atTraversalEnd ( )
protectedvirtual

Member Data Documentation

◆ traversals

template<class InheritedAttributeType , class SynthesizedAttributeType >
TraversalPtrList AstCombinedTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >::traversals
protected

Definition at line 102 of file AstCombinedProcessing.h.


The documentation for this class was generated from the following files: