KerML 1.0b2 FTF Avatar
  1. OMG Issue

KERML — Connector declaration does not allow a feature value

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

    The second line of the following does not parse:

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

    The reason for this is that the NaryConnectorDeclaration production uses FeatureDeclaration (see KerML 8.2.5.5.1):

    NaryConnectorDeclaration : Connector =
        FeatureDeclaration
        ( '(' ownedRelationship += ConnectorEndMember ','
            ownedRelationship += ConnectorEndMember
            ( ',' ownedRelationship += ConnectorEndMember )* ')' )?
    

    However, however FeatureDeclaration does not include ValuePart, which provides the syntax for feature values (see KerML 8.2.4.3):

    Feature =
        FeaturePrefix
        ( 'feature'? FeatureDeclaration
        | 'feature'
        | ownedRelationship += PrefixMetadataMember
        )
        ValuePart? TypeBody
    

    On the other hand, KerML 7.4.6.2 states that “A connector is declared as a feature (see 7.3.4.2) using the keyword connector”, and a feature declaration (in the informal sense) can, in general, include a feature value, so it would be expected to be allowable for a connector, too.

    Note that this is not a problem for item flows, which explicitly allows a ValuePart (KerML 8.2.5.9.2):

    ItemFlowDeclaration : ItemFlow =
        ( FeatureDeclaration ValuePart?
          ( 'of' ownedRelationship += ItemFeatureMember )?
          ( 'from' ownedRelationship += ItemFlowEndMember
            'to' ownedRelationship += ItemFlowEndMember )?
        | ( isSufficient ?= 'all' )?
          ownedRelationship += ItemFlowEndMember 'to'
          ownedRelationship += ItemFlowEndMember
    
  • Reported: KerML 1.0a1 — Fri, 21 Apr 2023 22:53 GMT
  • Updated: Mon, 8 Apr 2024 21:42 GMT