souffle  2.0.2-371-g6315b36
ReportIndex.h
Go to the documentation of this file.
1 /*
2  * Souffle - A Datalog Compiler
3  * Copyright (c) 2018, The Souffle Developers. All rights reserved
4  * Licensed under the Universal Permissive License v 1.0 as shown at:
5  * - https://opensource.org/licenses/UPL
6  * - <souffle root>/licenses/SOUFFLE-UPL.txt
7  */
8 
9 /************************************************************************
10  *
11  * @file ReportIndex.h
12  *
13  ***********************************************************************/
14 
15 #pragma once
16 
17 #include "ram/Condition.h"
18 #include "ram/Expression.h"
19 #include "ram/Operation.h"
20 #include "ram/Program.h"
21 #include "ram/TranslationUnit.h"
23 #include "ram/analysis/Index.h"
24 #include "ram/analysis/Level.h"
26 #include <cstddef>
27 #include <memory>
28 #include <string>
29 #include <utility>
30 #include <vector>
31 
32 namespace souffle::ram::transform {
33 
34 /**
35  * @class ReportIndexSetsTransformer
36  * @brief does not transform the program but reports on the index sets
37  * if the debug-report flag is enabled.
38  *
39  */
40 class ReportIndexTransformer : public Transformer {
41 public:
42  std::string getName() const override {
43  return "ReportIndexTransformer";
44  }
45 
46 protected:
47  bool transform(TranslationUnit& translationUnit) override {
48  translationUnit.getAnalysis<analysis::IndexAnalysis>();
49  return false;
50  }
51 };
52 
53 } // namespace souffle::ram::transform
souffle::ram::transform
Definition: ChoiceConversion.cpp:30
souffle::ram::TranslationUnit::getAnalysis
Analysis * getAnalysis() const
Get an analysis.
Definition: TranslationUnit.h:66
Index.h
souffle::ram::transform::ReportIndexTransformer::getName
std::string getName() const override
@Brief get name of the transformer
Definition: ReportIndex.h:46
Program.h
souffle::ram::TranslationUnit
Translating a RAM program.
Definition: TranslationUnit.h:55
Complexity.h
souffle::ram::analysis::IndexAnalysis
Definition: Index.h:413
Condition.h
TranslationUnit.h
Transformer.h
Operation.h
souffle::ram::transform::ReportIndexTransformer::transform
bool transform(TranslationUnit &translationUnit) override
@Brief transform the translation unit / used by apply @Param translationUnit that will be transformed...
Definition: ReportIndex.h:51
Expression.h
Level.h