souffle  2.0.2-371-g6315b36
Public Member Functions | Private Member Functions
souffle::ast::transform::RemoveRedundantRelationsTransformer Class Reference

Transformation pass to remove relations which are redundant (do not contribute to output). More...

#include <RemoveRedundantRelations.h>

Inheritance diagram for souffle::ast::transform::RemoveRedundantRelationsTransformer:
Inheritance graph
Collaboration diagram for souffle::ast::transform::RemoveRedundantRelationsTransformer:
Collaboration graph

Public Member Functions

RemoveRedundantRelationsTransformerclone () const override
 
std::string getName () const override
 
- Public Member Functions inherited from souffle::ast::transform::Transformer
bool apply (TranslationUnit &translationUnit)
 
virtual ~Transformer ()=default
 

Private Member Functions

bool transform (TranslationUnit &translationUnit) override
 

Detailed Description

Transformation pass to remove relations which are redundant (do not contribute to output).

Definition at line 30 of file RemoveRedundantRelations.h.

Member Function Documentation

◆ clone()

RemoveRedundantRelationsTransformer* souffle::ast::transform::RemoveRedundantRelationsTransformer::clone ( ) const
inlineoverridevirtual

Implements souffle::ast::transform::Transformer.

Definition at line 40 of file RemoveRedundantRelations.h.

◆ getName()

std::string souffle::ast::transform::RemoveRedundantRelationsTransformer::getName ( ) const
inlineoverridevirtual

Implements souffle::ast::transform::Transformer.

Definition at line 36 of file RemoveRedundantRelations.h.

36  :
37  bool transform(TranslationUnit& translationUnit) override;
38 };

◆ transform()

bool souffle::ast::transform::RemoveRedundantRelationsTransformer::transform ( TranslationUnit translationUnit)
overrideprivatevirtual

Implements souffle::ast::transform::Transformer.

Definition at line 28 of file RemoveRedundantRelations.cpp.

28  {
29  for (auto rel : redundantRelations) {
30  removeRelation(translationUnit, rel->getQualifiedName());
31  changed = true;
32  }
33  }
34  return changed;
35 }
36 
37 } // namespace souffle::ast::transform

References rel(), and souffle::ast::removeRelation().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
souffle::ast::removeRelation
void removeRelation(TranslationUnit &tu, const QualifiedName &name)
Remove relation and all its clauses from the program.
Definition: Utils.cpp:105
souffle::ast::transform::RemoveRedundantRelationsTransformer::transform
bool transform(TranslationUnit &translationUnit) override
Definition: RemoveRedundantRelations.cpp:28
rel
void rel(size_t limit, bool showLimit=true)
Definition: Tui.h:1086