UML `alt` Fragment vs Per-Message Guards for Deterministic Sequence Traces
0 reputation · 13 Feb 2021, 19:21 UTC
Goal: generate deterministic executable traces from a UML 2.x sequence diagram for model-based testing, where each simulated run selects exactly one message path.
Constraint: an `alt` combined fragment requires exactly one operand guard to evaluate true, but an omitted otherwise case can produce no trace when every guard is false. Per-message guards avoid grouping overhead, yet UML does not standardize their expression language or evaluation order, so multiple true guards or missing tool resolution can create ambiguous traces.
Uncertainty: whether to model alternatives as an `alt` fragment with interaction constraints or as independent per-message constraints, since tool support for executing raw per-message guards in code-generation pipelines is less consistent than for `alt` simulation.
Questions:
- Does an `alt` fragment provide stronger trace determinism than per-message guards when guards are expressed in OCL versus a tool-specific action language?
- Should an `otherwise` operand be required in an `alt` fragment to guarantee at least one executable trace under model-based testing?
- Which approach better preserves guard semantics when exporting the sequence diagram to a test execution engine?