souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Attributes
souffle::ram::transform::TransformerSequence Class Reference

@Class TransformerSequence @Brief Composite sequence transformer More...

#include <Sequence.h>

Inheritance diagram for souffle::ram::transform::TransformerSequence:
Inheritance graph
Collaboration diagram for souffle::ram::transform::TransformerSequence:
Collaboration graph

Public Member Functions

std::string getName () const override
 @Brief get name of the transformer More...
 
bool transform (TranslationUnit &tU) override
 @Brief transform the translation unit / used by apply @Param translationUnit that will be transformed. More...
 
 TransformerSequence ()=default
 
template<typename... Tfs>
 TransformerSequence (Own< Tfs > &&... tf)
 
- Public Member Functions inherited from souffle::ram::transform::Transformer
bool apply (TranslationUnit &translationUnit)
 @Brief apply the transformer to a translation unit @Param translationUnit that will be transformed. More...
 
virtual ~Transformer ()=default
 

Protected Attributes

VecOwn< Transformertransformers
 sequence of transformers More...
 

Additional Inherited Members

Detailed Description

@Class TransformerSequence @Brief Composite sequence transformer

A sequence of transformations is applied to a translation unit sequentially. The last transformation decides the outcome whether the code has been changed.

Definition at line 43 of file Sequence.h.

Constructor & Destructor Documentation

◆ TransformerSequence() [1/2]

template<typename... Tfs>
souffle::ram::transform::TransformerSequence::TransformerSequence ( Own< Tfs > &&...  tf)
inline

Definition at line 52 of file Sequence.h.

54  {
55  bool changed = false;
56  // The last transformer decides the status
57  // of the change flag.
58  // Note that for other semantics, new transformer
59  // sequence class needs to be introduced.
60  for (auto const& cur : transformers) {
61  changed = cur->apply(tU);

◆ TransformerSequence() [2/2]

souffle::ram::transform::TransformerSequence::TransformerSequence ( )
default

Member Function Documentation

◆ getName()

std::string souffle::ram::transform::TransformerSequence::getName ( ) const
inlineoverridevirtual

@Brief get name of the transformer

Implements souffle::ram::transform::Transformer.

Definition at line 63 of file Sequence.h.

66  :
67  /** sequence of transformers */

◆ transform()

bool souffle::ram::transform::TransformerSequence::transform ( TranslationUnit translationUnit)
inlineoverridevirtual

@Brief transform the translation unit / used by apply @Param translationUnit that will be transformed.

@Return flag reporting whether the RAM program has changed

Implements souffle::ram::transform::Transformer.

Definition at line 66 of file Sequence.h.

66  :
67  /** sequence of transformers */
68  VecOwn<Transformer> transformers;
69 };
70 
71 } // namespace souffle::ram::transform

Field Documentation

◆ transformers

VecOwn<Transformer> souffle::ram::transform::TransformerSequence::transformers
protected

sequence of transformers

Definition at line 80 of file Sequence.h.


The documentation for this class was generated from the following file:
souffle::ram::transform::TransformerSequence::transformers
VecOwn< Transformer > transformers
sequence of transformers
Definition: Sequence.h:80