SysML 2.0b2 FTF Avatar
  1. OMG Issue

SYSML2 — validateTriggerInvocationExpressionWhenArgument constraint is wrong

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

    The approved resolution to SYSML2-28 included adding the constraint validateTriggerInvocationExpressionWhenArgument, which requires:

    If a TriggerInvocationExpression has kind = when, then it must have an argument Expression with a result that conforms to the type ScalarValues::Boolean.

    However, the argument to a when trigger is not supposed to be an Expression with a Boolean result. Rather, it is an Expression whose result is the Evaluation of an Expression whose result is Boolean. That is, a trigger like when x > 0 is parsed as TriggerWhen({x > 0}), not as TriggerWhen(x > 0). So all properly parsed when triggers will violate validateTriggerInvocationExpressionWhenArgument as specified in the resolution to SYSML2-28.

  • Reported: SysML 2.0b1 — Fri, 27 Oct 2023 09:39 GMT
  • Disposition: Resolved — SysML 2.0b2
  • Disposition Summary:

    Update the constraint

    A TriggerInvocationExpression with kind=when is always parsed from the concrete syntax as having an argument that is a FeatureReferenceExpression whose referent is an Expression (per the resolution to SYSML2-495). In this context, it is sufficient to check that the referent Expression has a result that conforms to ScalarValues::Boolean.

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