souffle
2.0.2-371-g6315b36
|
@Class Transformer @Brief abstract transformer class for a translation unit More...
#include <Transformer.h>
Public Member Functions | |
bool | apply (TranslationUnit &translationUnit) |
@Brief apply the transformer to a translation unit @Param translationUnit that will be transformed. More... | |
virtual std::string | getName () const =0 |
@Brief get name of the transformer More... | |
virtual | ~Transformer ()=default |
Protected Member Functions | |
virtual bool | transform (TranslationUnit &translationUnit)=0 |
@Brief transform the translation unit / used by apply @Param translationUnit that will be transformed. More... | |
@Class Transformer @Brief abstract transformer class for a translation unit
This is an abstract class to implement transformers. A transformer takes a translation unit and changes its state.
Transformers can be composed using other transformers.
For debugging purposes, a transformer has a name (this will show up in the debug report) and a protected method transform(), that performs the actual transformation.
The method apply is used to call transform() and does the reporting of the debug information.
Definition at line 50 of file Transformer.h.
|
virtualdefault |
bool souffle::ram::transform::Transformer::apply | ( | TranslationUnit & | translationUnit | ) |
@Brief apply the transformer to a translation unit @Param translationUnit that will be transformed.
@Return flag reporting whether the RAM program has changed
Definition at line 39 of file Transformer.cpp.
Referenced by souffle::ram::transform::HoistAggregateTransformer::hoistAggregate(), and souffle::ram::transform::ParallelTransformer::parallelizeOperations().
|
pure virtual |
@Brief get name of the transformer
Implemented in souffle::ram::transform::IndexedInequalityTransformer, souffle::ram::transform::HoistConditionsTransformer, souffle::ram::transform::MakeIndexTransformer, souffle::ram::transform::ChoiceConversionTransformer, souffle::ram::transform::TransformerSequence, souffle::ram::transform::IfConversionTransformer, souffle::ram::transform::ReorderConditionsTransformer, souffle::ram::transform::EliminateDuplicatesTransformer, souffle::ram::transform::ReorderFilterBreak, souffle::ram::transform::CollapseFiltersTransformer, souffle::ram::transform::ExpandFilterTransformer, souffle::ram::transform::ConditionalTransformer, souffle::ram::transform::ParallelTransformer, souffle::ram::transform::TupleIdTransformer, souffle::ram::transform::LoopTransformer, souffle::ram::transform::ReportIndexTransformer, and souffle::ram::transform::HoistAggregateTransformer.
|
protectedpure virtual |
@Brief transform the translation unit / used by apply @Param translationUnit that will be transformed.
@Return flag reporting whether the RAM program has changed
Implemented in souffle::ram::transform::TransformerSequence, souffle::ram::transform::ConditionalTransformer, souffle::ram::transform::LoopTransformer, souffle::ram::transform::MakeIndexTransformer, souffle::ram::transform::ChoiceConversionTransformer, souffle::ram::transform::HoistConditionsTransformer, souffle::ram::transform::IndexedInequalityTransformer, souffle::ram::transform::IfConversionTransformer, souffle::ram::transform::ReorderConditionsTransformer, souffle::ram::transform::EliminateDuplicatesTransformer, souffle::ram::transform::ReorderFilterBreak, souffle::ram::transform::CollapseFiltersTransformer, souffle::ram::transform::ExpandFilterTransformer, souffle::ram::transform::TupleIdTransformer, souffle::ram::transform::ParallelTransformer, souffle::ram::transform::HoistAggregateTransformer, and souffle::ram::transform::ReportIndexTransformer.