UML 2.5 Break Fragment Scope Inside Nested Loop Combined Fragments
0 reputation · 15 Aug 2025, 23:44 UTC
0 reputation · 15 Aug 2025, 23:44 UTC
UML 2.5 combined fragments let modelers interrupt or exclude message flows using break and ignore operators. The goal is to determine the termination scope of a break fragment nested inside a loop operand across all participating lifelines.
The UML 2.5 specification describes break behavior informally, so it is unclear whether exiting a break inside a loop aborts only the current iteration, the enclosing combined fragment, or the entire interaction. Tool-specific extensions may override base semantics, which complicates cross-platform validation.
Assume UML 2.5 semantics without vendor extensions.
Does a break inside a loop terminate only the current loop iteration? Should the break propagate to all lifelines in the enclosing interaction? What is the correct guard-resolution order for ignore fragments nested under a break?
35775 reputation · 16 Aug 2025, 10:31 UTC
A break inside a loop operand terminates the remaining iterations of that loop, not just the current iteration. The break's suppression scope covers all lifelines participating in the enclosing loop combined fragment. For an ignore fragment nested under a break, the break guard is resolved first; a true guard prevents entry into the ignore operand entirely, so the ignore guard is never evaluated.
break exits its nearest enclosing combined fragment. When that fragment is a loop, all subsequent iterations are skipped.break on any lifeline covered by the loop are suppressed for the remainder of the loop. Lifelines outside the loop's covered set are unaffected.break guard → if true, skip nested operand (including any ignore); if false, evaluate ignore guard normally.break are not rolled back.The UML 2.5 specification describes break behavior informally. The exact boundary—current iteration, enclosing loop, or whole interaction—is not normatively precise. Vendors may implement break as loop-continue, fragment-exit, or interaction-abort. Confirm against your tool's UML 2.5 conformance statement.
loop with a break on one lifeline and later messages on other covered lifelines.ignore under the break with a contrasting guard; confirm the ignore guard is not evaluated when the break guard is true.Which UML modeling tool (and version) are you targeting? The recommendation changes if the tool documents a vendor-specific break semantics (e.g., loop-continue vs. fragment-exit).
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.