Commit 7a02ec0
refactor: updates to constraints, conversion strategies, and print (#18)
* feat: print the feature model without cross tree constraints as pseudo-boolean constraints in .opb format
* feat: worked on pseudo boolean encoding
* feat: added constraint to pbc translation
* fix: constraint pbc encoding
* fix: fixed wrong constraint encoding
* fix: fixed wrong constraint encoding
* fix: error in group cardinality conversion and multi or for larger possible group cardinality conversions
* feat: printing fm to z3 input format
* feat: uvl to opb and dimacs pipeline
* fix: only include satisfying assignments for an ExpressionsConstraint during conversion strategy
* fix: also include feature constraints for pseudo-boolean encoding
* feat: pseudo boolean encoding of feature attribute constraints without division
* feat: pseudo boolean encoding of feature attribute constraints with division
* feat: pseudo boolean encoding of feature attribute constraints that contain doubles by encoding them in integer values
* refactor: renaming
* fix: check for division by 0 in smt conversion
* fix: check for division by 0 in smt conversion
* fix: simplify and fix multiplication of number and literal (before handled as literal times literal)
* fix: wrong factor sign after denominator removal
* fix: error during biimplicatino transformation
* fix: fixed pseudo boolean encoding of division (now directly like all other mathematical operators)
* multiple changes
* feat: automated evaluation
* fix: wrong opb encoding for group cardinality
* fix: opb encoding for double negated literals
* feat: eval pipeline
* fix: error in feature cardinality conversion strategy
* feat: encode feature cardinality in pseudo-boolean
* feat: encode aggregate functions and string constraints in pseudo-boolean
* fix: remove multi or in feature cardinality conversion
* fix: biimplication of literal and pb constraint (because former assumption that constraint is always >= does not hold for random uvl expressions)
* fix: conversion strategy for feature attribute constraints only searches for expressions as direct constraints but not as expressions that are part of a normal constraint
* feat: changed or-group pseudo-boolean encoding to are more concise one (old one was not wrong)
* feat: removed unnecessary IO from dimacs encoding
* fix: fixed and refactored pbc encoding
* fix: fixed pbc encoding for single negated literal constraints
* fix: simplified and fixed opb encoding
* refactor: simplified PBConstraint
* refactor: default value for literal sign
* refactor: escape every feature name with " to avoid errors with solver (e.g. for - in name)
* refactor: escape every feature name with " to avoid errors with solver (e.g. for - in name)
* fix: feature cardinality conversion strategy (set right constraint replacement, like described in UVL BA)
* fix: several bugs and added new semantic for constraints containing cloned features
* fix: attribute cloning, remove unnecessary attributes for cloned feature cardinality subtree roots, expression contains feature from feature cardinality, unsatisfiable expression should return false and not throw error, several issues with opb division encoding, removed unnecessary overwrites of left and right in expression constraints, force order of featurecardinality and aggregate function conversion, several to string methods for better debugging, issues with whole number encoding because numbers get larger than long value, uniform substitution, simpler substitution code,
* feat: added support for distributive cross-tree constraint encoding (vs tseitin style cross-tree constraint encoding)
* feat: added support for distributive opb encoding
* fix: set quotes for feature name "false"
* refactor: moved all pseudo-boolean related code into another project
* fix: use multior in smt conversion to prevent stack overflow
* fix: drop typelevel conversion also considers constraints with type related concepts
* Delete .idea/.gitignore
* Delete .idea directory
* refactor: removed unnecessary files
* refactor: applied code auto-formatting
* refactor: changed back to maven dependencies
* Added automatic bracket creation when printing UVL models
* Added unit tests for brackets; small fix
* Several changes to simplify changing identifiers programatically with the fm builder
* Resolved issues following merge
* misc: updated changes according to Kevin's review
---------
Co-authored-by: Stefan <svill33@gmail.com>
Co-authored-by: Stefan <76208574+st-vi@users.noreply.github.com>1 parent 660f453 commit 7a02ec0
File tree
44 files changed
+718
-180
lines changed- src
- main/java/de/vill
- conversion
- main
- model
- building
- constraint
- expression
- util
- test/java/de/vill/model
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
44 files changed
+718
-180
lines changedLines changed: 88 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
74 | 88 | | |
75 | | - | |
76 | 89 | | |
77 | 90 | | |
78 | 91 | | |
| 92 | + | |
79 | 93 | | |
80 | 94 | | |
81 | 95 | | |
82 | 96 | | |
83 | 97 | | |
84 | | - | |
| 98 | + | |
85 | 99 | | |
| 100 | + | |
86 | 101 | | |
87 | 102 | | |
88 | 103 | | |
89 | | - | |
| 104 | + | |
90 | 105 | | |
91 | 106 | | |
92 | 107 | | |
| |||
118 | 133 | | |
119 | 134 | | |
120 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
121 | 147 | | |
122 | 148 | | |
123 | 149 | | |
124 | 150 | | |
125 | 151 | | |
126 | 152 | | |
127 | | - | |
128 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
129 | 176 | | |
130 | 177 | | |
131 | 178 | | |
| |||
144 | 191 | | |
145 | 192 | | |
146 | 193 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
155 | 208 | | |
156 | | - | |
157 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
158 | 226 | | |
159 | 227 | | |
160 | 228 | | |
| |||
Lines changed: 4 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
93 | 87 | | |
94 | | - | |
95 | 88 | | |
96 | 89 | | |
97 | 90 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | | - | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
37 | 46 | | |
38 | 47 | | |
39 | | - | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | | - | |
| 51 | + | |
43 | 52 | | |
| 53 | + | |
| 54 | + | |
44 | 55 | | |
45 | 56 | | |
46 | 57 | | |
47 | 58 | | |
48 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
49 | 69 | | |
50 | 70 | | |
51 | 71 | | |
| |||
55 | 75 | | |
56 | 76 | | |
57 | 77 | | |
58 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
59 | 83 | | |
60 | 84 | | |
61 | 85 | | |
| |||
112 | 136 | | |
113 | 137 | | |
114 | 138 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
124 | 142 | | |
125 | | - | |
126 | 143 | | |
127 | 144 | | |
128 | 145 | | |
129 | | - | |
| 146 | + | |
130 | 147 | | |
131 | 148 | | |
132 | 149 | | |
133 | 150 | | |
134 | | - | |
| 151 | + | |
135 | 152 | | |
136 | 153 | | |
137 | 154 | | |
138 | 155 | | |
139 | 156 | | |
140 | 157 | | |
141 | 158 | | |
142 | | - | |
| 159 | + | |
143 | 160 | | |
144 | 161 | | |
145 | 162 | | |
| |||
149 | 166 | | |
150 | 167 | | |
151 | 168 | | |
152 | | - | |
153 | | - | |
| 169 | + | |
| 170 | + | |
154 | 171 | | |
155 | 172 | | |
156 | | - | |
| 173 | + | |
157 | 174 | | |
158 | 175 | | |
159 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
40 | 87 | | |
0 commit comments