Research Article

Evaluation of Tools and Slicing Techniques for Efficient Verification of UML/OCL Class Diagrams

Algorithm 1

Flowgraph creation.
Input: A model 𝑀
Output: A labeled directed graph 𝐺 = ⟨ 𝑉 , 𝐸 ⟩
(1) { S t a r t w i t h t h e e m p t y g r a p h }
(2) Let 𝑉 ← βˆ… and 𝐸 ← βˆ…
(3) { A d d a l l c l a s s e s o f t h e m o d e l t o t h e fl o w g r a p h }
(4) for class 𝑐 in model 𝑀   do
(5)   𝑉 ← 𝑉 βˆͺ { 𝑐 }
(6) end for
(7) { C r e a t e i n c o m i n g a n d o u t g o i n g a r c s i n t h e fl o w g r a p h }
(8) for each association end 𝐴 in model 𝑀   do
(9)   𝐸 ← ( π‘₯ , 𝑦 ) where π‘₯ is the type of the association end and 𝑦 is the type of the other class in the association
(10)  if the lower bound of the multiplicity of 𝐴 is β‰₯1  then
(11)   Label the arc ( π‘₯ , 𝑦 ) as tightly coupled
(12)  else if the lower bound of the multiplicity of 𝐴 = 0   then
(13)   Label the arc ( π‘₯ , 𝑦 ) as loosely coupled
(14)  end if
(15) end for
(16) for each generalization, aggregation and composition 𝐺 between classes π‘₯ and 𝑦   do
(17)   𝐸 ← 𝐸 βˆͺ { ( π‘₯ , 𝑦 ) } βˆͺ { ( 𝑦 , π‘₯ ) }
(18)  Label the arcs ( π‘₯ , 𝑦 ) and ( 𝑦 , π‘₯ ) as tightly coupled
(19) end for