Template Class AstBottomUpProcessing#

Inheritance Relationships#

Base Type#

Derived Types#

Class Documentation#

template<class SynthesizedAttributeType>
class AstBottomUpProcessing : public SgTreeTraversal<DummyAttribute, SynthesizedAttributeType>#

Subclassed by AstReverseBranchSynProcessing< DS >, AstReversePrefixSynProcessing< DS >, SgBottomUpProcessing< AstNodePtrSynAttr >, SgBottomUpProcessing< ConstantUnFoldingSynthesizedAttribute >, AstReverseBranchSynProcessing< SynthesizedAttributeType >, AstReversePrefixSynProcessing< SynthesizedAttributeType >, SgBottomUpProcessing< SynthesizedAttributeType >

Public Types

typedef SgTreeTraversal<DummyAttribute, SynthesizedAttributeType>::SynthesizedAttributesList SynthesizedAttributesList#
typedef SynthesizedAttributesList SubTreeSynthesizedAttributes#

Public Functions

SynthesizedAttributeType traverse(SgNode *node)#

evaluates attributes on the entire AST

SynthesizedAttributeType traverseWithinFile(SgNode *node)#

evaluates attributes only at nodes which represent the same file as where the evaluation was started

void traverseInputFiles(SgProject *projectNode)#

evaluates attributes only at nodes which represent files which were specified on the command line (=input files).

Protected Functions

virtual SynthesizedAttributeType evaluateSynthesizedAttribute(SgNode*, SynthesizedAttributesList) = 0#

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 the function evaluateInheritedAttribute at the same node and simply passed to this function. Use the typedef SynthesizedAttributeList as type for the synthesized attributes list.

virtual SynthesizedAttributeType defaultSynthesizedAttribute()#

Allows to provide a default value for a synthesized attribute of primitive type (e.g. int, bool, etc.). If a class is used as type for a synthesized attribute the default constructor of this class is sufficient and this function does not have be implemented.

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()#

Friends

friend class AstCombinedBottomUpProcessing< SynthesizedAttributeType >
friend class DistributedMemoryAnalysisPostTraversal< SynthesizedAttributeType >