souffle
2.0.2-371-g6315b36
|
Transformation pass to replaces copy of relations by their origin. More...
#include <RemoveRelationCopies.h>
Public Member Functions | |
RemoveRelationCopiesTransformer * | clone () const override |
std::string | getName () const override |
Public Member Functions inherited from souffle::ast::transform::Transformer | |
bool | apply (TranslationUnit &translationUnit) |
virtual | ~Transformer ()=default |
Static Public Member Functions | |
static bool | removeRelationCopies (TranslationUnit &translationUnit) |
Replaces copies of relations by their origin in the given program. More... | |
Private Member Functions | |
bool | transform (TranslationUnit &translationUnit) override |
Transformation pass to replaces copy of relations by their origin.
For instance, if a relation r is defined by
r(X,Y) :- s(X,Y)
and no other clause, all occurrences of r will be replaced by s.
Definition at line 35 of file RemoveRelationCopies.h.
|
inlineoverridevirtual |
Implements souffle::ast::transform::Transformer.
Definition at line 53 of file RemoveRelationCopies.h.
|
inlineoverridevirtual |
Implements souffle::ast::transform::Transformer.
Definition at line 41 of file RemoveRelationCopies.h.
|
static |
Replaces copies of relations by their origin in the given program.
program | the program to be processed |
Definition at line 42 of file RemoveRelationCopies.cpp.
References clauses, souffle::equal_targets(), souffle::ast::Atom::getArguments(), souffle::ast::Clause::getBodyLiterals(), souffle::ast::getClauses(), souffle::ast::Clause::getHead(), souffle::ast::Atom::getQualifiedName(), souffle::ast::isFact(), and rel().
Referenced by souffle::ast::transform::test::TEST().
|
inlineoverrideprivatevirtual |
Implements souffle::ast::transform::Transformer.
Definition at line 58 of file RemoveRelationCopies.h.