SysML 2.0b2 FTF Avatar
  1. OMG Issue

SYSML2 — ConstraintBlock mapping parameters to input attributes

  • Key: SYSML2-186
  • Status: open  
  • Source: NIST ( Mr. Conrad Bock)
  • Summary:

    In SysML 1.7, Clause 10.1 (Overview, Constraint Blocks) and (ConstraintBlock) say:

    Constraint blocks define generic forms of constraints that can be used in multiple contexts. For example, a definition for Newton’s Laws may be used to specify these constraints in many different contexts. Constraint blocks can be used to specify a network of constraints that represent mathematical expressions such as {F=m*a} and {a=dv/dt}, which constrain the physical properties of a system.

    A constraint block is a block that packages the statement of a constraint so it may be applied in a reusable way to constrain properties of other blocks. A constraint block typically defines one or more constraint parameters, which are bound to properties of other blocks in a surrounding context where the constraint is used.

    enabling an equation to "calculate" any of its variables (constraint parameters), to the extent it's reversible, depending on its usage. For example a constraint block for F=m*a can calculate any on of its variables given the other two by where it's used. But in SysML v1 to SysML v2 Transformation, (ConstraintBlock_Mapping) says

    A SysML::ConstraintBlocks::ConstraintBlock is mapped to a SysML v2 ConstraintDefinition. The following shows an example of what the textual SysML v2 syntax of the result of the transformation may look like.

    onstraint def SysMLv1ConstraintBlock {
    in attribute a : ScalarValues::Integer;
    in attribute b : ScalarValues::Integer;
    in attribute c : ScalarValues::Integer;
    constraint constraintExpression {
      language "OCL2.0"  /* c == a + b */ } }

    suggests constraint parameters are mapped to attributes with direction in, preventing them from being "calculated" from within the constraint (see KERML-10).

    Not sure if the above is encoded in the mapping rules, but perhaps related is (ConstraintParameter_Mapping), under Mapping Rules, says

    The mapping class only has inherited rules. See the mapping classes in the general mapping section for details.

    which means nothing specific is required for mapping constraint parameters. I couldn't find a "general mapping section".

  • Reported: SysML 2.0a1 — Thu, 4 May 2023 15:26 GMT
  • Updated: Wed, 10 Apr 2024 00:41 GMT