souffle
2.0.2-371-g6315b36
|
Reorders conjunctive terms depending on cost, i.e., cheap terms should be executed first. More...
#include <ReorderConditions.h>
Public Member Functions | |
std::string | getName () const override |
@Brief get name of the transformer More... | |
bool | reorderConditions (Program &program) |
Reorder conjunctive terms in filter operations. 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... | |
Protected Attributes | |
analysis::ComplexityAnalysis * | rca {nullptr} |
Reorders conjunctive terms depending on cost, i.e., cheap terms should be executed first.
For example ..
will be rewritten to
where C(i(1)) <= C(i(2)) <= .... <= C(i(N)).
The terms are sorted according to their complexity class.
Definition at line 58 of file ReorderConditions.h.
|
inlineoverridevirtual |
@Brief get name of the transformer
Implements souffle::ram::transform::Transformer.
Definition at line 60 of file ReorderConditions.h.
bool souffle::ram::transform::ReorderConditionsTransformer::reorderConditions | ( | Program & | program | ) |
Reorder conjunctive terms in filter operations.
program | Program that is transformed |
Definition at line 36 of file ReorderConditions.cpp.
References b, souffle::clone(), souffle::filter(), souffle::ram::toCondition(), and souffle::ram::toConjunctionList().
|
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.
Definition at line 75 of file ReorderConditions.h.
|
protected |
Definition at line 73 of file ReorderConditions.h.