Research Article

Synthesis of Test Scenarios Using UML Sequence Diagrams

Procedure 2

Function BuildITM.
Input:   𝐺 : The scenario graph in the form ⟨ 𝐴 , 𝐸 , 𝑖 𝑛 , 𝐹 ⟩
Output:   𝐺 π‘˜ : ITM
Data:   𝑅 𝑒 𝑔 𝑖 π‘œ 𝑛 𝐹 π‘œ 𝑒 𝑛 𝑑 : a flag indicates whether a region is formed
  or not
1: RegionFound = TRUE   // Initially assumes composition is possible
2: while   𝑅 𝑒 𝑔 𝑖 π‘œ 𝑛 𝐹 π‘œ 𝑒 𝑛 𝑑   do
3:    𝐺 π‘˜ = 𝐹 π‘œ π‘Ÿ π‘š 𝐼 𝑛 𝑑 𝑒 π‘Ÿ π‘š 𝑒 𝑑 𝑖 π‘Ž 𝑑 𝑒 𝐺 π‘Ÿ π‘Ž 𝑝 β„Ž ( 𝐺 , 𝑅 𝑒 𝑔 𝑖 π‘œ 𝑛 𝐹 π‘œ 𝑒 𝑛 𝑑 )
4:    𝐺 = 𝐺 π‘˜
5: end while
6: return   𝐺 π‘˜    // No more composition possible
Algorithmβ€”Building ITM