Skip to content

Commit

Permalink
Don't apply RemoveRelationCopies transformer to EQRELs
Browse files Browse the repository at this point in the history
  • Loading branch information
langston-barrett committed Mar 30, 2022
1 parent 6bd98e7 commit 2a7b6d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ast/transform/RemoveRelationCopies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ bool RemoveRelationCopiesTransformer::removeRelationCopies(TranslationUnit& tran
if (!rel->getFunctionalDependencies().empty()) {
continue;
}
// skip equivalence relations (which automatically create reflexive,
// symmetric, and transitive tuples)
if (rel->getRepresentation() == RelationRepresentation::EQREL) {
continue;
}
const auto& clauses = program.getClauses(*rel);
if (!ioType.isIO(rel) && clauses.size() == 1u) {
// .. of shape r(x,y,..) :- s(x,y,..)
Expand Down

0 comments on commit 2a7b6d0

Please sign in to comment.