Download presentation
Presentation is loading. Please wait.
Published byLeona Dalton Modified over 9 years ago
1
Introduction to SDL Bibliography: [Doldi2001] L. Doldi, (2001), SDL Illustrated. [Edwards2001] S. Edwards, (2001), SDL, http://www.cs.columbia.edu/~sedwards/classes/2001/w4995- 02/presentations/sdl.ppt. [ABS2002] A. Alkhodre, J.-P. Babau, and J.-J. Schwarz, "Modelling of real- time constraints using SDL for embedded systems design," Computing & Control Engineering Journal, vol. 13, pp. 189-196, 2002. http://www.cs.columbia.edu/~sedwards/classes/2001/w4995- 02/presentations/sdl.ppt
2
Dept. of Software and IT Engineering Introduction to SDL 2 SDL: Specification and Description Language ITU-T (International Telecommunication Union) Recommendation Z.100 Created for the specification of communication protocols Two forms: Textual (SDL/PR) et Graphic (SDL/GR)
3
Dept. of Software and IT Engineering Introduction to SDL 3 SDL Two aspects: 1. Structure of a specification in SDL 2. Behavior of a specification in SDL
4
Dept. of Software and IT Engineering Introduction to SDL 4 Structure: Basic components Three basic components in SDL System Block Process
5
Dept. of Software and IT Engineering Introduction to SDL 5 System: Highest level
6
Dept. of Software and IT Engineering Introduction to SDL 6 Block: middle level(s)
7
Dept. of Software and IT Engineering Introduction to SDL 7 Process: lowest level
8
Dept. of Software and IT Engineering Introduction to SDL 8 Communication in SDL Signal Models an event that is communicated between processes, blocks, or systems Channel Models the means of transferring a signal between two blocks, or a block and the external environment Signal route Models the means of transferring a signal between two processes
9
Dept. of Software and IT Engineering Introduction to SDL 9 SDL Signals General format: Signal_name(parameters) Simplest format start Format with values A(true) (message with a Boolean argument) dial(number) get_request(file, username) Parameters in SDL can be rather complex if necessary (supports ASN.1)
10
Dept. of Software and IT Engineering Introduction to SDL 10 Signal address Source address (process that sent it) Useful when there are more than one instance of the same process e.g., in the case of a server that handles many requests from different clients, each request can be run in a separate concurrent process, which are different instances of the same process
11
Dept. of Software and IT Engineering Introduction to SDL 11 SDL Channels Signal channel, between blocks communication delays are uncertain Signal route, in the same block (computer), between processes Almost instantaneous
12
Dept. of Software and IT Engineering Introduction to SDL 12 SDL Channels (2) A signal can travel across several channels on its way from the source to destination
13
Dept. of Software and IT Engineering Introduction to SDL 13 SDL: Behavior A process in SDL is modeled as a finite- state machine (actually extended, communicating FSM). System behavior A process can be created or terminated dynamcially
14
Dept. of Software and IT Engineering Introduction to SDL 14 Specification in SDL An SDL specification is a group of communicating modules An SDL specification is a group of ECFSM (extended communication finite- state machines)
15
Dept. of Software and IT Engineering Introduction to SDL 15 Finite State Machines A finite state machine has: States Inputs (events) Transition function Outputs (events) Examples…
16
Dept. of Software and IT Engineering Introduction to SDL 16 FSM: Example
17
Dept. of Software and IT Engineering Introduction to SDL 17 (Some) properties of FSM Deterministic Non-deterministic Complete Partial Connected …
18
Dept. of Software and IT Engineering Introduction to SDL 18 Extended Finite State Machine It’s an FSM that has state variables For complex problems, the state-space can explode Can be reduced by using state variables 3 additional features Input/Output events can have parameters Use of predicates for firing transitions Variables can be modified during a transition Examples…
19
Dept. of Software and IT Engineering Introduction to SDL 19 Example of EFSM
20
Dept. of Software and IT Engineering Introduction to SDL 20 Extended Communicating Finite State Machine (ECFSM) It’s an EFSM that can communicate with other EFSM Each EFSM has it’s own (input) queue If M1 sends a message to M2, the message is put in M2’s queue
21
Dept. of Software and IT Engineering Introduction to SDL 21 ECFSM: Example - Means a message is sent + means a message is received 1 2 -B +A -C 1 2 +B-A M2 M1
22
Dept. of Software and IT Engineering Introduction to SDL 22 SDL Process A process in SDL is an ECFSM Execution rule: take the next signal (message) from the queue and... Update variables Process branch decisions Send a new signal … Determine the next state End
23
Dept. of Software and IT Engineering Introduction to SDL 23 SDL Process (2) Text and graphic forms state Wait; input Money(a); task x := a; nextstate Pay; input Cancel; nextstate Wait; endstate; Wait Money Pay Cancel Waitx := a
24
Dept. of Software and IT Engineering Introduction to SDL 24 SDL Process (3) Transition rules At any given state, remove a signal from the input queue If a transition is defined for this signal, then Fire the transition Output signal(s) Modify internal variables, etc. Else (no transition defined for this signal) Ignore the signal and stay in the same state
25
Dept. of Software and IT Engineering Introduction to SDL 25 State symbol Indicates either the current state or the next state, depending on its use inactive ready
26
Dept. of Software and IT Engineering Introduction to SDL 26 Start State Indicates the start of a process Nameless ready...
27
Dept. of Software and IT Engineering Introduction to SDL 27 Receive symbol Follows a State symbol Indicates the Signal activating a transition [Edwards2001] Idle CoinChoiceClear...
28
Dept. of Software and IT Engineering Introduction to SDL 28 Receiving a signal Set of valid signals Contains all signals a process can receive Any signal not in this set will produce an error At a given state, only certain signals can activate a transition If a (valid) signal is received but it has no defined transition, the signal is destroyed without causing a transition This is called an implicit transition
29
Dept. of Software and IT Engineering Introduction to SDL 29 Save symbol Allows a signal to be accepted and stored again into the input queue (without losing it) Useful when signals can get re-ordered [Edwards2001] Idle CoinClear Choice A “Choice” signal that arrives in this state will be deferred to the next
30
Dept. of Software and IT Engineering Introduction to SDL 30 Output symbol Sends a signal to another process Explicit forms « VIA channel » et « TO process » The channel by which the signal is sent is determined by the signal’s type A(s)
31
Dept. of Software and IT Engineering Introduction to SDL 31 Explicit output VIA channel or TO process e.g., a process that needs to resend the same signal it has received To avoid receiving again the same signal, a channel can be specified There are other cases… “VIA” the channel named MB
32
Dept. of Software and IT Engineering Introduction to SDL 32 Local variables A process has local variables Shared variables Modified only by the process itself Read by other processes (in certain cases) Declared textually
33
Dept. of Software and IT Engineering Introduction to SDL 33 Important! There are no global variables in SDL!!!
34
Dept. of Software and IT Engineering Introduction to SDL 34 Variable types integer, Boolean, real, character, string Operators +, -, *, etc. Arrays, enumerations et sets
35
Dept. of Software and IT Engineering Introduction to SDL 35 Task symbol Assignment statements, expressions Informal text Incomplete specification, to be detailed later Useful during simulation
36
Dept. of Software and IT Engineering Introduction to SDL 36 Decision symbol Branch according to a condition Expression form a=e Informal ‘message’
37
Dept. of Software and IT Engineering Introduction to SDL 37 Process Creation symbol Creates (instantiates) a new process after a transition Channels aren’t duplicated Make sure that a message is sent to the right instance Specification of the number of instances CallHandler CallHandler(0,63) [Edwards2001]
38
Dept. of Software and IT Engineering Introduction to SDL 38 Process creation Convention: independent handling of a request Like a daemon in Unix (lpd, httpd, etc.) e.g., create a new server process to handle a file-transfer request The process “dies” when the file has been sent Set the maximum number of process instances because resources are limited
39
Dept. of Software and IT Engineering Introduction to SDL 39 Process creation Process is running at all times (one and only one instance) Process starts out as inactive. No more than one instance. No processes running at first, but up to 64 instances. CallHandler(1,1) CallHandler(0,1) CallHandler(0,64)
40
Dept. of Software and IT Engineering Introduction to SDL 40 Terminating a process Only a process can terminate ‘last task’
41
Dept. of Software and IT Engineering Introduction to SDL 41 Timers att_ack TB(r) reset(T) Timer T; A(s)... set (now+10, T) A(s) Once a timer has expired, the process receives a message. A timer is declare like a variable Duration of timer is specified here Timer is deactivated
42
Dept. of Software and IT Engineering Introduction to SDL 42 SDL: Inside information… SDL has two “close cousins” ASN.1 MSC They are always together on projects that are serious.
43
Dept. of Software and IT Engineering Introduction to SDL Examples 43 Documenting Software Architectures: Views and Beyond by Paul Clements; Felix Bachmann; Len Bass; David Garlan; James Ivers; Reed Little; Robert Nord; Judith StaffordPaul Clements; Felix Bachmann; Len Bass; David Garlan; James Ivers; Reed Little; Robert Nord; Judith Stafford Publisher: Addison-Wesley Professional Pub Date: September 26, 2002
44
Dept. of Software and IT Engineering Introduction to SDL Examples 44 Documenting Software Architectures: Views and Beyond by Paul Clements; Felix Bachmann; Len Bass; David Garlan; James Ivers; Reed Little; Robert Nord; Judith StaffordPaul Clements; Felix Bachmann; Len Bass; David Garlan; James Ivers; Reed Little; Robert Nord; Judith Stafford Publisher: Addison-Wesley Professional Pub Date: September 26, 2002
45
Dept. of Software and IT Engineering Introduction to SDL Example: (MSC) 45 Documenting Software Architectures: Views and Beyond by Paul Clements; Felix Bachmann; Len Bass; David Garlan; James Ivers; Reed Little; Robert Nord; Judith StaffordPaul Clements; Felix Bachmann; Len Bass; David Garlan; James Ivers; Reed Little; Robert Nord; Judith Stafford Publisher: Addison-Wesley Professional Pub Date: September 26, 2002
46
Dept. of Software and IT Engineering Introduction to SDL Exercise http://www.comnets.uni- bremen.de/typo3site/uploads/media/Ex ercise6.pdfhttp://www.comnets.uni- bremen.de/typo3site/uploads/media/Ex ercise6.pdf 46
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.