SysML 2.0b2 FTF Avatar
  1. OMG Issue

SYSML2 — Enumerations not specializable

  • Key: SYSML2-593
  • Status: open  
  • Source: NIST ( Mr. Conrad Bock)
  • Summary:

    [From Mr. Ryan Noguchi] In the SysML v2 spec, section 7.8.1:

    An enumeration definition may not specialize another enumeration definition. This is because the semantics of specialization require that the set of instances classified by a definition be a subset of the instances of classified by any definition it specializes. The enumerated values defined in an enumeration definition, however, would add to the set of enumerated values allowed by any enumeration definition it specialized, which is inconsistent with the semantics of specialization.

    To comply with the Liskov Substitution Principle, a specialization of an enumeration definition should only remove literals, not add them. Why can’t the specialization’s definition either simply remove existing literals from the general definition or list the applicable literals—resulting in a syntax error if this list includes anything not present in the general definition? As a concrete example:

    enum def ClassificationLevel {
       enum unclassified;
       enum cui;
       enum secret;
       enum top_secret;
    enum def ClassificationLevelClassified :> ClassificationLevel {
        enum secret;
        enum top_secret;
  • Reported: SysML 2.0b1 — Fri, 8 Dec 2023 17:49 GMT
  • Updated: Wed, 10 Apr 2024 00:42 GMT