| Input: : Sequence diagram in XMI form // is the main fragment |
| Output: G: scenario graph in the form |
| 1: Create initial node ; |
| 2: // Process the main |
| fragment with |
| 3: if then |
| 4: Create final node ; |
| 5: Connect edge from ; |
| 6: end if |
| 7: return with entry node and exit node ; |
| 8: stop |
| Algorithm—The scenario graph generation algorithm |