souffle  2.0.2-371-g6315b36
GroundedTermsChecker.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 GroundedTermsChecker.h
12  *
13  * Defines the grounded terms checker pass.
14  *
15  ***********************************************************************/
16 
17 #pragma once
18 
19 #include "ast/TranslationUnit.h"
21 #include <string>
22 
23 namespace souffle::ast::transform {
24 
25 class GroundedTermsChecker : public Transformer {
26 public:
27  std::string getName() const override {
28  return "GroundedTermsChecker";
29  }
30 
31  // `apply` but doesn't immediately bail if any errors are found.
32  void verify(TranslationUnit& translationUnit);
33 
34  GroundedTermsChecker* clone() const override {
35  return new GroundedTermsChecker();
36  }
37 
38 private:
39  bool transform(TranslationUnit& translationUnit) override {
40  verify(translationUnit);
41  return false;
42  }
43 };
44 
45 } // namespace souffle::ast::transform
souffle::ast::transform::GroundedTermsChecker::getName
std::string getName() const override
Definition: GroundedTermsChecker.h:39
TranslationUnit.h
Transformer.h
souffle::ast::TranslationUnit
Translation unit class for the translation pipeline.
Definition: TranslationUnit.h:51
souffle::ast::transform
Definition: Program.h:45
souffle::ast::transform::GroundedTermsChecker::transform
bool transform(TranslationUnit &translationUnit) override
Definition: GroundedTermsChecker.h:51
souffle::ast::transform::GroundedTermsChecker::verify
void verify(TranslationUnit &translationUnit)
Definition: GroundedTermsChecker.cpp:41
souffle::ast::transform::GroundedTermsChecker
Definition: GroundedTermsChecker.h:31
souffle::ast::transform::GroundedTermsChecker::clone
GroundedTermsChecker * clone() const override
Definition: GroundedTermsChecker.h:46