SysML 2.0b2 FTF Avatar
  1. OMG Issue

SYSML2 — Constraint on Usage variation memberships is too restrictive

  • Key: SYSML2-615
  • Status: open  
  • 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:50 GMT
  • Updated: Mon, 8 Apr 2024 18:20 GMT