-
Notifications
You must be signed in to change notification settings - Fork 4
Fixes for problems that occured during my master thesis #8
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
Merged
SundermannC
merged 57 commits into
Universal-Variability-Language:refactoring_metamodel
from
st-vi:refactoring_metamodel
Jan 26, 2025
Merged
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
2a139a3
feat: print the feature model without cross tree constraints as pseud…
st-vi 1a03d01
feat: worked on pseudo boolean encoding
st-vi 3fdc06d
feat: added constraint to pbc translation
st-vi 027596b
fix: constraint pbc encoding
st-vi 87f81c9
fix: fixed wrong constraint encoding
st-vi dfca14c
fix: fixed wrong constraint encoding
st-vi 5996092
fix: error in group cardinality conversion and multi or for larger po…
st-vi ac989be
feat: printing fm to z3 input format
st-vi df1afae
feat: uvl to opb and dimacs pipeline
st-vi 4778f46
Merge branch 'Universal-Variability-Language:refactoring_metamodel' i…
st-vi 3144252
fix: only include satisfying assignments for an ExpressionsConstraint…
st-vi 1d9058f
fix: also include feature constraints for pseudo-boolean encoding
st-vi a21f1f3
feat: pseudo boolean encoding of feature attribute constraints withou…
st-vi 073daa4
feat: pseudo boolean encoding of feature attribute constraints with d…
st-vi 0822b6b
feat: pseudo boolean encoding of feature attribute constraints that c…
st-vi e88e6dc
refactor: renaming
st-vi 3e8bb40
fix: check for division by 0 in smt conversion
st-vi 3667150
fix: check for division by 0 in smt conversion
st-vi 70f2e3e
fix: simplify and fix multiplication of number and literal (before ha…
st-vi b34d158
fix: wrong factor sign after denominator removal
st-vi bbc46be
fix: error during biimplicatino transformation
st-vi 858b753
fix: fixed pseudo boolean encoding of division (now directly like all…
st-vi b241f8f
multiple changes
st-vi 113fd47
feat: automated evaluation
st-vi dc4b12b
fix: wrong opb encoding for group cardinality
st-vi 8fd6e48
fix: opb encoding for double negated literals
st-vi aa08603
feat: eval pipeline
st-vi 4b89614
fix: error in feature cardinality conversion strategy
st-vi 41ddad7
feat: encode feature cardinality in pseudo-boolean
st-vi 5cbe351
feat: encode aggregate functions and string constraints in pseudo-boo…
st-vi a386ecc
fix: remove multi or in feature cardinality conversion
st-vi 4b433a1
fix: biimplication of literal and pb constraint (because former assum…
st-vi 8d8c578
fix: conversion strategy for feature attribute constraints only searc…
st-vi 934a6e8
feat: changed or-group pseudo-boolean encoding to are more concise on…
st-vi 40ae056
feat: removed unnecessary IO from dimacs encoding
st-vi 7e42d96
fix: fixed and refactored pbc encoding
st-vi 85929d5
fix: fixed pbc encoding for single negated literal constraints
st-vi 3c4adc1
fix: simplified and fixed opb encoding
st-vi d983695
refactor: simplified PBConstraint
st-vi 7c8397b
refactor: default value for literal sign
st-vi 6fcf920
refactor: escape every feature name with " to avoid errors with solve…
st-vi 2b1cfe1
refactor: escape every feature name with " to avoid errors with solve…
st-vi cadc16c
fix: feature cardinality conversion strategy (set right constraint re…
st-vi 2eddf76
fix: several bugs and added new semantic for constraints containing c…
st-vi 772a08f
fix: attribute cloning, remove unnecessary attributes for cloned feat…
st-vi 89d1645
feat: added support for distributive cross-tree constraint encoding (…
st-vi e63866c
feat: added support for distributive opb encoding
st-vi f1b9c8f
fix: set quotes for feature name "false"
st-vi 83b103f
refactor: moved all pseudo-boolean related code into another project
st-vi 5f6c038
fix: use multior in smt conversion to prevent stack overflow
st-vi a606dc1
fix: drop typelevel conversion also considers constraints with type r…
st-vi 44a90bb
Delete .idea/.gitignore
st-vi 6b1dd66
Delete .idea directory
st-vi 2f49f18
refactor: removed unnecessary files
st-vi 69cec26
Merge remote-tracking branch 'origin/refactoring_metamodel' into refa…
st-vi 7c9dcf6
refactor: applied code auto-formatting
st-vi 997298e
refactor: changed back to maven dependencies
st-vi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,7 @@ private void removeGroupCardinality(Group group, FeatureModel featureModel) { | |
| Set<Feature> groupMembers = new HashSet<>(group.getFeatures()); | ||
|
|
||
| int lowerBound = group.getCardinality().lower; | ||
| int upperBound = Math.max(group.getCardinality().upper, groupMembers.size()); | ||
| int upperBound = Math.min(group.getCardinality().upper, groupMembers.size()); | ||
| Set<Set<Feature>> featureCombinations = new HashSet<>(); | ||
| for (int i = lowerBound; i <= upperBound; i++) { | ||
| featureCombinations.addAll(Sets.combinations(groupMembers, i)); | ||
|
|
@@ -81,6 +81,11 @@ private Constraint createConjunction(Set<Feature> selectedFeatures, Set<Feature> | |
| } | ||
|
|
||
| private Constraint createDisjunction(Set<Constraint> constraints) { | ||
| MultiOrConstraint orConstraint = new MultiOrConstraint(); | ||
| for (Constraint constraint : constraints) { | ||
| orConstraint.add_sub_part(constraint); | ||
| } | ||
| /* | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I guess not. Thats the original code before introducing MultiOrs. If we are fine with keeping the MultiOr, I can remove it. |
||
| Constraint orConstraint; | ||
| if (constraints.size() == 1) { | ||
| Constraint constraint = constraints.iterator().next(); | ||
|
|
@@ -92,6 +97,8 @@ private Constraint createDisjunction(Set<Constraint> constraints) { | |
| orConstraint = new OrConstraint(constraint, createDisjunction(constraints)); | ||
| } | ||
|
|
||
| */ | ||
|
|
||
| return orConstraint; | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we need this commented-out fragmnet?
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.
This code was used to create an additional constraint, where are cloned features are or-ed. For a constraint that contains a cloned feature, it can then be replaced by this expression. We discussed this kind of constraint while talking about the semantic of constraints regarding feature cardinality. However, I did not include this kind of constraint and therefore commented it out again. I did not remove it, in case we want to use it later on.