-
Notifications
You must be signed in to change notification settings - Fork 6
Fix a crucial bug in the Configure relevance predicate #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
These tests were more a playground back then when writing the SPLC paper and were never supposed to be actual tests.
This bug was reported by @piameier.
... from VariationDiffTransformer
Previously, this method always crashed because addChildren assumes the given children to have no parent. Yet, the children always had 'other' as parent because we only removed them afterwards.
We have to create a copy of the children list because it is cleared by some implementations of removeAllChildren(). So effectively, no children were added via addChildren.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work. I did not find any real issues.
Unfortunate that there are commits with failing CI in between. However (as discussed in a meeting), changing that would break downstream work that is already based on this. Hence, we can keep it like that.
Kind of unrelated: Do we check anywhere that a DiffNode has at most one ELIF/ELSE? I just checked and didn't find anything. I have a change ready but am kind of surprised that we do not check this yet.
...in/java/org/variantsync/diffdetective/variation/diff/transform/VariationTreeTransformer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/variantsync/diffdetective/variation/tree/view/relevance/Configure.java
Outdated
Show resolved
Hide resolved
Co-authored-by: ibbem <benjamin.moosherr@uni-ulm.de>
|
Thank you for your review. I do not remember whether we check the ELSE/ELIF validity anywhere. If you have a fix, I am happy to take it. I guess that |
These where interfaces without a real purpose.
I'll open a separate PR.
We do have |
5e39143 to
ddd4289
Compare
824972a to
6a2c992
Compare
This PR fixes a bug reported by @piameier.
The
Configurerelevance predicate for generating views falsely removed ELSE and ELIF branches. The reason was that the optimized implementation to mark nodes as relevant discarded an entire subtree as soon as that subtree's root was irrelevant (i.e., that root conflicted a given partial configuration). However, in such a case, we still have to check and test any ELSE or ELIF branches.I implemented the first ever unit tests for views on trees and diffs to check that the bug is now fixed. The new test cases checks the implementation of
Configureagainst a naive implementation calledConfigureSpec.In the future, it might be great to
This PR also contributes the new EliminateEmptyAlternatives transformer and required refactorings.