SysML 2.0b3 FTF Avatar
  1. OMG Issue

SYSML2_ — Incorrect enumeration example

  • Key: SYSML2_-189
  • Status: open  
  • Source: Model Driven Solutions ( Mr. Ed Seidewitz)
  • Summary:

    The following example appears in 7.8.2 Enumeration Definitions and Usages:

    enum def ConditionColor { red; green; yellow; } 
    attribute def ConditionLevel {
        attribute color : ConditionColor; 
    }
    enum def RiskLevel :> ConditionLevel {
        enum low { color = ConditionColor::green; } 
        enum medium { color = ConditionColor::yellow; } 
        enum high { color = ConditionColor::red; }
    }
    

    This is example is not valid, because the color features defined in the enumerated values will have name conflicts with the color feature inherited from ConditionLevel. The intent was probably to have the color features in the enumerated values redefine ConditionLevel::color, but that is currently missing from the example.

  • Reported: SysML 2.0b2 — Thu, 2 May 2024 21:34 GMT
  • Updated: Thu, 2 May 2024 21:36 GMT