Skip to content

fix: incorrect equivalence classes

Arseniy Volynets requested to merge av/fix-eq-propagation into main

Summarize the changes

  • fix: incorrect equivalence classes
  • propagate_equality transformation did not compute equality classes correctly, its 'merge' function was completely wrong: it tried to add intersection of classes to a another class, instead of doing union
  • to merge classes correctly we must do it when we add a new pair of equal expressions: otherwise later there will too many classes that contain common elements, so 'merge' function was removed and 'insert' now merges two classes that contain common elements
  • Also this logic is now covered by tests

Ensure that

  • New code is covered by unit and integration tests.
  • Related issues would be automatically closed with gitlab's closing pattern (Closes #issue_number).
  • Public modules are documented (check the rendered version with cargo doc --open).
  • (if PEST grammar has changed) EBNF grammar reflects these changes (check the result with railroad diagram generator.

Next steps

Merge request reports