souffle  2.0.2-371-g6315b36
RemoveBooleanConstraints.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 RemoveBooleanConstraints.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 remove constant boolean constraints
25  * Should be called after any transformation that may generate boolean constraints
26  */
27 class RemoveBooleanConstraintsTransformer : public Transformer {
28 public:
29  std::string getName() const override {
30  return "RemoveBooleanConstraintsTransformer";
31  }
32 
33  RemoveBooleanConstraintsTransformer* clone() const override {
35  }
36 
37 private:
38  bool transform(TranslationUnit& translationUnit) override;
39 };
40 
41 } // namespace souffle::ast::transform
TranslationUnit.h
souffle::ast::transform::RemoveBooleanConstraintsTransformer
Transformation pass to remove constant boolean constraints Should be called after any transformation ...
Definition: RemoveBooleanConstraints.h:31
Transformer.h
souffle::ast::transform::RemoveBooleanConstraintsTransformer::clone
RemoveBooleanConstraintsTransformer * clone() const override
Definition: RemoveBooleanConstraints.h:41
souffle::ast::TranslationUnit
Translation unit class for the translation pipeline.
Definition: TranslationUnit.h:51
souffle::ast::transform
Definition: Program.h:45
souffle::ast::transform::RemoveBooleanConstraintsTransformer::getName
std::string getName() const override
Definition: RemoveBooleanConstraints.h:37
souffle::ast::transform::RemoveBooleanConstraintsTransformer::transform
bool transform(TranslationUnit &translationUnit) override
Definition: RemoveBooleanConstraints.cpp:42