-
Notifications
You must be signed in to change notification settings - Fork 14
Missing Attribute when converting from Type to Arithmetic Level #48
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When converting Type level UVL models to Arithmetic Level UVL models, an attribute for the typed features gets lost.
Example:
This UVL Model:
features
ASEJ1
mandatory
Real Strands
Modes
or
top
horizontal
bottom
vertical
UI
TopFeeding3D
Thermal3D
constraints
(Strands == 1.0 | Strands > 1.0) & (Strands == 100.0 | Strands < 100.0)
(Strands == 4.0 | Strands > 4.0) => !top
Results in the following converted UVL Model:
features
ASEJ1
mandatory
Strands {feature_type 'Real'}
Modes
or
top
horizontal
bottom
vertical
UI
TopFeeding3D
Thermal3D
constraints
(Strands.type_level_value == 1 | Strands.type_level_value > 1) & (Strands.type_level_value == 100 | Strands.type_level_value < 100)
(Strands.type_level_value == 4 | Strands.type_level_value > 4) => !top
The missing attribute type_level_value in feature Strands causes a parsing error:
Exception in thread "main" Attribute Strands.type_level_value is referenced in a constraint in ASEJ1 but does not exist as feature in the tree! (at 16:0)
at de.vill.main.UVLModelFactory.referenceAttributesInConstraints(UVLModelFactory.java:486)
at de.vill.main.UVLModelFactory.parse(UVLModelFactory.java:148)
at de.vill.main.UVLModelFactory.parse(UVLModelFactory.java:133)
at de.kit.kastel.sdq.uvl.parser.test.ParserTest.main(ParserTest.java:54)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working