Uh oh!
There was an error while loading. Please reload this page.
Fix a crucial bug in the Configure relevance predicate - #174
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.
ibbem
left a comment
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: ibbem <benjamin.moosherr@uni-ulm.de>
pmbittner
commented
Oct 26, 2025
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.
ibbem
commented
Oct 26, 2025
I'll open a separate PR.
We do have |
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.