SysML 2.0b2 FTF Avatar
  1. OMG Issue

SYSML2 — Constraint on Definition variation memberships is too restrictive

  • Key: SYSML2-613
  • Status: closed  
  • Source: The MathWorks ( Mr. Alan Moore)
  • Summary:

    with these two part defs:

    part def Source {
      part B;
    }
    
    part def Target{
      part C;
    }
    

    I want to define a variation of an allocation definition thus:

    variation allocation def theSet {
        end s:Source;
        end t:Target;
        variant allocation Scenario1:theSet {
            allocate s.B to t.C;
        }
    }
    

    and then use it thus:

    part Top {
        part b:Source;
        part a:Target;
    }
    
    allocation alloc1:theSet allocate Top.b to Top.a {
        assert constraint {alloc1 == Scenario1}
    }
    

    However, it seems that variations can only contain variants as members and hence I need to create another allocation definition to hold the ends, thus:

    allocation def theOtherSet {
        end s:Source;
        end t:Target;
    }
    

    and have the variation specialise this new definition thus:

    variation allocation def theSet:>theOtherSet {
        end s:Source;
        end t:Target;
        variant allocation Scenario1:theSet allocate s to t{
            allocate s.B to t.C;
        }
    }
    

    This seems unnecessarily restrictive and I can find no rationale in the spec for this.

  • Reported: SysML 2.0b1 — Wed, 20 Dec 2023 09:31 GMT
  • Disposition: Closed; No Change — SysML 2.0b2
  • Disposition Summary:

    No change

    For simplicity of managing variability models, it was decided to separate the modeling of variation from the structural and behavioral modeling of what is being varied. This is why variations are restricted to only have variants – the idea being that the variation is declared specifically to just list the variants.

    This conception is also carried over to enumerations, which, in SysML v2, are just a kind of variation restricted to attributes. An enumeration definition can specialize another attribute definition, which may have additional structure, but the enumeration definition itself can only specify its enumerated values (which are its variants). In the context of enumerations, this restriction is clearer and generally non-controversial.

  • Updated: Tue, 1 Jul 2025 14:51 GMT