souffle  2.0.2-371-g6315b36
Provenance.h
Go to the documentation of this file.
1 /*
2  * Souffle - A Datalog Compiler
3  * Copyright (c) 2017, 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 Provenance.h
12  *
13  * Transformation pass to add provenance information
14  *
15  ***********************************************************************/
16 
17 #pragma once
18 
19 #include "ast/TranslationUnit.h"
21 #include <string>
22 
23 namespace souffle::ast::transform {
24 
25 /**
26  * Transformation pass to add provenance information
27  */
28 class ProvenanceTransformer : public Transformer {
29 public:
30  std::string getName() const override {
31  return "ProvenanceTransformer";
32  }
33 
34  ProvenanceTransformer* clone() const override {
35  return new ProvenanceTransformer();
36  }
37 
38 private:
39  bool transform(TranslationUnit& translationUnit) override;
40  bool transformMaxHeight(TranslationUnit& translationUnit);
41 };
42 
43 } // namespace souffle::ast::transform
souffle::ast::transform::ProvenanceTransformer::getName
std::string getName() const override
Definition: Provenance.h:42
souffle::ast::transform::ProvenanceTransformer
Transformation pass to add provenance information.
Definition: Provenance.h:34
TranslationUnit.h
souffle::ast::transform::ProvenanceTransformer::transformMaxHeight
bool transformMaxHeight(TranslationUnit &translationUnit)
Definition: Provenance.cpp:273
Transformer.h
souffle::ast::transform::ProvenanceTransformer::clone
ProvenanceTransformer * clone() const override
Definition: Provenance.h:46
souffle::ast::TranslationUnit
Translation unit class for the translation pipeline.
Definition: TranslationUnit.h:51
souffle::ast::transform
Definition: Program.h:45
souffle::ast::transform::ProvenanceTransformer::transform
bool transform(TranslationUnit &translationUnit) override
Definition: Provenance.cpp:355