network protocol design and evaluation
play

Network Protocol Design and Evaluation 04 - Protocol Specification, - PowerPoint PPT Presentation

Network Protocol Design and Evaluation 04 - Protocol Specification, Part II Stefan Rhrup University of Freiburg Computer Networks and Telematics Summer 2009 Overview In Part I of this chapter: Modeling with state machines and


  1. FSM Minimization Step 2 : for all true entries E[i,j] Check, if their next states are equivalent for all actions, i.e. ∀ a E[T(i,a),T(j,a)], otherwise set E[i,j] := false Equivalence table E State transition table T State In Out Next q 0 1 Action a T(q 1 ,a) T(q 5 ,a) state ack1 q 3 q 3 q 1 0 1 q 0 msg1 - q 1 q 0 msg0 - q 2 E[q 3 ,q 3 ] = 1 q 2 0 0 1 q 1 - ack1 q 3 q 3 1 0 0 1 q 2 - ack0 q 0 q 3 msg0 - q 4 q 4 0 0 1 0 1 q 3 msg1 - q 5 q 5 0 1 0 0 0 1 q 4 - ack0 q 0 q 0 q 1 q 2 q 3 q 4 q 5 q 5 - ack1 q 3 Network Protocol Design and Evaluation Computer Networks and Telematics 20 Stefan Rührup, Summer 2009 University of Freiburg

  2. FSM Minimization Result: Equivalence table E State transition table T State In Out Next new q 0 1 state q 1 0 1 q 0 msg1 - q 1 q 0 msg0 - q 2 q 2 0 0 1 q 1 - ack1 q 3 q 0 q 3 1 0 0 1 q 2 - ack0 q 0 q 0 q 3 msg0 - q 4 (q 2 ) q 4 0 0 1 0 1 q 3 msg1 - q 5 (q 3 ) q 5 0 1 0 0 0 1 q 4 - ack0 q 0 q 0 q 1 q 2 q 3 q 4 q 5 q 5 - ack1 q 3 Network Protocol Design and Evaluation Computer Networks and Telematics 21 Stefan Rührup, Summer 2009 University of Freiburg

  3. FSM Minimization Result: q 2 State transition table T State In Out Next new !ack0 ?msg0 state q 0 msg1 - q 1 q 1 q 0 q 0 msg0 - q 2 ?msg1 q 1 - ack1 q 3 q 0 !ack0 !ack1 q 2 - ack0 q 0 !ack1 q 3 msg0 - q 4 (q 2 ) ?msg0 q 3 q 4 q 3 msg1 - q 5 (q 3 ) q 4 - ack0 q 0 ?msg1 !ack1 q 5 - ack1 q 3 q 5 Receiver Network Protocol Design and Evaluation Computer Networks and Telematics 22 Stefan Rührup, Summer 2009 University of Freiburg

  4. FSM Composition ‣ Composition of Q 1 and Q 2 • Q = Q 1 × Q 2 , M’ = M 1 ∪ M 2 • q 0 = q 01 q 02 • Foreach state q 1 q 2 define transitions (non-deterministic): ∀ a: T(q 1 q 2 ,a) = T 1 (q 1 ,a) ∪ T 2 (q 2 ,a) • Minimize the machine Network Protocol Design and Evaluation Computer Networks and Telematics 23 Stefan Rührup, Summer 2009 University of Freiburg

  5. Coupling of FSMs ?ack1 Synchronous coupling !msg0 q 2 q 0 q 1 !ack0 ?msg0 ?ack1 ?ack0 !msg1 q 1 q 0 q 3 q 2 ?msg1 !ack1 ?ack0 Receiver Sender msg0 q 0,0 q 1,2 ack1 ack0 msg1 q 3,1 q 2,0 Network Protocol Design and Evaluation Computer Networks and Telematics 24 Stefan Rührup, Summer 2009 University of Freiburg

  6. Coupling of FSMs Synchronous coupling, 2nd example ?msg0 !msg1 !msg0 ?msg1 q 1 q 2 q 0 q 1 q 2 q 0 !ack0 ?ack1 ?ack0 !ack1 Terminal 2 Terminal 1 !msg0,?msg0 ?msg1,!msg1 q 1,1 q 0,0 q 2,2 ?ack0,!ack0 !ack1,?ack1 ‣ Synchronous coupling ignores the transmission delay Network Protocol Design and Evaluation Computer Networks and Telematics 25 Stefan Rührup, Summer 2009 University of Freiburg

  7. Coupling of FSMs Asynchronous coupling ?msg0 !msg1 !msg0 ?msg1 q 1 q 2 q 0 q 1 q 2 q 0 !ack0 ?ack1 ?ack0 !ack1 Terminal 2 Terminal 1 msg1 msg0 input queue input queue ‣ Incoming messages are added to the input queue ‣ The process consumes the first message in queue (FIFO) Network Protocol Design and Evaluation Computer Networks and Telematics 26 Stefan Rührup, Summer 2009 University of Freiburg

  8. Coupling of FSMs Asynchronous coupling ?msg0 !msg1 !msg0 ?msg1 q 1 q 2 q 0 q 1 q 2 q 0 !ack0 ?ack1 ?ack0 !ack1 q 0,0 Terminal 2 Terminal 1 !msg0,-- --,!msg1 q 1,0 q 0,2 --,?msg0 --,!msg1 !msg0,-- ?msg1,-- q 1,1 q 1,2 q 2,2 ok ok Specification ?ack0,-- --,?ack1 incomplete! The protocol ...T2 cannot ...T1 cannot blocks here, send ack0 send ack1 because... in q 2 in q 2 Network Protocol Design and Evaluation Computer Networks and Telematics 27 Stefan Rührup, Summer 2009 University of Freiburg

  9. Extended FSMs ‣ Abstract model for communicating processes ‣ can be transformed into program code ‣ ... or verification languages (e.g. PROMELA) ‣ The Specification and Description Language (SDL) is based on Extended FSMs Network Protocol Design and Evaluation Computer Networks and Telematics 28 Stefan Rührup, Summer 2009 University of Freiburg

  10. SDL and MSC ‣ Specification and Description Language (SDL) [ITU-T Recommendation Z.100] • originally developed for the specification of telecommunication systems (esp. telephone exchanges) • formal language, based on extended FSMs • used, e.g., for ISDN protocols, IEEE standards • strong tool support ‣ Message Sequence Charts (MSC) [ITU-T Z.120] • originally part of SDL; similar to UML sequence diagrams Source: http://www.itu.int/ITU-T/studygroups/com10/languages/ Network Protocol Design and Evaluation Computer Networks and Telematics 29 Stefan Rührup, Summer 2009 University of Freiburg

  11. SDL Example process transceive process start get next SDL process diagram procedure call char for Lynch’s protocol receive state NACK ACK ERR receive get next char ACK ACK NACK send - next state = previous state Network Protocol Design and Evaluation Computer Networks and Telematics 30 Stefan Rührup, Summer 2009 University of Freiburg

  12. SDL Elements ‣ SDL describes concurrent processes and their interaction ‣ Basic concept: Extended (communicating) finite state machines ‣ Graphical and textual notation • SDL/GR (graphic representation) • SDL/PR (phrase representation) ‣ An SDL specification of a system describes • Structure • Communication • Behaviour • Data Network Protocol Design and Evaluation Computer Networks and Telematics 31 Stefan Rührup, Summer 2009 University of Freiburg

  13. Basic SDL Elements ‣ Processes describe behavior (Extended FSM) ‣ They run in parallel and can communicate ‣ Processes are grouped into blocks block process process Extended Extended FSM FSM Network Protocol Design and Evaluation Computer Networks and Telematics 32 Stefan Rührup, Summer 2009 University of Freiburg

  14. Basic SDL Elements ‣ Blocks describe the structure. ‣ They can be connected to or contained in other blocks ‣ The outermost block is called the system ‣ Blocks and processes are called agents system block block process process EFSM EFSM Network Protocol Design and Evaluation Computer Networks and Telematics 33 Stefan Rührup, Summer 2009 University of Freiburg

  15. Basic SDL Elements ‣ Agents communicate • asynchronously by a signal (via a channel) or • synchronously by a procedure call ‣ Channels describe the communication paths system block block process process EFSM EFSM Network Protocol Design and Evaluation Computer Networks and Telematics 34 Stefan Rührup, Summer 2009 University of Freiburg

  16. Blocks ‣ System: the enclosing block that interfaces the environment ‣ The overall system consists of blocks and processes (agents) ‣ Blocks are structural elements. They can contain other blocks b11 and/or processes [R. Reed, SDL-2000 Presentation, sdl-forum.org/sdl2000present/] Network Protocol Design and Evaluation Computer Networks and Telematics 35 Stefan Rührup, Summer 2009 University of Freiburg

  17. Processes ‣ Processes describe behavior ‣ Processes usually contain an extended finite state machine ‣ They are not concurrent ‣ They cannot contain blocks ‣ Processes communicate by signals. ‣ Processes can contain and/ or call procedures [R. Reed, SDL-2000 Presentation, sdl-forum.org/sdl2000present/] Network Protocol Design and Evaluation Computer Networks and Telematics 36 Stefan Rührup, Summer 2009 University of Freiburg

  18. Definition of a Block channel block diagram heading page number b11 gates process signal channel (reference to) name Network Protocol Design and Evaluation Computer Networks and Telematics 37 Stefan Rührup, Summer 2009 University of Freiburg

  19. Definition of a Channel • Channels are used to interconnect agents • ...also called communication paths or signal routes (distinction between channels and signal routes in SDL-88) • Signals are sent via channels channel name signals ch1 [msg,ack] channel types: bidirectional, without delay bidirectional, without delay bidirectional, with delay uniderectional, with delay Network Protocol Design and Evaluation Computer Networks and Telematics 38 Stefan Rührup, Summer 2009 University of Freiburg

  20. Processes diagram heading page number start state procedure call procedure state (reference to) input connector (for splitting diagrams) block appearance of p2 p2 inside a block: Network Protocol Design and Evaluation Computer Networks and Telematics 39 Stefan Rührup, Summer 2009 University of Freiburg

  21. Procedures page number diagram heading procedure start create process input state return symbol Network Protocol Design and Evaluation Computer Networks and Telematics 40 Stefan Rührup, Summer 2009 University of Freiburg

  22. Structuring elements b11 [R. Reed, SDL-2000 Presentation, sdl-forum.org/sdl2000present/] Network Protocol Design and Evaluation Computer Networks and Telematics 41 Stefan Rührup, Summer 2009 University of Freiburg

  23. Describing Behavior: Processes ‣ Behavior is specified by processes, following the concept of an extended FSM. ‣ Processes can • receive, save, and send signals • set and reset timers • manipulate variables • call procedures • create other processes Network Protocol Design and Evaluation Computer Networks and Telematics 42 Stefan Rührup, Summer 2009 University of Freiburg

  24. Elements of a process start symbol c:=0; task (only one per agent) S1 proc state procedure call procedure all states * proc insertion (S1,S2) (except those listed) (reference) return to termination - previous state descr. text extension [sdl-forum.org/sdl88tutorial/] Network Protocol Design and Evaluation Computer Networks and Telematics 43 Stefan Rührup, Summer 2009 University of Freiburg

  25. Branches (outcome) ELSE decision expr. (branch) join parts can be separated label BREAK label connector by BREAK and connectors Network Protocol Design and Evaluation Computer Networks and Telematics 44 Stefan Rührup, Summer 2009 University of Freiburg

  26. Examples of Decisions (true) (false) (0) (1) x = y x x - y length(header) (0) (16) ELSE (>0) (=0) (<0) TYPE (“A”) (“B”) (“ERR”) ELSE [sdl-forum.org/sdl88tutorial/] Network Protocol Design and Evaluation Computer Networks and Telematics 45 Stefan Rührup, Summer 2009 University of Freiburg

  27. Processes and signals (1) ‣ Every process instance has its input queue (FIFO) ‣ Signals can be received at any time ‣ Signals from the so-called complete valid input signal set are added to the queue ‣ If a process is in a certain state and the queue is not empty and there are signals associated with transitions from that state, then the signal is removed from the queue and the transition is triggered. ‣ For unspecified signal/state combinations, the signal is consumed without any action ( implicit transition ) [sdl-forum.org/sdl88tutorial/] Network Protocol Design and Evaluation Computer Networks and Telematics 46 Stefan Rührup, Summer 2009 University of Freiburg

  28. Processes and signals (2) a b process1 process2 a a a b a input queue input queue ‣ Processes communicate asynchronously via FIFO queues ‣ Each process has exactly one input queue Network Protocol Design and Evaluation Computer Networks and Telematics 47 Stefan Rührup, Summer 2009 University of Freiburg

  29. I/O Elements (1) SIGNALLIST sl1 = A,B; SIGNAL A,B; signal declaration SIGNALLIST sl2 = sl1,C; save signal (msg. remains in queue, no A B output signal outgoing transition) save all other * input signal B signals continuous signal with abort B priority input enabling condition Network Protocol Design and Evaluation Computer Networks and Telematics 48 Stefan Rührup, Summer 2009 University of Freiburg

  30. I/O Elements (2) Sending to a specific receiver: Further addresses: A PARENT Dest : Process ID TO Dest the creating instance A sending a OFFSPRING self-message TO SELF last created instance by this instance A sending back to the sender TO SENDER A sending via a channel VIA ch1 Network Protocol Design and Evaluation Computer Networks and Telematics 49 Stefan Rührup, Summer 2009 University of Freiburg

  31. I/O Elements (3) Input and Output in layered protocols (Notation used in IEEE Standards, not official part of Z.100) pointer or wedge to the left pointer or wedge to the right in_pkt out_pkt out_frame in_frame signals from or to processes signals from or to processes logically above or parallel to logically below this process this process Network Protocol Design and Evaluation Computer Networks and Telematics 50 Stefan Rührup, Summer 2009 University of Freiburg

  32. Handling signals, Example (1) S1 a b a c b a c S3 S2 ‣ The process is in state “S1” ‣ Message “c” is first in queue Network Protocol Design and Evaluation Computer Networks and Telematics 51 Stefan Rührup, Summer 2009 University of Freiburg

  33. Handling signals, Example (2) S1 a b c a b a c S3 S2 ‣ “c” is saved and remains ‘passively’ in queue Network Protocol Design and Evaluation Computer Networks and Telematics 52 Stefan Rührup, Summer 2009 University of Freiburg

  34. Handling signals, Example (3) S1 a b c a b a c S3 S2 ‣ “a” is consumed and removed from the queue ‣ It triggers the transition to S2 Network Protocol Design and Evaluation Computer Networks and Telematics 53 Stefan Rührup, Summer 2009 University of Freiburg

  35. Handling signals, Example (4) S1 a c a b S2 b c S3 S2 c S3 ‣ “c” is now consumed and triggers the transition to S3 Network Protocol Design and Evaluation Computer Networks and Telematics 54 Stefan Rührup, Summer 2009 University of Freiburg

  36. Handling signals, Example (5) S3 S2 a b c b c S3 S3 S4 ‣ If a transition leads back to the same state, a signal triggering this transition is effectively discarded. Network Protocol Design and Evaluation Computer Networks and Telematics 55 Stefan Rührup, Summer 2009 University of Freiburg

  37. I/O Notation Sending to a specific receiver: Further addresses: A PARENT Dest : Process ID TO Dest the creating instance A sending a OFFSPRING self-message TO SELF last created instance by this instance A sending back to the sender TO SENDER A sending via a channel VIA ch1 Network Protocol Design and Evaluation Computer Networks and Telematics 56 Stefan Rührup, Summer 2009 University of Freiburg

  38. Sending signals, Example ‣ Signal “A” is sent via channel ch2 ‣ “A” is put into the input queue of process p2 block example process p1 S1 ch2 p1 p2 A VIA ch2 ch1 S2 Network Protocol Design and Evaluation Computer Networks and Telematics 57 Stefan Rührup, Summer 2009 University of Freiburg

  39. Variables ‣ Variables are declared in a text symbol ‣ They are manipulated in an task Declare Variable Type Initial keyword name value Text symbol DCL counter Integer := 0, comma-separated list increment Integer :=1; Task symbol counter := counter + increment; [sdl-forum.org/sdl88tutorial/] Network Protocol Design and Evaluation Computer Networks and Telematics 58 Stefan Rührup, Summer 2009 University of Freiburg

  40. Timers ‣ Timers are self-messages which are added to the input queue T Timer definition TIMER T; Timer setting SET(now+50, T) (predefined function) b process1 a a Timer reset RESET(T) (predefined function) b Timer signals are added Timer activation to the input queue T (self-message) [sdl-forum.org/sdl88tutorial/] Network Protocol Design and Evaluation Computer Networks and Telematics 59 Stefan Rührup, Summer 2009 University of Freiburg

  41. Timers, Example Wait4Timer in-connector Alternative: expirytime := expirytime := DCL expirytime Time := 0.0; expirytime + period; NOW + period; DCL period Duration := 13; TIMER T; SET (expirytime, T) Declaration Wait T out-connector PeriodAction [sdl-forum.org/sdl88tutorial/] Network Protocol Design and Evaluation Computer Networks and Telematics 60 Stefan Rührup, Summer 2009 University of Freiburg

  42. Passing data variables ‣ Signals can contain data values ‣ Input and output must be compatible Block b1 Process P1 Process P2 ch DCL S S V1 Integer, p1 p2 V2 Boolean; [A] A(v1,v2) A(4,True) SIGNAL A(Integer,Boolean); A_sent A_recvd [sdl-forum.org/sdl88tutorial/] Network Protocol Design and Evaluation Computer Networks and Telematics 61 Stefan Rührup, Summer 2009 University of Freiburg

  43. Import and Export of Variables ‣ Instead of passing a signal, a variable can be exported by a process and imported by another process DCL EXPORTED sum Integer; IMPORT(sum, EXPORT(sum) exporterID) [sdl-forum.org/sdl88tutorial/] Network Protocol Design and Evaluation Computer Networks and Telematics 62 Stefan Rührup, Summer 2009 University of Freiburg

  44. Process creation and termination Block Example Process P1 S1 p1 [A] S1 A create line create A P2(4,True) p1 symbol S2 B Process P2 Dynamic process FPAR V1 Integer, process creation V2 Boolean terminates [sdl-forum.org/sdl88tutorial/] Network Protocol Design and Evaluation Computer Networks and Telematics 63 Stefan Rührup, Summer 2009 University of Freiburg

  45. Composite States substate composite definition state process type Agent 2 (2) state open 1 (4) retry waitch * open busy ok busy init cong Clear retry Yes tidy No open opened failure req(ch) announ via retry opened release idle waitch cong busy return symbol [R. Reed, SDL-2000 Presentation, sdl-forum.org/sdl2000present/] Network Protocol Design and Evaluation Computer Networks and Telematics 64 Stefan Rührup, Summer 2009 University of Freiburg

  46. Exceptions EXCEPTION Exception definition someError; State with associated eh S exception handler Raising the exception someError eh Exception handler Handle someError Network Protocol Design and Evaluation Computer Networks and Telematics 65 Stefan Rührup, Summer 2009 University of Freiburg

  47. Data Types ‣ SDL follows the concept of Abstract Data Types (ADT) ‣ ADT = sorts + operators ‣ Predefined types (with operations): • Boolean, Character, Charstring, Integer, Natural, Real, Duration, Time, Bitstring, Octet, Octetstring, Pid • Parameterized: Strings (i.e. lists) of any type, Arrays, Structures, Choice, Powerset, Bag • Different sets of predef. types in SDL-88 and SDL-2000 ‣ User-defined types: Value types, Object types, Syntypes (with range check) [R. Reed, SDL-2000 Presentation, sdl-forum.org/sdl2000present/] Network Protocol Design and Evaluation Computer Networks and Telematics 66 Stefan Rührup, Summer 2009 University of Freiburg

  48. Data Types, Example object type Linkedlist < type Elementsort> struct prev, next this Linkedlist; data Elementsort; operators " in " (Elementsort, Linkedlist) ->Boolean; methods delete (Elementsort); operator " in " referenced ; method delete referenced ; endobject type Linkedlist; object type Natlist inherits Linkedlist <Natural> endobject type Natlist; dcl primes Natlist := (. Null, Null, 1 .); [R. Reed, SDL-2000 Presentation, sdl-forum.org/sdl2000present/] Network Protocol Design and Evaluation Computer Networks and Telematics 67 Stefan Rührup, Summer 2009 University of Freiburg

  49. Object orientation ‣ Classes and objects in SDL: types and instances ‣ All instance definitions (agents, states...) define an agent type implicitly ‣ Explicit definition: block type B block type C b:B2 B2 c block type B2 inherits B adding Network Protocol Design and Evaluation Computer Networks and Telematics 68 Stefan Rührup, Summer 2009 University of Freiburg

  50. SDL/GR vs. SDL/PR system convert; SDL/GR system convert 1(1) signal s,t; graphical channel c_out nodelay from B to env with t; t s endchannel c_in; representation B channel c_in nodelay from env to B with s; c_in c_out endchannel c_out; signal s , t ; block B referenced ; endsystem convert; block B; channel rin nodelay from env to P with s; endchannel rin; channel rout nodelay from P to env with t; endchannel rout; process P referenced ; connect c_out and rout; connect c_in and rin; endblock B; process P; start ; nextstate idle; state idle; input s; SDL/PR output t; nextstate idle; phrase endstate idle; representation endprocess P; [R. Reed, SDL-2000 Presentation, sdl-forum.org/sdl2000present/] Network Protocol Design and Evaluation Computer Networks and Telematics 69 Stefan Rührup, Summer 2009 University of Freiburg

  51. Activity SDL in the Analysis set of documents development information flow SDL+ Methodology process classified information Scope of SDL+ (SDL and MSC with ASN.1) Draft Design and recommended r e methodology c q o u l i l Requirements r Documentation e capture e c m t e draft designs e n d t s product descriptions Formalization Test Validation Specification tests formal SDL+ description Test Implementation Execution [ITU-T Z.100 Supplement 1] test results product validation result Network Protocol Design and Evaluation Computer Networks and Telematics 70 Stefan Rührup, Summer 2009 University of Freiburg

  52. SDL in practice: 802.11 Specification 12%-&('1-)-/+3 >)I3/-:)-)B/3:/*)-/+3L 1-)-/+34506"7 6>9(&@+3E/,(1/M3)9%7L >)I3/-:)-)1-)-$%B/3:/*)-/+3 6>9(&83:/*)-/+31/M3)9%7 >?@41?H 1>4>T>U41?H >)I3/-:)-)B,&;$&%- 6>9(&P&;$&%-1/M3)9%7 83*9$:&%',&;$&%- 83*9$:&%'>?@'>8SL <)9/:)-/+3')3: >8S')**&%%L')3: >?@4C)-)4 '>?@4>)3)M&(&3-4 )::=,&(+<& E/9-&,/3M'+E'>9(& 41&,</*& 41&,</*& >?@'A&):&,%B ,&;$&%-')3:'*+3E/,(B =D'E+,'1F?'G'?H'D= '=D'E+,'1F?'G'?H'D= >%:$83:/*)-& >%:$@+3E/,( 6>(M-@+3E/,(1/M3)9%7L P1CI F1CI 6>(M-83:/*)-/+31/M3)9%7 >%:$P&;$&%- >(P&;$&%-L H%@A)3M&L 83*9$:&%'&3*,2K-/+3L H%P&%K+3%& E,)M(&3-)-/+3L')3: >HCI4J&3&,)-/+34 K+N&,'%)<&';$&$/3MB 41F? =D'%-)-/+3'<&,%/+3'D= >>JF >>FY ?-/(XL H:$@+3E/,(L' 83*9$:&%'C@OL @EH+99&: P-%=@-%L'?*Q'G >(@+3E/,(L @OR?*QL',&-,/&%L 6>(M-P&;$&%-1/M3)9%7 H%83;$/,2 @ORK+99',&%K+3%&L ?-/('A)3:9/3ML FHCI )3:'H1RH+99B 83*9$:&%'%*)3L'V+/3L 0&)*+3=:N&99')3: System specification (part) [IEEE Std. 802.11-2007] Network Protocol Design and Evaluation Computer Networks and Telematics 71 Stefan Rührup, Summer 2009 University of Freiburg

  53. SDL in practice: 802.11 Specification $%&'()*+,-./0..0&- *PD&->0+/ $(A&-; 1+,-./0123,435 67)*80.)9%&'():&;.)&'1;1< )))%;=;%)1+,-.>;+.)&>)?@AB. )))9,'(&>>G),)$(A&-;).0H-,% )))>+&/)18;)?CD)1&)18;)@EF )))0.)+;1L+-;:)1&)18;).;-:;+ )))1+,-./011;+G)H;-;+,10-H )))&>)18;)$,'(&>>).0H-,%),1 $,'(&>>G )))IDJ)>0;%:.),-:)0-.;+10-H D,-';% )))18;)'&++;'1)10/;)1&).;-: *P+R $(&> )))10/;.1,/K)=,%L;.)M8;+; ))),)*PQ;RL;.1O))*8;)/;:0L/ ))).1,1;)LK:,1;.)49L.NG)0:%;G ))).%&15)>+&/)D8,--;%2J1,1; ))),+;)>&+M,+:;:)1&)$,'(&>>2 )))@+&';:L+;)=0,)A,1,2@L/K $,'(&>>2@+&';:L+; )))1&)K+;=;-1):;'+;/;-10-H 43G35 )))18;)9,'(&>>)'&L-1)M80%; )))1+,-./0110-H)D1.)&+)C'( )))>+,/;.O))*80.)9%&'()0.)L.;: )))0-)9&18).1,10&-),-:)C@O)76 $L.NG T:%;G *PQ;RL;.1 J%&1 IM:D. A,1,2@L/K I+&/D. 43G35 )DJ $L.NG)T:%;G)J%&1 @8N*PJ1,+1O'&->0+/G @8N*PZ-:O'&->0+/G @8NA,1,O'&->0+/ Transmission block specification (part) [IEEE Std. 802.11-2007] Network Protocol Design and Evaluation Computer Networks and Telematics 72 Stefan Rührup, Summer 2009 University of Freiburg

  54. SDL in practice: 802.11 Specification $%&'())*+,'-&../$%&'(01%( 2,'-&../32456 78*9:;)*<%&'())*<(%.&%=)*>:( U&/+,'-&.. +,'-&..*$%&'(01%(*4)((*#?5?@?56A %(>1%B;BC*D&B(4E36*F:(B*9G*=,H 2(C;BA*&%*D&B(4BIJK6*;.*',B'(LL(0? +,'-&..4'FAE36*)>,%>)*B(F*%,B0&= 2,'-&..?**+,'-&..4GABIJK6*%()1=() 'F*;)*'&B>(B>;&B ',B'(LL(0*2,'-&..?**+,'-&..4KAK6 +,'-&.. F;B0&FA*'B>*;) )(B0)*D&B(4E36*F:(B*MN*;0L(?**87 4'FA*'B>6 )L&>*'&1B>*.%&= <%(Y;&1)*+-D&B(? O.*'B>`KA*,*B(F %,B0&=*'&1B> )&1%'(_J P,Y(*$O0*.%&= ;)*C(B(%,>(0? )(B0(%A %(a1()>*>&*1)( 78*****OB<1>*P;CB,L*P1==,%H =+-O$_J>%1( ,)*,00%*&.*D&B(? +QPR*;)*)(B>*2H*S:,BB(L/P>,>( ***F:(B*>:(*MN*':,BC()*.%&=*;0L( ***>&*21)H*01(*>&*SST*,B07&%*UTVA ***,B0*2H*D,>,/$1=<*,>*9GP>,%>? (G<&%> STUSWX*;)*)(B>*2H*9GS&&%0;B,>;&B 4=+-O$6 ***>&*>(%=;B,>(*,*2,'-&..*,B0*%(>1%B ***>:(*%();01,L*2,'-&..*'&1B>*Y,L1(? ODXW*;)*)(B>*2H*S:,BB(L/P>,>(*,>*>:( ***(B0*&.*>:(*N5*;B>(%Y,L*4)((*#?5?3K6 ***>:,>*21)H*MN*:,)*2((B*;0L(*4SST*Z 'B> ***UTV6*.&%*DO[P*4WO[P*,.>(%*\G*(%%&%6? PX]9*;)*)(B>*2H*S:,BB(L/P>,>(*,>*>:( **4`K6 **4IJK6 ***(B0*&.*(,':*N5*;B>(%Y,L*4)((*#?5?3K6 ***F:;L(*>:(*MN*;)*;0L(? S:&&)(*%,B0&= \()1=(*F;>:*'&1B> +1)HA*O0L(*,B0*PL&>*,%(*.&%F,%0(0 )L&>SB>_J*',LL )L&>SB>_J*'B> 2,'-&..*'&1B> .%&=*',B'(LL(0 .%&=*S:,BB(L/P>,>(*Y;,*D,>,/$1=< \,B0&=4'F6 ;.*'B>*J*E3? 2,'-&..*;.*'B>IJK? F:(B*>%,B)=;>*;)*B&>*;B*<%&C%())?**87 T>*)>,%>*,))1=(*>:,>*>:(*MN S:,BB(L/+1)H ;)*21)H*1B>;L*%('(;Y;BC*,*);CB,L F:;':*;B0;',>()*>:(*MN*;)*;0L(? 9%,B);>;&B)*>& S:,BB(L/O0L( O0L( PL&> +1)H S,B'(L ,L)&*,L;CB*>:( +,'-&..*);CB,L ,%%;Y,L*>;=(*>& )L&>*2&1B0,%H PL&>*&BLH*)(B> 4N56*>;=;BC? )B0/ Backoff process specification (part) [IEEE Std. 802.11-2007] Network Protocol Design and Evaluation Computer Networks and Telematics 73 Stefan Rührup, Summer 2009 University of Freiburg

  55. History of SDL ‣ 1968 ITU-T study on the impact of stored program control (SPC) systems (telephone exchanges) ‣ 1972 follow-up study on languages for human-machine interaction, specification and description, and programming ‣ 1976 first SDL standard (CCITT Orange book) with basic graphical language ‣ 1980 description of semantics (CCITT Yellow book) ‣ 1984 SDL becomes a formal language (CCITT Red book), data elements, graphical and textual notation [R. Reed, “Notes on SDL-2000 for the new millennium, Computer Networks (35), 2001] Network Protocol Design and Evaluation Computer Networks and Telematics 74 Stefan Rührup, Summer 2009 University of Freiburg

  56. History of SDL ‣ 1988 formalization completed, syntax, language grammar and semantics consolidated. SDL-88 is the foundation of all subsequent versions. [sdl-forum.org/sdl88tutorial/] ‣ 1992 object features introduced in SDL-92 ‣ 1995 SDL with ASN.1 (ITU-T Recommendation Z.105) ‣ 1996 SDL-96 = SDL-92 + corrections and extentions ‣ 1999 object modeling and a new data model in SDL-2000 [R. Reed, “Notes on SDL-2000 for the new millennium, Computer Networks (35), 2001] Network Protocol Design and Evaluation Computer Networks and Telematics 75 Stefan Rührup, Summer 2009 University of Freiburg

  57. SDL and UML History state machines SDL-76 1980 Harel’s state charts (’87) SDL-88 Booch, OMT 1990 MSC-92 SDL-92 UML draft (1995) UML 1.1 (1997) SDL UML 2000 MSC-2000 SDL-2000 Profile UML 2.0 (2005) SysML 1.0 UML 2.2 (2007) 2010 (2009) Network Protocol Design and Evaluation Computer Networks and Telematics 76 Stefan Rührup, Summer 2009 University of Freiburg

  58. SDL and UML UML SDL collection of notations for describing formal language focusing on structural different views of a system, including and state machine views structure, state machine, interaction, collaboration etc. interactions are modeled by MSC weak semantics with many variation complete semantics points mapping of subsets UML SDL ↔ SDL UML defined in [ITU Z.109] B. Møller-Pedersen: “SDL combined with UML”, Telektronikk 4.2000] Network Protocol Design and Evaluation Computer Networks and Telematics 77 Stefan Rührup, Summer 2009 University of Freiburg

  59. SDL and UML UML SDL UML SDL SDL UML Use Cases Collaborations Object/Class Instance/Type Action Language UML-SDL Profile Interactions State Machine State Machine Activity Deployment Mapping subsets of UML and SDL [B. Møller-Pedersen: “SDL combined with UML”, Telektronikk 4.2000] Network Protocol Design and Evaluation Computer Networks and Telematics 78 Stefan Rührup, Summer 2009 University of Freiburg

  60. Lessons learned ‣ Basic finite state machine models are not sufficient to model concurrent and communicating processes such as network protocols. ‣ Therefore extended FSMs with channels and variables were introduced ‣ Processes in SDL are based on this concept ‣ There are similarities to UML state machines. However, SDL has the stronger semantics Network Protocol Design and Evaluation Computer Networks and Telematics 79 Stefan Rührup, Summer 2009 University of Freiburg

  61. Message Sequence Charts ‣ Similar to UML Sequence Diagrams ‣ formal graphical language ‣ defined in [ITU-T Recommendation Z.120] Source: http://www.itu.int/ITU-T/studygroups/com10/languages/ ‣ describes behavior of communicating instances for specific executions (scenarios, traces) Network Protocol Design and Evaluation Computer Networks and Telematics 80 Stefan Rührup, Summer 2009 University of Freiburg

  62. MSC Basics: Instances msc cs_operation instance instance name client server instance head request(sid) input message message time instance axis name parameters response(data,status) output instance end Network Protocol Design and Evaluation Computer Networks and Telematics 81 Stefan Rührup, Summer 2009 University of Freiburg

  63. MSC Basics: Messages msc cs_operation client server message from the init environment req req transmission delay data2 m data1 self-message lost message with server found message with intended target client supposed source Network Protocol Design and Evaluation Computer Networks and Telematics 82 Stefan Rührup, Summer 2009 University of Freiburg

  64. MSC Basic assumptions ‣ Communication is performed by means of messages ‣ Sending and receiving is asynchronous ‣ No event ordering ‣ There is a global clock ‣ Events of different instances are ordered via messages (send before receive, partial ordering) Network Protocol Design and Evaluation Computer Networks and Telematics 83 Stefan Rührup, Summer 2009 University of Freiburg

  65. Instance creation and termination msc cs_operation parameters client server (p1,p2) confirm createline symbol stop confirm stop symbol Network Protocol Design and Evaluation Computer Networks and Telematics 84 Stefan Rührup, Summer 2009 University of Freiburg

  66. Timers inst1 timer start t1 timer name (required), t2,ti1 timer instance name (optional) timeout t1 t2 [10,15] duration (optional) with duration [min,max] t3 t2 [2] restart timeout t3 timer stop duration = [0,infinity] unless otherwise specified Network Protocol Design and Evaluation Computer Networks and Telematics 85 Stefan Rührup, Summer 2009 University of Freiburg

  67. Conditions msc cs_operation client server guarding when connected condition req process action request response setting disconnected condition Network Protocol Design and Evaluation Computer Networks and Telematics 86 Stefan Rührup, Summer 2009 University of Freiburg

  68. Conditions ‣ Conditions contain labels (condition names) ‣ Setting conditions • a state-like condition requires setting of the respective labels associated with the covered instances ‣ Guard conditions • true, if the labels have a non-empty intersection with the labels associated with the covered instances • may contain boolean expressions • dynamic variables of the guard are only from the active instance (only one instance can be active) Network Protocol Design and Evaluation Computer Networks and Telematics 87 Stefan Rührup, Summer 2009 University of Freiburg

  69. MSC Reference msc cs_operation msc ds_operation client dispatcher server dispatcher server req g1 req gate MSC reference conn reply(state) ds_operation MSC reference name ack response g2 data response Network Protocol Design and Evaluation Computer Networks and Telematics 88 Stefan Rührup, Summer 2009 University of Freiburg

  70. MSC Reference msc cs_operation client dispatcher server req g1 gate MSC reference conn_establishment MSC reference name ack g2 loop <2,4> executed 2 - 4 times ds_operation further execution options: fin exc exception disconnect opt optional par parallel seq sequential Network Protocol Design and Evaluation Computer Networks and Telematics 89 Stefan Rührup, Summer 2009 University of Freiburg

  71. MSC msc setupChannel msc connection Base Mobile Infrastr. Base Mobile Reference RserveCh Example when idle Confirm Lock ConnReq Locked setupChannel msc exchangeData Sync Base Mobile SyncAck Ready DataReq Lookup Response connected Data Ack DataAck exchangeData Close msc disconnect Base Mobile disconnect Confirm Ack CfAck Unlock idle ChDown [Grabowski, Reed: “ ASN.1, MSC, SDL and TTCN Today”, Tutorial, WITUL 2004] Network Protocol Design and Evaluation Computer Networks and Telematics 90 Stefan Rührup, Summer 2009 University of Freiburg

  72. Inline expressions msc example Inst1 Inst2 conn_req conn_ack data t1 Inline expression alt t1 conn_reset Two alternatives separator data_ack t1 Network Protocol Design and Evaluation Computer Networks and Telematics 91 Stefan Rührup, Summer 2009 University of Freiburg

  73. Nested and guarded inline expressions msc inline_example_2 Inst1 Inst2 conn_req conn_ack Guard when conn_established loop<0,inf> data t1 Nested inline alt expression t1 conn_reset data_ack t1 Network Protocol Design and Evaluation Computer Networks and Telematics 92 Stefan Rührup, Summer 2009 University of Freiburg

  74. Time observation Absolute @a1 Time ?r2 call openConnection(port) Relative Time response call requestAccess(uid,pwd) reply [Ø. Haugen: “MSC-2000 Interaction for the new Millenium”, sdl-forum.org/MSC2000present] Network Protocol Design and Evaluation Computer Networks and Telematics 93 Stefan Rührup, Summer 2009 University of Freiburg

  75. Time constraints msc time_example Inst1 Inst2 Inst3 Relative measurement of msg1 time &t msg duration call proc1(x) Relative time constraint for msg duration proc1(x) msg2 time (0,2*t] Relative time [1,2*t) constraint for disconnect execution [Ø. Haugen: “MSC-2000 Interaction for the new Millenium”, sdl-forum.org/MSC2000present] Network Protocol Design and Evaluation Computer Networks and Telematics 94 Stefan Rührup, Summer 2009 University of Freiburg

  76. Method calls and control flow Method call msc call_example Inst1 Inst2 Inst3 Method call gate call p1 Method area call p2(x,y) call p3 Suspension area p3 p2(x,y) Reply p1 Reply gate Network Protocol Design and Evaluation Computer Networks and Telematics 95 Stefan Rührup, Summer 2009 University of Freiburg

  77. High level MSCs msc systemOverview HMSC start Idle Connection point User accepted User rejected MSC Reference Restrictive Loop unlocked condition Alternative Unlocked reset Unlocked timeout Unlocked unclosed [Ø. Haugen: “MSC-2000 Interaction for the new Millenium”, sdl-forum.org/MSC2000present] Network Protocol Design and Evaluation Computer Networks and Telematics 96 Stefan Rührup, Summer 2009 University of Freiburg

  78. High-level MSCs ‣ HMSCs describe the combination of basic MSCs ‣ Elements are references to MSCs and their connections ‣ HMSCs give an overview of alternative message sequences ‣ Higher level of abstraction: instances and interactions (message transmissions) are hidden Network Protocol Design and Evaluation Computer Networks and Telematics 97 Stefan Rührup, Summer 2009 University of Freiburg

  79. MSC in practice: 802.11 Specification %###&'()*++&!,-& %###&'()*++&!,- !"# "$"# "$"# !"# MAC sublayer station 3HPBGB>M&$>&AHOKHG$& management entity management LHJGKAHLHM$&NA>L&?HHA& #51& entity 4.4", 4HJGKAHLHM$& 4.4", 46"<="#5*AHO& 6HOKHG$&NAJLH& 46"<="#5*BM%& 4.4", 46"<="#5*PNL& 3HPBGB>M&$>&JPPH?$& LHJGKAHLHM$&AHOKHG$& NA>L&?HHA&#51& 4.4",& 4"1#=6"*AHO& 4HJGKAHLHM$& ?A>PHGG& 4.4",& 4"1#=6"*PNL& 0>L?BFH& LHJGKAHLHM$& AH?>A$& 4.4",& 4HJGKAHLHM$& 4.4",& 46"7/65*BM%& 6H?>A$&NAJLH& 46"7/65*AHO& 4.4", 46"7/65*PNL& 4HJGKAHLHM$& AHOKHG$& P>L?FH$H%& Msg. sequence of a channel measurement [IEEE Std. 802.11-2007] Network Protocol Design and Evaluation Computer Networks and Telematics 98 Stefan Rührup, Summer 2009 University of Freiburg

  80. MSC Review ‣ Graphical formal language for describing inter-object behaviour ‣ Application: specifying requirements in the form of scenarios , documenting test cases etc. ‣ Partial order semantics, no causality ‣ Extensions: High level MSCs ‣ Are MSCs sufficient to generate code? Network Protocol Design and Evaluation Computer Networks and Telematics 99 Stefan Rührup, Summer 2009 University of Freiburg

  81. Shortcomings of MSC Semantics ‣ Existential or universal? • Description of a sample run or mandatory protocol? ‣ Safety and Liveness • MSCs only express safety (no more bad things happen), but not liveness (something will eventually happen) • Progress cannot be enforced ‣ No simultaneous events ‣ Rudimentary timing and conditions without semantics before MSC-2000 [M. Brill, W. Damm, J. Klose, B. Westphal, H. Wittke: Live Sequence Charts: An Introduction to Lines, Arrows, and Strange Boxes in the Context of Formal Verification. SoftSpez Final Report 2004] Network Protocol Design and Evaluation Computer Networks and Telematics 100 Stefan Rührup, Summer 2009 University of Freiburg

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend