280 likes | 417 Views
Automatic Synthesis of SDL models in Use Case Methodology. Dr. Nikolai N. Mansurov. Dr. Nikolai N. Mansurov Head of Dept. of CASE Tools, Institute for System Programming, Moscow. Formal description techniques: SDL, MSC, UML, ASN.1, ACT-1 Compiler Design Automatic Code Generation
E N D
Automatic Synthesis of SDL modelsin Use Case Methodology Dr. Nikolai N. Mansurov Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Dr. Nikolai N. MansurovHead of Dept. of CASE Tools, Institute for System Programming, Moscow • Formal description techniques: SDL, MSC, UML, ASN.1, ACT-1 • Compiler Design • Automatic Code Generation • Program understanding, reverse engineering Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Definition of Use Case • Actor • external entity, communicates with system to achieve goal • Use Case • sequence of interactions between one or more actors and system • Scenario • sequence of events Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Description of Use Cases uses user external extends operator Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Description of Use Cases • Use Case diagram • relations between actors and use cases • relations between use cases • Description of scenarios • informal text • structured text/tabular • UML Sequence Diagram • Message Sequence Charts (MSC) Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Overview of the Process • Analysis • Requirements Analysis • System Analysis • Design • System Design • Detailed Design • Implementation Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Two Modeling Perspectives Requirements • Static Path • how entities form structures and hierarchies • Functional Path • how entities collaborate functional static Completesystem Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Use Case Methodology Requirements Use Cases Actors System Scenarios Architecture System model Collaborations Detailed model Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
A B C Behavior and Structure P Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Summary of Approach • Formalization of Use Cases using HMSC • Use Cases are mapped to FSM • Use Cases describe Data Flow • Automatic Synthesis of SDL models • complete • both static structure & behavior • typebased • non-deterministic Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Summary of Approach (2) Requirements Use Cases Actors System scenarios Architecture System model Class collaborations Detailed model Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Summary of Approach (3) Requirements Use Cases Actors System scenarios Architecture System model Class collaborations Detailed model Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Formalization of Use Cases • Each scenario is formalized using Message Sequence Charts (MSC) • Control-flow relationships between scenarios are formalized using High-LevelMSC (HMSC) • Data-flow relationships between scenarios are formalized using our Data Extensions to MSC language Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Message Sequence Charts message instance head message toenvironment msc abc a c text x b instance axis local condition local global condition global stop action instance end Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
High-Level MSC (HMSC) start msc habc flow line global condition loop msc reference abc cba Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Control-flow relationships • Alternative (sub-) scenarios • Iterations of (sub-) scenarios • “Uses” relation between use cases • “Extends” relation between use cases Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Execution of use cases • Sequential schema • use cases can not execute simultaneously • Parallel schema • different use cases can execute simultaneously • Multiple instance schema • multiple instances of the same use case can execute simultaneously Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Sequential schema msc sequential start UC_1 UC_2 Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
start UC_2 Parallel schema msc parallel start UC_1 Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Data Flow • Local data flows • actions • information passing between actors • local conditions • Data-flow relations between scenarios • variables Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
local Local data flow msc abc a c x (p,q) b y (p,q) a w r:=p+1 r>0 q z r Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Global data flow msc abc msc cba a a x y (p,q) stack:=push(stack,p,q) stack:=pop(stack,p,q) z w (p,q) Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Extensions to MSC • Actions • var := expr • func( expr_1, …, expr_n ) • message parameters • only variable names • local conditions with boolean expression as comment • var <op> {var | const } Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Synthesis Algorithm NDFSM slicing DFSM synthesis parsing ordering MDFSM Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
msc reply msc wait s r s r x y T w DFSM R DFSM S Set(T) Out(y,r) In(x,s) In(w,r) Timeout(T) In(y,s) Out(x,s) Out(w,s) Synthesis Algorithm (2) Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
DFSM R Set(T) In(x,s) Timeout(T) In(y,s) Out(w,s) Synthesis Algorithm (3) process R St_0 x y Set(T) w to s St_1 T Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
x to s y to r DFSM S Out(y,r) In(w,r) Out(x,s) Synthesis Algorithm (4) process S any St_0 w Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP
Conclusions • Automatic synthesis of SDL models is suitable for rapid prototyping in MSC • Can be applied for re-engineering legacy software • Dramatically reduces learning curve for SDL Dr. Nikolai N. Mansurov, Dept. of CASE tools, ISP