souffle  2.0.2-371-g6315b36
UniqueAggregationVariables.h
Go to the documentation of this file.
1 /*
2  * Souffle - A Datalog Compiler
3  * Copyright (c) 2015, Oracle and/or its affiliates. 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 UniqueAggregationVariables.h
12  *
13  ***********************************************************************/
14 
15 #pragma once
16 
17 #include "ast/TranslationUnit.h"
19 #include <string>
20 
21 namespace souffle::ast::transform {
22 
23 /**
24  * Transformation pass to rename aggregation variables to make them unique.
25  */
26 class UniqueAggregationVariablesTransformer : public Transformer {
27 public:
28  std::string getName() const override {
29  return "UniqueAggregationVariablesTransformer";
30  }
31 
34  }
35 
36 private:
37  bool transform(TranslationUnit& translationUnit) override;
38 };
39 
40 } // namespace souffle::ast::transform
TranslationUnit.h
souffle::ast::transform::UniqueAggregationVariablesTransformer::clone
UniqueAggregationVariablesTransformer * clone() const override
Definition: UniqueAggregationVariables.h:40
souffle::ast::transform::UniqueAggregationVariablesTransformer::transform
bool transform(TranslationUnit &translationUnit) override
Renames all local variables of the aggregate to something unique, so that the scope of the local vari...
Definition: UniqueAggregationVariables.cpp:38
Transformer.h
souffle::ast::transform::UniqueAggregationVariablesTransformer
Transformation pass to rename aggregation variables to make them unique.
Definition: UniqueAggregationVariables.h:30
souffle::ast::TranslationUnit
Translation unit class for the translation pipeline.
Definition: TranslationUnit.h:51
souffle::ast::transform
Definition: Program.h:45
souffle::ast::transform::UniqueAggregationVariablesTransformer::getName
std::string getName() const override
Definition: UniqueAggregationVariables.h:36