souffle
2.0.2-371-g6315b36
|
Removes Inequalities from Indexed Operations and replaces them with a Filter Operation and empty Indexed Operations are coverted to their Non-Indexed semantic equivalent. More...
#include <IndexedInequality.h>
Public Member Functions | |
std::string | getName () const override |
@Brief get name of the transformer More... | |
bool | transformIndexToFilter (Program &program) |
Converts a box query into a corresponding partial box query operation. 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::IndexAnalysis * | idxAnalysis |
analysis::RelationAnalysis * | relAnalysis |
Removes Inequalities from Indexed Operations and replaces them with a Filter Operation and empty Indexed Operations are coverted to their Non-Indexed semantic equivalent.
If there exists inequality constraints in an Indexed Operation, these constraints will be replaced with a semantically equivalent nested Filter Operation.
Furthermore, if after removing all of these inequality constraints from the Indexed Operation we may find that the Indexed Operation is empty (no constraints). This occurs in the case where an Indexed Operation is composed entirely of inequality constraints. In this situation, the Indexed Operation is empty and replaced with a semantically equivalent Operation. i.e. IndexScan -> Scan
For example,
will be rewritten to
will be rewritten to
Definition at line 76 of file IndexedInequality.h.
|
inlineoverridevirtual |
@Brief get name of the transformer
Implements souffle::ram::transform::Transformer.
Definition at line 78 of file IndexedInequality.h.
|
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 88 of file IndexedInequality.h.
bool souffle::ram::transform::IndexedInequalityTransformer::transformIndexToFilter | ( | Program & | program | ) |
Converts a box query into a corresponding partial box query operation.
This will turn every box query into a filter operation.
Definition at line 41 of file IndexedInequality.cpp.
|
protected |
Definition at line 94 of file IndexedInequality.h.
|
protected |
Definition at line 95 of file IndexedInequality.h.