Institut für Softwaretechnologie Abstracting Timing Information in UML g g State Charts via Temporal Ordering and LOTOS Temporal Ordering and LOTOS Valentin Chimisliu Franz Wotawa Institut für Softwaretechnologie Institut für Softwaretechnologie Technische Universität Graz Technische Universität Graz Graz Austria Graz, Austria Graz Austria Graz, Austria Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 1
Institut für Softwaretechnologie Motivation Motivation • Introduction of academic model based test case generation tools into industry • Hide the user unfriendly formal language • Useof a widely accepted modeling language • Abstract concrete timing information using temporal ordering d i Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 2
Institut für Softwaretechnologie • UML State Charts • LOTOS LOTOS • Model Description • Model Transformation Model Transformation • Future Work • Conclusions Conclusions Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 3
Institut für Softwaretechnologie UML State Charts • UML behavioral diagrams • Describe reactions of a system to external stimuli • Hierarchical structures • Composed of states, pseudostates and transitions Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 4
Institut für Softwaretechnologie UML State Charts • Atomic execution • Timeouts • Run-to-Completion step • Asynchronous communication Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 5
Institut für Softwaretechnologie UML State Charts • States: • Pseudostates: Pseudostates: • Transitions: , Transitions: • Variables: V i bl • Initial State: I i i l S Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 6
Institut für Softwaretechnologie UML State Charts UML State Charts Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 7
Institut für Softwaretechnologie • UML State Charts • LOTOS LOTOS • Model Description • Model Transformation Model Transformation • Future Work • Conclusions Conclusions Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 8
Institut für Softwaretechnologie LOTOS LOTOS • ISO standard • Based on process algebra and on the abstract data type l language ACT ONE . ACT ONE • describes a system as a set of interacting communicating y g g processes • process behavior is described through behavioral expressions p • processes communicate through event gates Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 9
Institut für Softwaretechnologie LOTOS Specification structure “ specification ” name_spec [ gate list ] ( parameter list ) : functionality p y type definitions “ behavior ” behavior expression “ where ” type definitions process definitions process definitions “ endspec ” Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 10
Institut für Softwaretechnologie LOTOS LOTOS • Some LOTOS operators: – “;” - action prefix - startCar;DRIVE. – “ [ ] ” - choice - (CarStarts;DRIVE) [ ] (CarBroken; WALK) – “||” – full synchronization - (a;b;c;X) || (a;b;Y) includes a;b… – “|||” – interleaving - (a;b;c;P) ||| (x;y;T) includes a;x;y;b;c... “|||” i t l i ( b P) ||| ( T) i l d b – “|[< gates >]|” - partial synchronization - (a;b;c;P) |[b]| (b;y;T) |[< gates >]| partial synchronization (a;b;c;P) |[b]| (b;y;T) includes a;b;y;c... and a;b;c;y... . – “ stop ” - inaction - a system that can not show any action. Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 11
Institut für Softwaretechnologie • UML State Charts • LOTOS LOTOS • Model Description • Model Transformation Model Transformation • Future Work • Conclusions Conclusions Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 12
Institut für Softwaretechnologie Model Description Model Description • Class diagram • Each class has attached a statechart • Classes communicate through data carrying events • Asynchronous communication • FIFO queue Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 13
Institut für Softwaretechnologie Direction Indication Direction Indication System Structure Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 14
Institut für Softwaretechnologie Direction Indication System Behavior Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 15
Institut für Softwaretechnologie • UML State Charts • LOTOS LOTOS • Model Description • Model Transformation Model Transformation • Future Work • Conclusions Conclusions Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 16
Institut für Softwaretechnologie Model Transformation Model Transformation • Flattened Statechart LOTOS process • Flattened Statechart LOTOS process • UML States LOTOS processes • Variables Process parameters • Transitions Behavioral expressions – triggering events gates offerings gg g g g – assignment statements process parameter operations – generation of events gates offerings t ti f t ff i • Asynchronous communication FIFO event queue Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 17
Institut für Softwaretechnologie Model Transformation Model Transformation System Structure in LOTOS (HazardWarningButton[alfaGate, inGate, toQueue,outGate,time] (UNPRESSED, tmQueue_nil) ||| Blinker[alfaGate, inGate, toQueue, outGate, time] (tmQueue_nil) ||| InstrumentCluster[alfaGate, inGate, toQueue, outGate, time] I t tCl t [ lf G t i G t t Q tG t ti ] (tmQueue_nil) ||| ) || Synchronization[alfaGate, inGate, toQueue, outGate, time] (true, true, true, true, tmQueue nil) (true, true, true, true, tmQueue_nil) Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 18
Institut für Softwaretechnologie Model Transformation Model Transformation Main LOTOS Abstract Data Types • ComModels – identifies the communicating models (UML class) • • Transition Transition – represents properties of UML transitions (id, containing represents properties of UML transitions (id containing model, etc.) • Event – the events used for communication • EventQueue – used to store events generated during run to completion steps • TmEvent – represents the timeout event e t ep ese s e eou e e • TimeQueue – container for the timeout events ready to elapse Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 19
Institut für Softwaretechnologie Model Transformation Model Transformation Time Queue Abstract Data Type type TIMEQUEUE is TMEVENTS, ComModels sorts t TmEvent opns t_nil (*! constructor *) : -> TmQueue add (*! constructor *) : TmEvent, TmQueue -> TmQueue ( ) , min: TmQueue -> TmEvent pop_min : TmQueue -> TmQueue pop min : TmQueue -> TmQueue decr_queue : Nat, TmQueue -> TmQueue pop_ModelTrans: Model, TmQueue -> TmQueue popTrans: Transition, TmQueue -> TmQueue T T iti T Q > T Q Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 20
Institut für Softwaretechnologie Model Transformation Model Transformation States and Variables Control Gate Control Gate Input Gate Input Gate Event Communication Event Communication Output Gate Output Gate Time Gate Time Gate Gate process Toggled [alfaGate, inGate, toQueue, outGate, time] (ButtonStatus: Nat, tmQueue: TmQueue,ellapsedTime: Nat) : noexit:= Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 21
Institut für Softwaretechnologie Model Transformation Model Transformation Transitions alfaGate !Blinker !true !min(tmQueue); inGate !Blinker_T76 ?msg:TmEvent [(msg == getEvByTrans(Blinker_T76 , tmQueue))]; time ?tmt: Nat !itsTaster; outGate !tmQueue !timeSynch !ellapsedTime ; toQueue !reqLightOff(RIGHT, InstrCluster); RightBlinkersOFF[alfaGate, inGate, toQueue, outGate, time] add(tm(!Blinker T78 , OFF Phase), popTrans(Blinker T76 ,tmQueue)) ) ( ( _ , _ ), p p ( _ , )) ) Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 22
Institut für Softwaretechnologie Model Transformation Transitions - Timing and Hierarchy alfaGate !Blinker !true !min(tmQueue); alfaGate !Blinker !true !min(tmQueue); …………. RightBlinkersOFF[alfaGate, inGate, toQueue, outGate, time] ( add( tm(!Blinker_T78 , OFF_Phase), (decr_queue(getParam_timeout(min(tmQueue)),popTrans(Blinker_T76 ,tmQueue) ) ) Valentin Chimisliu AST 2011 Kompetenznetzwerk Softnet Austria Professor Horst Cerjak, 19.12.2005 23
Recommend
More recommend