souffle  2.0.2-371-g6315b36
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
souffle::ast::analysis::AuxiliaryArityAnalysis Class Reference

Determine the auxiliary arity for relations. More...

#include <AuxArity.h>

Inheritance diagram for souffle::ast::analysis::AuxiliaryArityAnalysis:
Inheritance graph
Collaboration diagram for souffle::ast::analysis::AuxiliaryArityAnalysis:
Collaboration graph

Public Member Functions

 AuxiliaryArityAnalysis ()
 
size_t getArity (const Atom *atom) const
 Returns the number of auxiliary parameters of an atom's relation. More...
 
size_t getArity (const Relation *relation) const
 Returns the number of auxiliary parameters of a relation. More...
 
void run (const TranslationUnit &translationUnit) override
 run analysis for a Ast translation unit More...
 
- Public Member Functions inherited from souffle::ast::analysis::Analysis
 Analysis (std::string identifier)
 
virtual const std::string & getName () const
 get name of the analysis More...
 
virtual void print (std::ostream &) const
 print the analysis result in HTML format More...
 
virtual ~Analysis ()=default
 

Static Public Attributes

static constexpr const char * name = "auxiliary-arity"
 

Private Member Functions

size_t computeArity (const Relation *relation) const
 Returns the number of auxiliary parameters of a relation. More...
 

Private Attributes

const Programprogram = nullptr
 

Additional Inherited Members

- Protected Attributes inherited from souffle::ast::analysis::Analysis
const std::string identifier
 

Detailed Description

Determine the auxiliary arity for relations.

Definition at line 38 of file AuxArity.h.

Constructor & Destructor Documentation

◆ AuxiliaryArityAnalysis()

souffle::ast::analysis::AuxiliaryArityAnalysis::AuxiliaryArityAnalysis ( )
inline

Definition at line 48 of file AuxArity.h.

56 {

Member Function Documentation

◆ computeArity()

size_t souffle::ast::analysis::AuxiliaryArityAnalysis::computeArity ( const Relation relation) const
private

Returns the number of auxiliary parameters of a relation.

Parameters
relationthe relation to report on
Returns
number of auxiliary attributes

Definition at line 28 of file AuxArity.cpp.

Referenced by run().

◆ getArity() [1/2]

size_t souffle::ast::analysis::AuxiliaryArityAnalysis::getArity ( const Atom atom) const
inline

Returns the number of auxiliary parameters of an atom's relation.

Parameters
atomthe atom to report on
Returns
number of auxiliary attributes

Definition at line 59 of file AuxArity.h.

60  :
61  /**

◆ getArity() [2/2]

size_t souffle::ast::analysis::AuxiliaryArityAnalysis::getArity ( const Relation relation) const
inline

Returns the number of auxiliary parameters of a relation.

Parameters
relationthe relation to report on
Returns
number of auxiliary attributes

Definition at line 68 of file AuxArity.h.

◆ run()

void souffle::ast::analysis::AuxiliaryArityAnalysis::run ( const TranslationUnit )
inlineoverridevirtual

run analysis for a Ast translation unit

Implements souffle::ast::analysis::Analysis.

Definition at line 50 of file AuxArity.h.

56  {

References computeArity(), and relation.

Here is the call graph for this function:

Field Documentation

◆ name

constexpr const char* souffle::ast::analysis::AuxiliaryArityAnalysis::name = "auxiliary-arity"
staticconstexpr

Definition at line 46 of file AuxArity.h.

◆ program

const Program* souffle::ast::analysis::AuxiliaryArityAnalysis::program = nullptr
private

Definition at line 80 of file AuxArity.h.


The documentation for this class was generated from the following files: