Skip to content

Commit

Permalink
Merge pull request #2244 from langston-barrett/lb/fix-remove-relation…
Browse files Browse the repository at this point in the history
…-copies

Don't apply RemoveRelationCopies transformer to EQRELs
  • Loading branch information
b-scholz authored Mar 31, 2022
2 parents 6bd98e7 + 2a7b6d0 commit 7f1abdc
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 7f1abdc

Please sign in to comment.