Skip to content

Support constant definitions #2277

@GorbadPS3

Description

@GorbadPS3

I have been following a youtube tutorial for SysML v2: https://www.youtube.com/watch?v=2FWxUGlkrE0

In it, "reindeer nose color" has been define as a constant , like this:

    ref part r8 subsets reindeer { constant redefines noseColor = Color::gold; }

    part def Reindeer {
        constant noseColor : Color;
        attribute energyLevel : Real default := 100.0;
    }

An example sysml v2 file according to the tutorial looks like this:

Before_SysON_Import_L02_SantaSleigh.txt

However, after importing it to SysON and exporting it back to a sysml text document, it appears like this:

After_SysON_Export_L02_SantaSleigh.txt

    ref part r8 :> reindeer {
        'constant' :>> noseColor = Color::gold;
    }

    part def Reindeer {
        'constant';
        noseColor : Color;
        attribute energyLevel : Real default := 100.0;
    }

As you can see, the "constant" keyword is somehow parsed into its own line, which completely breaks the sysml v2 model. It also gets quotation-marks around it.

It looks like the constant keyword isn't supported by SysON?

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions