Skip to content

Missing Attribute when converting from Type to Arithmetic Level #48

Description

@coemgen1992

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions