asn.1, ttcn • specification and description language (sdl ... · • specification and...
TRANSCRIPT
![Page 1: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/1.jpg)
1 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Protocol Specification Theory• Message Sequence Charts (MSC)• Specification and Description Language (SDL)• ASN.1, TTCN• Protocol Engineering Process (PEP)
![Page 2: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/2.jpg)
2 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Telecom systems engineering is still a huge industry– networks, terminals, services
• Datacom networks consist of protocols– IP technologies today and in future are based on protocols– protocols exist between services and applications– also security systems include protocols
• Basic ideas about protocol systems are portable to every systems that communicate– independent of methods and languages
• Research and industry have use for the know how– research centers, software and hardware manufacturers, telecom
and datacom operators, ISPs, content providers, ...• Open vacancies at VTT Information Technology, Nokia Research
Center, Helsinki University and Helsinki University of Technology!
![Page 3: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/3.jpg)
3 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Protocol Engineering Process Overview
Protocol engineering covers the whole life-cycle of a protocol
� requirements are set during overall system design� protocol design produces complete specification� specification needs to be verified� protocol implementation is derived from specification� implementation must be tested thoroughly
![Page 4: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/4.jpg)
4 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
History of protocol engineering
� First communication protocols were designed in late 60s (alternating bit protocol by Bartlett at al in 1969)
� Theory of protocol verification dates back to late 70s (IBM Zurich 1978)
� Special-purpose protocol design languages were developed during 80s
� The increase of CPU power has made analysis of moderate sized real life protocols feasible during last 5 years
� Protocol design and implementation tools and development environment products since early 90s
![Page 5: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/5.jpg)
5 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Protocol engineering as a discipline of its own
Protocolengineering
Communicationsystems
Formallanguages
Softwareengineering
![Page 6: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/6.jpg)
6 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Overview
Protocol ArchitecturesObject Modeling
Signaling ProceduresProtocol Data
Protocol Behavior
![Page 7: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/7.jpg)
7 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Protocol architectures: designing layers
� allocate a well-defined function for each layer
� keep the number of layers to the minimum
� create a layer boundary at a point where the number of interactions is minimized
� design interlayer interactions as service primitives (confirmed and unconfirmed services)
� use layers to allow different levels of abstraction
� allow changes to layer functions or even change of a complete layer protocol without affecting other layers
=> set of functional protocol entities composing a stack
![Page 8: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/8.jpg)
8 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Interactions between protocol entities can be described as signaling procedures.
Description method for signaling procedures is Message Sequence Chart (MSC) Notation, standardized by ITU-T in Rec Z.120
Similar notation in UML: Sequence Diagrams
Software tools for editing MSC diagrams, e.g. SDT MSC editor
![Page 9: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/9.jpg)
9 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Graphical MSC notation
� entities = vertical lines with names
� signaling messages = arrows
� messages have names
� order of messages MSC-diagram is not a complete description of the behavior of entities, typically only basic (successful) cases are described asMSCs
![Page 10: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/10.jpg)
10 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
MS BSCBTS-newBTS-old
Channel_activate
Channel_activate_ack
Handover_commandHandover_command
Handover_accessloop
Handover_detect
Physical_information
Move_to_new_channel
Handover_completeHandover_complete
![Page 11: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/11.jpg)
11 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
The MSC diagrams from the previous step describe information as messages with names, but no detailed contents.
This representation is called the abstract syntax ofPDUs
PDUs are derived from MSC diagrams as� messages, which are composed of� information elements, which are composed of� parameters with specified data types
For transmission the PDU encoding is defined as� exact encoding of each parameter data type as bits and bytes� (optional) identifiers for information elements and PDUs� exact bit and byte order
![Page 12: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/12.jpg)
12 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Design methods:� the most common informal method is to use bit/byte maps,
which make no distinction between abstract and transfersyntaxes
� abstract syntax definition languages: ASN.1, XDR, CORBA IDL� encoding rules are associated to abstract syntax definition
languages: Basic Encoding Rules (BER), Packed ERs (PER)
Design tools� graphical message editors� abstract syntax language tools, e.g. ASN.1-to-C translators like
the Nokia CASN Compiler for ASN.1� data definition within integrated design environments, e.g. SDT
![Page 13: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/13.jpg)
13 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
The MSCs resulting from the system design are used as starting point for this step
Not only the basic scenarios but also error situations must be taken into account
Protocol entities are usually modeled as state automata
Correctly behaving protocol entity must� accept all correct sequences of input messages� detect any incorrect sequence of messages� recover from such protocol errors
![Page 14: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/14.jpg)
14 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
FSA model of a protocol
(i) set of input elements I and set of output elements O, i.e. PDUs and Abstract Service Primitives (ASPs)
(ii) set of states S and state transition function succ:
S x I -> S (input transitions)succ
S x O -> S (output transitions)
![Page 15: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/15.jpg)
15 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
The resulting representation of protocol entity is extended finite state automaton (EFSA)
Example of a graphical EFSA notation is UML State Chart
Software tools for editing State Charts, e.g. SDT SC editor
Basic FSA notation is usually extended by� typed variables within state automaton (context variables)� typed parameters within input and output messages� conditions (predicates) for state transitions may be given as
Boolean expressions� transitions may include actions given as block statements� hierarchical states
![Page 16: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/16.jpg)
16 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Correctly designed automaton must fulfill following design criteria
� guaranteed provision of service
� absence of unwanted behavior with no progress
Well-defined engineering practice is needed to meet these criteria
� design languages: UML, MSC, SDL and ASN.1� design tools: SDT editors, simulator and validator
![Page 17: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/17.jpg)
17 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
- Requirements- Analysis- Design- Implementation- Testing- Maintenance
- Requirements- Analysis- Design- Specification- Verification
Protocol SpecificationProcess
Protocol ImplementationProcess
Specification
Implementation
• Iterative, parallel
• Two related processes
![Page 18: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/18.jpg)
18 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Phases inside processes are also iterative
Requirements Analysis Design
Implementation
Testing
Maintenance
![Page 19: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/19.jpg)
19 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Summary of protocol engineeringProtocol life-cycle� problem - results into requirements� analysis - results into tentative solution� design - results into specification� verification - results into proved specification----------� implementation - results into executable software� testing - results into final software
Methods and languages for each phase� UML for requirements capturing and analysis� MSC diagrams for signaling procedures� SDL with ASN.1 for protocol entity design� Reachability analysis for verification� C code generation for software implementation� TTCN with ASN.1 for software testing
![Page 20: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/20.jpg)
20 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
MSC notation� descriptive specification of communication behaviour
of system components and their environment by means of message interchange (design phase)
� expressive trace language for visualization of observed behaviour (simulation and testing phases)
Notation has been standardized by ITU in Draft RecZ.120
MSC may be given in two forms� visual syntax with graphical representation � program-like textual syntax
![Page 21: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/21.jpg)
21 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Areas of application
� descriptive specification of real-time systems, especially telecom networks and protocols
� specification of partial behaviour only
More formal design uses MSC diagrams as input
MSCs may be used in� requirements specification� interface specification� validation, simulation and animation (tracing)� test-case specification� documentation
![Page 22: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/22.jpg)
22 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
MSC building blocks
Basic MSC is built of elements like� instances� events� messages
Structuring mechanisms for building more complex MSCs� Decomposition and refining of an instance� Composition of MSCs
A collection of MSCs describing a system are collected into an MSC document.
All basic elements and structuring mechanims have graphical symbol of their own.
![Page 23: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/23.jpg)
23 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
An introduction to the ASN.1 language
![Page 24: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/24.jpg)
24 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• How to specify messages that are to be exchanged between two communicating systems (e.g. protocols)?
Transmission media
System A
System B
Message MessageMessage informationcontents is the same,but representationmay differ
Common transmission format
![Page 25: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/25.jpg)
25 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• A message can be viewed from two abstraction levels
Message Message01101001 10110101
Concrete level
Abstract level
Encoding Decoding
Representation during transmission=
Transfer syntax
Representation inside systems=
Local syntax
Logical message information contents = Abstract syntax
![Page 26: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/26.jpg)
26 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Abstract syntax of a PDU deals with– composition of a PDU from information elements– data types of information elements
• No attention to bits or bytes of the PDU being constructed– Responsibility of abstract syntax: Contents of a
message– Responsibility of transfer syntax: Message
representation
• Message transfer syntax is derived from message abstract syntax
![Page 27: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/27.jpg)
27 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• ASN.1 is a data type definition language
• Basic data concepts– Record => SEQUENCE type– List/array =>
SEQUENCE OF type– Mutually exclusive alternatives => CHOICE
type– Primitive data types => ASN.1 primitive
types– Constants => values
• Structuring– Package/module => module
![Page 28: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/28.jpg)
28 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Example:
MyModule MODULE DEFINITIONS ::=
BEGIN
MyType ::= INTEGER
myValue INTEGER ::= 100
END
• ASN.1 is similar to type specification parts of programming languages
A type definition.
A value definition
A module definition
![Page 29: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/29.jpg)
29 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Transfer syntax is needed for network data• Network data is designed at abstract syntax level• ASN.1• BER, CER, DER, PER
![Page 30: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/30.jpg)
30 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Contents– Basics of SDL
• Structure and Behaviour of Systems• Data in SDL
– Building a Functional Model with SDL– Protocol Engineering with SDL
• combining ASN.1• building protocol stacks
– More advanced features of SDL• Telechess protocol as an example
![Page 31: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/31.jpg)
31 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
� Specification and Description Language
� Standardised by ITU-T (former CCITT)
� Recommendation Z.100, CCITT Blue Book
� Designed for systems engineering
� First version 1988, new version 1992 (object concepts)
� Formal language
� Can also be used for implementation
![Page 32: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/32.jpg)
32 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Reactive systems: input - output– Telecommunication systems and protocols
• Discrete systems– Finite State Machines (FSM)
• Not suitable for– Continuous systems
• steering a car– Heavy calculation
• weather models
![Page 33: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/33.jpg)
33 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Unambiguous specification of systems• Can be applied in many phases
– specification– design– implementation– documentation
• Supports also informal specifications• Formality does not say how to specify an arbitrary
system
![Page 34: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/34.jpg)
34 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• SDL system is a model of a real world system– definition of system components– hierarchical model– Does not restrict the model, no absolute patterns
• a System consists of– blocks, that are connected with channels
• a Block consists of– processes, that are connected with signal routes– sub-blocks, that contain sub-blocks or processes
• a Process has– attributes defined with variables and external procedures– behaviour defined with EFSM, with states and transitions
• Types can be defined for – systems, blocks and processes
![Page 35: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/35.jpg)
35 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Types can be used to– define instance sets and instances– to define subtypes with inheritance
• Topics not covered– services– refinement– specialisation
![Page 36: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/36.jpg)
36 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Hierarchical structures of an SDL system• Blocks are connected with channels
– channels vs. signal routes • No behaviour
– abstract structures, black boxes• Usually contains signal and data type definitions
– header kind of definitions– local name space
![Page 37: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/37.jpg)
37 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
![Page 38: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/38.jpg)
38 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
![Page 39: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/39.jpg)
39 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Channels usually are connected also to the environment– otherwise no external input/output to/from the system
• Environment has processes– other parts of the real world system that are
connected to the SDL system• e.g. users, large telecom system components
– they are not specified with SDL• Environment observes and controls the system
– user interfaces, key pads, etc.
![Page 40: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/40.jpg)
40 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Basic components modelling the real world system• Processes have
– attributes (data)– behaviour (state machine)
• Processes communicate– with each other and with their environment– using signals (or other similar mechanisms)
• Autonomous particles• Behaviour <--> Signalling• Signalling is asynchronous• Communication is defined by
– signals– signal lists– signal routes
![Page 41: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/41.jpg)
41 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
![Page 42: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/42.jpg)
42 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Behavior is defined for processes– blocks cannot have any behavior, they are only hierarchical
building blocks• Behavior is defined by using Extended Finite State
Machines– Extended = variables are used– SDL has its own graphical language for state machines
• Input-Action-Transition defines the behavior– a signal is received– some tasks are carried out, signal(s) sent out– transition to another state
• Conventional programming is possible– procedures– control structures– etc.
![Page 43: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/43.jpg)
43 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
![Page 44: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/44.jpg)
44 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Two levels– built-in features– new operators
• General data concepts and terminology– Values, Variables, Expressions, Literals, Operators
• SDL data types are ‘usual data types’• History:
– Derived from LOTOS (ISO 8807)– ACT-ONE model (defining operators axiomatically)
• specifies what properties are• hard to master
• Built-in features are usually adequate for specifications and protocol engineering
![Page 45: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/45.jpg)
45 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Variable definition notation– resembles Pascal notation
• Predefined types– Integer– Character– Boolean– Pid (==process identifier)– Time– Duration
• Predefined generators– string, struct, array, powerset– e.g. charstring is defined using generators
![Page 46: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/46.jpg)
46 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Normal record type– much like a C struct
• Exclamation mark (!) denotes fields
newtype MyStruct structname Charstring;age Integer;
endnewtype MyStruct;dcl record MyStruct;
record!name= ‘John’
![Page 47: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/47.jpg)
47 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Array(type IndexType, type ElementType)• ‘Normal’ Array types• No range defined!
newtype MyArrayArray(Integer, Character)
endnewtype MyArray;dcl chars MyArray;
chars(5):=‘i’
![Page 48: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/48.jpg)
48 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Defines a list of values (or a set)• Has a formal parameter: Emptylist
– creates an empty list
newtype MyStringString(MyRecord, Emptystring)
endnewtype MyString;dcl set MyString;
set(5)!age := 27
![Page 49: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/49.jpg)
49 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Used for defining more meaningful type names– e.g. for signal parameters
• Used for enumerated (lueteltu) types– e.g. for limited values
• Synonym is more like renaming• Example:
syntype AgeType = Integer constants 0:120 endsyntype;dcl myAge AgeType;synonym Address Charstring;
![Page 50: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/50.jpg)
50 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• Behaviour of the system can be divided in two– internal => processes
• states and transitions– external => interacting with the environment
• inputs and outputs• Behaviour is defined using state machine language
– Extended Finite State Machine (EFSM)• uses variables as an extension to ‘state space’
– Graphical notation
![Page 51: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/51.jpg)
51 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Initiating a process in start up (example)– start-up symbol– task symbol
• can be used e.g. for process initialisation
– output symbol– timer start– state symbol
• first real state
NextDoor:=1
Allocate(NextDoor)
Set(AllocTimer)
Wait_Allocated
![Page 52: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/52.jpg)
52 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
State transitions– input symbol
• a signal from another process
• a remote procedure call– actions
• tasks, output-symbols, timers, procedure calls, etc.
– new state• actual transition or to
remain in the same state
WaitCode
Code(CodeData)
RESET(CodeTimer)
CardAndCode(CardData,CodeData)
SET(CentralTimer)
WaitCentral
![Page 53: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/53.jpg)
53 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
Control structures– decision symbol
• evaluation => decision– in- and out-connectors– procedure calls and
macro outlets– enables ‘normal’
programming structures with SDL
NextDoor:=NextDoor+1
NextDoor>DOORMAX
Allocate(NextDoor)
WaitAllocated
All_Allocated
ErrorhandlingSetAllocated
Decision
Connector
Procedurecall
False True
![Page 54: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/54.jpg)
54 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• SDL with real time systems– Telecommunication systems especially
• Implementation phase– not usually necessary in specification phase
• Used for– controlling the release of limited resources– controlling the answers from unreliable peers– issuing actions on regular basis
![Page 55: ASN.1, TTCN • Specification and Description Language (SDL ... · • Specification and Description Language (SDL) • ASN.1, ... MS BSC BTS-new ... Specification and Description](https://reader037.vdocuments.net/reader037/viewer/2022102920/5b1695c77f8b9a596d8ccf95/html5/thumbnails/55.jpg)
55 (154) © Tik-109.401 /Aanen, TKy, Mlu, MTu
• A stopwatch with alarm• A timer instance is like a process
– it is created, it dies and it can send a signal• A timer can be set, examined and resetted• timer heratys_aamuksi(kelloTyyppi):=8;/*h*/
• set (10 /*h*/, heratys_aamuksi(oma_kello))
• reset(heratys_aamuksi(oma_kello))
timer t := 14.5;set (t)
waiting
t late
reset (t)