souffle  2.0.2-371-g6315b36
AuxArity.cpp
Go to the documentation of this file.
1 /*
2  * Souffle - A Datalog Compiler
3  * Copyright (c) 2020, 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 AuxArity.cpp
12  *
13  * Implementation of AST analyses classes
14  *
15  ***********************************************************************/
16 
17 #include "ast/analysis/AuxArity.h"
18 #include "Global.h"
19 
20 namespace souffle::ast::analysis {
21 
22 size_t AuxiliaryArityAnalysis::computeArity(const Relation* /* relation */) const {
23  if (Global::config().has("provenance")) {
24  return 2;
25  } else {
26  return 0;
27  }
28 }
29 
30 } // namespace souffle::ast::analysis
Global.h
AuxArity.h
souffle::ast::analysis::AuxiliaryArityAnalysis::computeArity
size_t computeArity(const Relation *relation) const
Returns the number of auxiliary parameters of a relation.
Definition: AuxArity.cpp:28
souffle::Global::config
static MainConfig & config()
Definition: Global.h:141
souffle::ast::analysis
Definition: Aggregate.cpp:39