SysML 2.0b2 FTF Avatar
  1. OMG Issue

SYSML2 — Connection declaration does not allow a feature value

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

    The second line of the following does not parse:

    abstract connection c1;
    abstract connection c2 = c3; // Error: No viable alternative at input '='
    

    The reason for this is that the ConnectionUsage production uses UsageDeclaration (see subclause 8.2.2.13.1):

    ConnectionUsage =
        OccurrenceUsagePrefix
        ( 'connection' UsageDeclaration
          ( 'connect' ConnectorPart )?
        | 'connect' ConnectorPart )
        UsageBody
    

    However, UsageDeclaration does not include ValuePart, which provides the syntax for feature values (see 8.2.2.6.2):

    Usage =
        UsageDeclaration UsageCompletion
    UsageDeclaration : Usage =
        Identification FeatureSpecializationPart?
    UsageCompletion : Usage =
        ValuePart? UsageBody
    

    On the other hand, 7.13.2 states that “A connection definition or usage (that is not of a more specialized kind) is declared as a kind of occurrence definition or usage (see 7.9.2), using the kind keyword connection”, and an occurrence declaration (in the informal sense) can, in general, include a feature value, so it would be expected to be allowable for a connection, too.

    Note that this is also a problem for interactions, but not for messages or flow connections, which explicitly allow a ValuePart (see 8.2.2.13.4):

    MessageDeclaration : FlowConnectionUsage =
          UsageDeclaration ValuePart?
          ( 'of' ownedRelationship += ItemFeatureMember )?
          ( 'from' ownedRelationship += MessageEventMember
            'to' ownedRelationship += MessageEventMember
          )?
        | ownedRelationship += MessageEventMember 'to'
          ownedRelationship += MessageEventMember
    
    FlowConnectionDeclaration : FlowConnectionUsage =
          UsageDeclaration ValuePart?
          ( 'of'  ownedRelationship += FlowPayloadFeatureMember )?
          ( 'from' ownedRelationship += FlowEndMember
            'to'   ownedRelationship += FlowEndMember )?
        | ownedRelationship += FlowEndMember 'to'
          ownedRelationship += FlowEndMember
    
  • Reported: SysML 2.0a1 — Thu, 27 Apr 2023 21:30 GMT
  • Updated: Mon, 8 Apr 2024 18:21 GMT