Skip to content

Fixes to Merging algorithm #54

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

Open
wants to merge 29 commits into
base: vara-dev
Choose a base branch
from
Open

Fixes to Merging algorithm #54

wants to merge 29 commits into from

Conversation

padupr
Copy link
Contributor

@padupr padupr commented May 24, 2021

Last minute fixes.

@vulder
Copy link
Contributor

vulder commented Jul 18, 2021

@padupr What's the current status of this PR?

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@vulder vulder requested review from vulder and s9latimm July 23, 2021 11:23
@vulder vulder marked this pull request as ready for review July 23, 2021 11:23
Pascal Dupré added 3 commits July 23, 2021 17:19
# Conflicts:
#	include/vara/Feature/FeatureTreeNode.h
#	unittests/resources/CMakeLists.txt
Copy link
Contributor

@s9latimm s9latimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Over all LGTM, just some remarks / questions unrelated to the actual algorithm.

Pascal Dupré and others added 2 commits July 30, 2021 15:19
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@vulder
Copy link
Contributor

vulder commented Aug 20, 2021

What is the current state of this PR? @padupr could you please, if you find time, go over the open remarks and close them if they are resolved.

@vulder
Copy link
Contributor

vulder commented Aug 28, 2021

@padupr I pulled in the current fixes on dev. Otherwise, we need to remove the issues reported from the CI.

@vulder
Copy link
Contributor

vulder commented Jan 17, 2022

@s9latimm I updated the PR to our ne dev state. Can you please double check this PR, especially the TODO part regarding error handling. What should we do in this case? Do we need a specific error here?

@vulder vulder requested a review from s9latimm January 17, 2022 21:46
@vulder vulder requested a review from s9latimm February 4, 2022 12:34
@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2022

Codecov Report

Merging #54 (df1f5ea) into vara-dev (c33a773) will decrease coverage by 0.43%.
The diff coverage is 79.52%.

Impacted file tree graph

@@             Coverage Diff              @@
##           vara-dev      #54      +/-   ##
============================================
- Coverage     88.48%   88.05%   -0.44%     
============================================
  Files            48       48              
  Lines          5282     5569     +287     
============================================
+ Hits           4674     4904     +230     
- Misses          608      665      +57     
Impacted Files Coverage Δ
include/vara/Feature/Error.h 26.47% <0.00%> (-1.66%) ⬇️
include/vara/Feature/FeatureModel.h 82.94% <0.00%> (-2.32%) ⬇️
lib/Feature/FeatureModelWriter.cpp 83.12% <0.00%> (-0.27%) ⬇️
unittests/Feature/FeatureModel.cpp 91.26% <0.00%> (-8.21%) ⬇️
include/vara/Feature/FeatureModelTransaction.h 80.77% <18.42%> (-4.38%) ⬇️
lib/Feature/FeatureModelTransaction.cpp 85.71% <93.10%> (+1.50%) ⬆️
unittests/Feature/Feature.cpp 100.00% <100.00%> (ø)
unittests/Feature/FeatureModelTransaction.cpp 99.48% <100.00%> (+0.11%) ⬆️
unittests/Feature/Relationship.cpp 95.38% <100.00%> (+0.94%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c33a773...df1f5ea. Read the comment docs.

It currently seems that removing the constraint from a parent seems
wrong. However, there might be a case we miss here. So, should we
encounter a breakages from that, we should revisit the impl. here.
@vulder
Copy link
Contributor

vulder commented Feb 12, 2025

@vulder vulder requested review from boehmseb and Kallistos February 12, 2025 15:31
@vulder
Copy link
Contributor

vulder commented Feb 12, 2025

@boehmseb @Kallistos please have a look. I tried to rebase and clean up the work from Pascal but an additional feedback would be good.

@@ -254,6 +258,14 @@ class FeatureModelModification {
return FM.addConstraint(std::move(Constraint));
}

static void removeConstraint(FeatureModel &FM, Constraint *R) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Consraint *R here and Constraint *C below?
Do they have different meaning, or should they be named the same?

return UniC->constraint() == C;
});
if (MCIt != MixedConstraints.end()) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment on lines +326 to +328
if (!Parent->getChildren<Relationship>(1).empty()) {
ParentNode = *(Parent->getChildren<Relationship>(1).begin());
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure I understand this correctly:
This is required because we model (xor/or) relationships as separate nodes so the relationship node has to be set as parent if one exists, correct?

This assumes that a Feature can have exactly one (or no) relationship as child and if it has, there are no features as direct children allowed. Is this assumption validated anywhere?
I'm asking because this might become an issue when integrating UVL because UVL does not have these constraints, i.e., a feature can have multiple types of relationships as children at once (I'm not sure how about multiple instances of the same type, e.g., multiple or groups).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants