souffle
2.0.2-371-g6315b36
|
Ordering tupleIds in TupleOperation operations correctly. More...
#include <TupleId.h>
Public Member Functions | |
std::string | getName () const override |
@Brief get name of the transformer More... | |
bool | reorderOperations (Program &program) |
Apply tupleId reordering to the whole program. More... | |
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 Member Functions | |
bool | transform (TranslationUnit &translationUnit) override |
@Brief transform the translation unit / used by apply @Param translationUnit that will be transformed. More... | |
Ordering tupleIds in TupleOperation operations correctly.
Transformations, like MakeIndex and IfConversion do not ensure that TupleOperations maintain an appropriate order with respect to their tupleId's
For example: SEARCH ... (tupleId = 2) ... SEARCH ... (tupleId = 1) ...
Will be converted to SEARCH ... (tupleId = 0) ... SEARCH ... (tupleId = 1) ...
|
inlineoverridevirtual |
@Brief get name of the transformer
Implements souffle::ram::transform::Transformer.
Definition at line 51 of file TupleId.h.
bool souffle::ram::transform::TupleIdTransformer::reorderOperations | ( | Program & | program | ) |
Apply tupleId reordering to the whole program.
RAM | program |
Search for TupleOperations and TupleElements and rewrite their tupleIds
Definition at line 33 of file TupleId.cpp.
References souffle::ram::TupleOperation::getTupleId(), and souffle::ram::TupleOperation::setTupleId().
|
inlineoverrideprotectedvirtual |
@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.