80 likes | 201 Views
Protocol Consistency Checking of UML Statecharts. B.S. Barış Güldalı adapted from PG AQUASIUM@AG Engels-UPB. a1. :A. :B. e1. e3/send e4. e1. a2. a3. e2. /send e2. e3. e5. Consistency of UML Model. „Inconsistency is disagreement between sub-models“. Inconsistency between
E N D
Protocol Consistency Checking of UML Statecharts B.S. Barış Güldalı adapted from PG AQUASIUM@AG Engels-UPB
a1 :A :B e1 e3/send e4 e1 a2 a3 e2 /send e2 e3 e5 Consistency of UML Model „Inconsistency is disagreement between sub-models“ • Inconsistency between • Class diagram (CD), Sequence diagram (SeqD) • CD, Statechart diagram (SD) • SD, SeqD • SD, SD • ... Definitionen
A.e4 p1 p4 B.e1 B.e3 p2 p3 A.e2 :A :B /send e1 a1 b1 e2/send e3 e1 e3/send e4 e4/send e1 b2 a2 a3 /send e2 Consistency of UML Model • Inconsistency between • CD, SeqD • CD, SD • SD, SeqD • SD, SD • ... • Protocol • consistency Definitionen
Source of inconsistency : • UML without formal semantic • UML tools interpret differently • There is no automatic behaviour consistency • Three steps for automated consistency-check: • Informal definition of protocol-consistency • Definition of ... • ...model transformation from statecharts into CSP • ...consistency in CSP • Execution of model transformation, modelchecking via FDR • CSP (Communicating Sequential Processes): • formal specification language (process algebra) • FDR (Failures-Divergence Refinement): • commercial modelchecking tool Automated Consistency Check
:StateMachine name=„LightControl“ sm:StateMachine top :CompositeState ε ::= <sm.name>(state) = if (state == <s.name>) then State(<s.name>) top cs:CompositeState subvertex :State subvertex name=„Red“ mapping s:State instantiation Model Tranformation: UML CSP transformation UML Model CSP Model pattern matching match CSP Transformation UML Patern instantiated Definitionen Automated Consistency Check Model Transformation Case Study Modelchecking Conclusion
Case Study UML CSP A(state) = if (state == a1) e1?x_e1 if (x_e1 == 1) A(a2) else A(a1) else if (state == a2) send_e2 A(a3) ... B(state) = if (state == init) send_e1 B(b1) else if (state == b1) e2?x_e2 if (x_e2 == 1) send_e3 B(b2) else A(b1) ... Definitionen Automated Consistency Check Model Transformation Case Study Modelchecking Conclusion P(p1) = B.e1 P(p2) P(p2) = A.e2 P(p3) P(p3) = B.e3 P(p4) P(p4) = A.e4 P(p1) System = A ||| B
Modelchecking • traces(P) = set of finite sequences of events which P can do • Consistency definition: • Trace refinement: • assert P(p1) [T= System • assert System [T = P(p1) • Modelchecker FDR • Assert fails: • protocol and statecharts are not conform Definitionen Automated Consistency Check Model Transformation Case Study Modelchecking Conclusion
UML is informal consistency problem transform into a formal domain make a consistency definition Modelcheck Conclusion Future Work Definitionen Automated Consistency Check Model Transformation Case Study Modelchecking Conclusion • Consistency-check for deadlock • Consistency-check between SeqD & SD • Transformation into other formal models