Skip to content

Commit 9413869

Browse files
committed
added short section on language levels
1 parent 7670469 commit 9413869

1 file changed

Lines changed: 41 additions & 1 deletion

File tree

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,51 @@ UVL specifies variability models with a tree-like structure to represent the hie
2626
Ketchup
2727
Mustard
2828
Cheese
29-
constraints
29+
<b>constraints</b>
3030
Ketchup => Cheese
3131
</code>
3232
</pre>
3333

34+
35+
## Language Levels
36+
37+
In addition to the language core described above, UVL provides several extensions providing additional language constructs. The following language levels are supported:
38+
39+
* SAT Level
40+
* SAT Core: Level without any extension as seen above
41+
* Group Cardinality: Specify selecting [n..m] (between n and m) children parent-children relationships D
42+
* SMT Level
43+
* SMT Core: Supports constraints over feature attributes with standard arithmetic operations (+,-,*,/,=,!=,>,<)
44+
* Attribute aggregates: Simplifies specification of attribute constraints by allowing sum() and avg() aggregates
45+
* Feature Cardinality: A single feature can be selected between n and m times
46+
47+
The following feature model in UVL syntax enriches the previous version with new language concepts. Further, feature attributes, such as the number of calories, are attached to features.
48+
49+
<pre>
50+
<code>
51+
<b>features</b>
52+
Sandwich
53+
<b>mandatory</b>
54+
Bread {Calories 100, Sugar 20}
55+
<b>optional</b>
56+
Sauce
57+
<b>or</b>
58+
Ketchup {Calories 40, Sugar 35}
59+
Mustard {Calories 25, Sugar 5}
60+
Cheese
61+
<b>[0..2]</b> <i>// Group cardinality</i>
62+
Cheddar {Calories 60}
63+
Gouda {Calories 50}
64+
Goat {Calories 35}
65+
Pickle <b>cardinality [1..3]</b> <i>// Feature cardinality</i>
66+
67+
<b>constraints</b>
68+
Ketchup => Cheese
69+
Bread.Sugar + Ketchup.Sugar + Mustard.Sugar < 60 <i>// Attribute Constraints</i>
70+
sum(Calories) < 160 <i>// Aggregate</i>
71+
</code>
72+
</pre>
73+
3474
# Software
3575

3676
### Tool Support for UVL

0 commit comments

Comments
 (0)