sdl_net2

Upload: sourav-sen

Post on 06-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 sdl_net2

    1/54

    1

    Network Experiment

    Chi-I Hung

    Introduction of SDLIntroduction of SDL

    Chi-I HungCCL/ITRI

  • 8/3/2019 sdl_net2

    2/54

    2

    Network Experiment

    Chi-I Hung

    Collected by the United States Department of Defence

    from nine large software projects

    Software Projects StatisticsSoftware Projects Statistics

    N t k E i t

  • 8/3/2019 sdl_net2

    3/54

    3

    Network Experiment

    Chi-I Hung

    Software CostsSoftware Costs

    N t k E i t

  • 8/3/2019 sdl_net2

    4/54

    4

    Network Experiment

    Chi-I Hung

    Specification and Description LanguageSpecification and Description Language

    SpecificationSpecification----A specification of a system is the description

    of its required behaviour

    DescriptionDescription----A description of a system is the description

    of its actual behaviour

    The Purpose of SDLThe Purpose of SDLProvide a language for unambiguous specificationProvide a language for unambiguous specification

    and description of the behaviour ofand description of the behaviour of

    telecommunications systems.telecommunications systems.

    Network Experiment

  • 8/3/2019 sdl_net2

    5/54

    5

    Network Experiment

    Chi-I Hung

    Objective of SDLObjective of SDL

    Formal description technique Easy to understand both for creators

    (direct users) and viewers (non constructors

    of specifications)

    (graphical representation)

    Object oriented language Independent of design paradigm

    (e.g. function or object oriented)

    Independent of implementation(language, operating system, and hardware)

    Network Experiment

  • 8/3/2019 sdl_net2

    6/54

    6

    Network Experiment

    Chi-I Hung

    Usage of SDLUsage of SDL

    a) facility requirements;

    b) system specifications;

    c) ITU-T Recommendations, or other similar Standards

    (international, regional or national);

    d) system design specifications;

    e) detailed specifications;f) system design descriptions

    (both high level and detailed enough to

    directly produce implementations);g) system testing descriptions

    (in particular in combination with MSC and TTCN).

    (From ITU-T Z.100)

    Network Experiment

  • 8/3/2019 sdl_net2

    7/54

    7

    Network Experiment

    Chi-I Hung

    Improvement of Error RateImprovement of Error Rate

    Network Experiment

  • 8/3/2019 sdl_net2

    8/54

    8

    Network Experiment

    Chi-I Hung

    Process Dimension - CMMIProcess Dimension - CMMI

    Process Management Organizational Process Focus Organizational Process Definition

    Organizational Training Organizational Process Performance Organizational Innovation and Deployment

    Support Configuration Management Process and Product Quality Assurance

    Measurement and Analysis Decision Analysis and Resolution Causal Analysis and Resolution Organizational Environment for Integration

    Project Management

    Project Planning Project Monitoring and Control Supplier Agreement Management Integrated Project Management Integrated Teaming

    Risk Management Quantitative Project Management

    EngineeringEngineering Requirements ManagementRequirements Management

    Requirements DevelopmentRequirements Development Technical SolutionTechnical Solution

    Product IntegrationProduct Integration

    VerificationVerification ValidationValidation

    Network Experiment

  • 8/3/2019 sdl_net2

    9/54

    9

    Network Experiment

    Chi-I Hung

    SDL-76 First version. Only recommendations on how to

    draw process graph symbols (Behavior).

    SDL-80 Blocks are introduced (Architecture), PR-form

    (textual Phrase Representation) becomes a

    part of the language.

    SDL-84 The abstract data type concept is introduced(Data). Additional concepts are introduced.

    SDL-88 Only minor changes

    SDL-92 Object-oriented extensions to SDLSDL-96 Minor changes (e.g. external procedures)

    SDL-2000 Changes regarding architecture and data model.

    SDL HistorySDL History

    International Standard (ITU-T, Z.100)International Standard (ITU-T, Z.100)

  • 8/3/2019 sdl_net2

    10/54

    Network Experiment

  • 8/3/2019 sdl_net2

    11/54

    11

    Network Experiment

    Chi-I Hung

    Application of SDLApplication of SDL

    call and connection processing

    (for example, call handling, telephony signalling, metering)

    in switching systems

    maintenance and fault treatment

    (for example alarms, automatic fault clearance, routine tests)

    in general telecommunications systems

    system control

    (for example, overload control, modification

    and extension procedures) operation and maintenance functions, network management

    data communication protocols

    telecommunications services

    Network Experiment

  • 8/3/2019 sdl_net2

    12/54

    12

    p

    Chi-I Hung

    SDL Design MethodologySDL Design Methodology

    Flow of Software Development

    Basic Concept of SDL Design Flow

    Basic Component of SDL

    Network Experiment

  • 8/3/2019 sdl_net2

    13/54

    13

    p

    Chi-I Hung

    Flow of Software DevelopmentFlow of Software Development

    SoftwareRequirement

    Analysis

    Design

    Testing

    CodingSDL EditorMSC Editor

    SDL CodeGenerator

    SDL Simulator

    TTCN Simulator

    UML

    Network Experiment

  • 8/3/2019 sdl_net2

    14/54

    14Chi-I Hung

    Protocol Development ProcessProtocol Development Process

    ProtocolSpecification

    SoftwareRequirement

    Formal DescriptionFormal DescriptionLanguageLanguage- SDL- SDL- UML-2- UML-2

    Test Suite-- TTCN-2

    -- TTCN-3

    Host Conformance Test

    ExecutionTest Suite

    Code-Generation

    ImplementationUnder Test

    (IUT)

    Code-Generation

    Conformance Test

    ProductProduct

    Network Experiment

  • 8/3/2019 sdl_net2

    15/54

    15Chi-I Hung

    Basic Concept of SDL Design FlowBasic Concept of SDL Design Flow

    SystemArchitecture--SDL Editor

    Use Cases

    --MSC Editor

    SDL Coding

    Code Analyze

    Code Gen

    Simulation

    OKNo

    SDL Code-Gen

    Yes

    C/C++Source Code

    Other

    Source Code

    or Object Code

    Compile &

    Link

    Execution

    File

    OS Lib.

    Network Experiment

  • 8/3/2019 sdl_net2

    16/54

    16Chi-I Hung

    Basic Component of SDLBasic Component of SDL

    Architecture

    - system, block

    Behavior- processes

    Communication

    - signals and channelsData

    - abstract data types

    Network Experiment

  • 8/3/2019 sdl_net2

    17/54

    17Chi-I Hung

    SDL Architecture -- SystemSDL Architecture -- System

    SDL SystemSDL System A SDL-system is the outermost agent that communicates

    with the environment.

    EnvironmentEnvironment : The environment of the system is everything in the

    surroundings that communicates with the system in

    an SDL-like way.

    Network Experiment

  • 8/3/2019 sdl_net2

    18/54

    18Chi-I Hung

    A SDL System must define the interfaces to communicate

    with other components

    SDL-System Structural Concepts (1)SDL-System Structural Concepts (1)

    A complete SDL system must contain at least one block A block must contain at least one process or block,

    blocks and processes must not be mixed in one block.

    A process must contain an finite state machine

    Network Experiment

    SDL S t St t l C t (2)

  • 8/3/2019 sdl_net2

    19/54

    19Chi-I Hung

    Hierarchical StructureHierarchical Structure

    SDL-System Structural Concepts (2)SDL-System Structural Concepts (2)

    Block Game

    SYSTEM DemonGame 1(1)

    Demon(1,1) Monitor(1,1)

    BLOCK Game 1(1) PROCESS Monitor(1,1) 1(1)

    ReadyWaitIDLE

    MAC_Est_Req/MAC_Est_Cnf

    MAC_Release_Req

    MAC_Con_Req/MAC_Con_Cnf

    MAC_Release_Req

    Finite State Machine

    Network Experiment

    SDL S S l C (3)

  • 8/3/2019 sdl_net2

    20/54

    20Chi-I Hung

    SDL-System Structural Concepts(3)SDL-System Structural Concepts(3)

    A SDL System can contains :

    System Name

    SDL Blocks

    Channels: The relation between the system and the

    outside world.

    Signal Definition

    Data Type Definition

    Network Experiment

    SDL Bl kSDL Bl k

  • 8/3/2019 sdl_net2

    21/54

    21Chi-I Hung

    SDL-BlockSDL-Block

    A block can be refined either by a set ofprocessesprocesses

    or by a set ofblock substructures.

    Blocks are static entities in SDL.

    Network Experiment

    SDL S t E l (1)SDL S t E l (1)

  • 8/3/2019 sdl_net2

    22/54

    22Chi-I Hung

    SDL-System Example (1)SDL-System Example (1)

    NASNASUMTS-UEUMTS-UE

    L1L1

    APAPSDL-System

    EnvironmentSDL-Block

    L3L3

    L2L2

    ASAS

    RLC

    RLCRLC

    MACMACMAC SDL-Process

    Network Experiment

    SDL S t E l (2)SDL S t E l (2)

  • 8/3/2019 sdl_net2

    23/54

    23Chi-I Hung

    SDL-System Example (2)SDL-System Example (2)

    Network Experiment

    SDL S t E l (3)SDL S t E l (3)

  • 8/3/2019 sdl_net2

    24/54

    24Chi-I Hung

    SDL-System Example (3)SDL-System Example (3)

    Network Experiment

    SDL S t E l (4)SDL System Example (4)

  • 8/3/2019 sdl_net2

    25/54

    25Chi-I Hung

    SDL-System Example (4)SDL-System Example (4)

    process RLC

    State_0

    State_0

    Input_Signal

    RLC_Data_Req

    State_1

    Network Experiment

    SDL PSDL Process

  • 8/3/2019 sdl_net2

    26/54

    26Chi-I Hung

    SDL ProcessSDL Process

    Processes are the actors of SDL systems.

    An SDL process is the active unit of an SDL system.

    An SDL process represents an extended finite statemachine.

    Processes may be defined with an initial and a maximum

    number of instances

    SDL processes can communicate by means of

    asynchronous message passing with other processes.

    (init,max)

    Network Experiment

    El t f SDL PEl t f SDL P

  • 8/3/2019 sdl_net2

    27/54

    27Chi-I Hung

    Elements of SDL ProcessElements of SDL Process

    The SDL Process may contain:The SDL Process may contain:

    Process nameProcess name

    Formal ParametersFormal Parameters

    Local VariablesLocal Variables

    Time and timersTime and timers

    The graphical representation of a FSMThe graphical representation of a FSM

    Network Experiment

    Behavior of SDLBehavior of SDL

  • 8/3/2019 sdl_net2

    28/54

    28Chi-I Hung

    Behavior of SDLBehavior of SDL

    SDL Process as Finite State MachineSDL Process as Finite State Machine

    In SDL ,the FSM is extended with data processing (EFSM)

    Send no wait, asynchronous signalling

    Process instances can be created and terminateddynamically

    A process is activated by means of an arriving signal. Atthe end of a transition the next state is entered.

    Network Experiment

    Process SymbolsProcess Symbols

  • 8/3/2019 sdl_net2

    29/54

    29Chi-I Hung

    Process SymbolsProcess Symbols

    process reference

    Network Experiment

    Input / Output SymbolInput / Output Symbol

  • 8/3/2019 sdl_net2

    30/54

    30Chi-I Hung

    Input / Output SymbolInput / Output Symbol

    process MAC

    State_0

    State_0

    RLC_Data_Req

    Out_Sig

    State_1

    process RLC

    State_0

    State_0

    Input_Signal

    RLC_Data_Req

    State_1

    block L2

    RLC

    MAC

    RLC_MAC_Queue

    RLC_Data_Req

    The RLCRLC will send RLC_Data_RLC_Data_ReqReq to MACMAC viaRLC_MAC_QueueRLC_MAC_Queue

    Network Experiment

    Input PortInput Port

  • 8/3/2019 sdl_net2

    31/54

    31Chi-I Hung

    Input PortInput Port

    Each process instance has a FIFO queue of its own

    The port allows received signals (and timeouts)to be

    queued until they are consumed (or discarded) by the

    owning process instance.

    The queues have an infinite capacity.

    The FIFO order in processing the queue

    is NOTNOT always preserved(because of priority/save ).

    Network Experiment

    SDL Process IDSDL Process ID

  • 8/3/2019 sdl_net2

    32/54

    32Chi-I Hung

    SDL Process IDSDL Process ID

    Each SDL process maintains a set of intrinsic variables whichare of the predefined data type PIdPId (Process Identity)

    self :self : Denotes the PId of the process instance itself

    sender:sender: Denotes the PId of the process instance from which

    the most recent signal has been consumed parent:parent: Denotes the PId of the process instance that

    has created the instance

    offspring:offspring: Denotes the PId of the most recent process instance

    created by this process instance.

    Network Experiment

    Dynamic Process CreationDynamic Process Creation

  • 8/3/2019 sdl_net2

    33/54

    33Chi-I Hung

    block L2

    RLC

    MAC(0,5)

    RLC_MAC_Queue

    Dynamic Process CreationDynamic Process Creation

    process RLC

    State_0

    State_0

    Input_Signal

    Output_Signal

    State_1

    MAC

    Created processes must lie in the same block.

    Termination of a process can only be made by itself.

    process MAC

    S0

    S0

    Stop_Req

    Network Experiment

    SDL ProcedureSDL Procedure

  • 8/3/2019 sdl_net2

    34/54

    34Chi-I Hung

    SDL ProcedureS ocedu e

    Procedures can have IN or IN/OUT parameters.Procedures can have IN or IN/OUT parameters.

    Procedures can return a value.Procedures can return a value.

    SDL procedures can contain states and variableSDL procedures can contain states and variable

    declarations.declarations.

    Procedure states are disjoint from process stateProcedure states are disjoint from process state

    space.space. Procedures can see the variables of the owningProcedures can see the variables of the owning

    process.process.

    Procedures can only use timers declared in theProcedures can only use timers declared in the

    owning process.owning process.

    Network Experiment

    SDL ProcedureSDL Procedure

  • 8/3/2019 sdl_net2

    35/54

    35Chi-I Hung

    S ocedu e

    MyProcedure

    ;FPARIN arg1 integer,IN/OUT arg2 integer;RETURNS ret_val integer;

    procedure MyProcedure

    DCL Total Integer;

    Total:=arg1+arg2;

    Total

    Ret_val:=call MyProcedure(1,my_arg)

    Network Experiment

    SDL ChannelSDL Channel

  • 8/3/2019 sdl_net2

    36/54

    36Chi-I Hung

    Communication path between blocks itself and betweenCommunication path between blocks itself and between

    blocks and the environmentblocks and the environment

    Channels can be unidirectional orChannels can be unidirectional or bidirectionalbidirectional communicationcommunication

    devices.devices.

    Network Experiment

    SDL RouteSDL Route

  • 8/3/2019 sdl_net2

    37/54

    37Chi-I Hung

    A signal route defines a communication path between aA signal route defines a communication path between aprocess and its environment or another process.process and its environment or another process.

    Network Experiment

    SignalsSignals

  • 8/3/2019 sdl_net2

    38/54

    38Chi-I Hung

    gg

    Signals are the primary communication mechanism in SDLSignals are the primary communication mechanism in SDL

    Signals may carry data by means of parameters.Signals may carry data by means of parameters.

    All signals to and from the environment are declaredAll signals to and from the environment are declared

    at system level.at system level.

    Signals can be defined inside a block (thus onlySignals can be defined inside a block (thus only

    visible in the block)visible in the block)

    Network Experiment

    Signal Addressing & RoutingSignal Addressing & Routing

  • 8/3/2019 sdl_net2

    39/54

    39Chi-I Hung

    g g gg g g

    If there are several possible receivers of a signal,If there are several possible receivers of a signal,the signal will be delivered to an arbitrary receiver.the signal will be delivered to an arbitrary receiver.

    A

    B(1,1)

    C(1,1)

    D(1,1)

    Sig1

    Sig1

    C1

    C2

    Example:

    Network Experiment

    Signal Addressing & RoutingSignal Addressing & Routing

  • 8/3/2019 sdl_net2

    40/54

    40Chi-I Hung

    g g gg g g

    SDL provide two way for addressing:SDL provide two way for addressing:

    VIAVIA : Specifies a signal path

    TOTO : Specifies a receiving process

    Example 1: A SendSig1Sig1 to B

    Sig1 VIAVIA C1

    Example 2: A SendSig1Sig1 to C

    Sig1 ToTo C

    Sig1 ToTo BOR

    Network Experiment

    SDL DataSDL Data

  • 8/3/2019 sdl_net2

    41/54

    41Chi-I Hung

    Based on abstract data typesBased on abstract data types

    - An abstract data type defines a type of data object by its

    functional properties,i.e.by a set of operations applied to it.

    In SDL,data types are calledIn SDL,data types are called sortssorts

    Variables can only be declared in processesVariables can only be declared in processes

    - No global variables.- No global variables.

    In SDL inheritance and generics are supportedIn SDL inheritance and generics are supported

    A new data type is defined by:A new data type is defined by:

    - constants and a set of values- operators

    - axioms

    Network Experiment

    SDL Predefined Data SortsSDL Predefined Data Sorts

  • 8/3/2019 sdl_net2

    42/54

    42Chi-I Hung

    IntegerInteger

    NaturalNatural

    RealReal BooleanBoolean

    CharacterCharacter

    CharstringCharstring PIdPId

    DurationDuration

    TimeTime

    Network Experiment

    BooleanBoolean

  • 8/3/2019 sdl_net2

    43/54

    43Chi-I Hung

    Boolean is a typical example of a data type in SDLBoolean is a typical example of a data type in SDL

    NEWTYPENEWTYPEBoolean

    LITERALSTrue, False;

    OPERATORSNOT:Boolean ->Boolean;

    = :Boolean, Boolean ->Boolean;

    /=:Boolean, Boolean ->Boolean;

    AND:Boolean, Boolean ->Boolean;OR:Boolean, Boolean ->Boolean;

    XOR:Boolean, Boolean ->Boolean;

    =>:Boolean, Boolean ->Boolean;

    AXIOMSNOT(True)== False;

    NOT(False)== True;

    ...

    ENDNEWTYPEENDNEWTYPEBoolean;

    Network Experiment

    Variable Declaration and UseVariable Declaration and Use

  • 8/3/2019 sdl_net2

    44/54

    44Chi-I Hung

    process RLC 1(1)DCL Count Integer;

    State_0

    State_0

    Input_Signal

    Count:=1

    Output_Signal

    State_1

    State_1

    Input_Signal

    Count

    Out_Signal

    20

    30

    40

    Network Experiment

    Task and DecisionTask and Decision

  • 8/3/2019 sdl_net2

    45/54

    45Chi-I Hung

    TheThe TaskTask symbol is used for assignmentssymbol is used for assignments A decision is much like anA decision is much like an ififoror casecasestatement.statement.

    i:=i+1;

    k:= i mod 7;

    Number

  • 8/3/2019 sdl_net2

    46/54

    46Chi-I Hung

    With Synonym, constants are declared in SDLWith Synonym, constants are declared in SDL

    - Can be used in SDL-System or Blocks- Can be used in SDL-System or Blocks

    - If a constant is declared as EXTERNAL it means that the constant- If a constant is declared as EXTERNAL it means that the constant

    will be assigned first at system start-up time (i.e. it can be assignedwill be assigned first at system start-up time (i.e. it can be assigned

    different values each time).different values each time).

    SYNONYM Zero Integer = 0;SYNONYM One Integer = 1;SYNONYM NrOfDoors Natural = EXTERNAL;

    Network Experiment

    NewtypeNewtype

  • 8/3/2019 sdl_net2

    47/54

    47Chi-I Hung

    NewtypeNewtype creates a new data typecreates a new data type

    Newtype SeqNum

    literals zero, one;operatorssucc :

    SeqNum -> SeqNum;axioms

    succ( zero) == one;succ( one) == zero;

    Endnewtype SeqNum;

    Newtype EyeColorType

    LITERALS Blue, BrownDEFAULTBlueEndnewtype EyeColorType;

    DCL MySeqNum SeqNum;

    DCL MyEye EyeColorType;

    SeqNum := zero;

    SeqNum := succ(SeqNum );

    MyEye := Brown;

    Network Experiment SyntypeSyntype

  • 8/3/2019 sdl_net2

    48/54

    48Chi-I Hung

    Restrict the set of values of a ground typeRestrict the set of values of a ground type--NOTE! The syntype will not be a new type but a subtype,

    and can thus be assigned values of the ground type.

    SYNTYPE Age = Natural

    CONSTANTS 0:100

    ENDSYNTYPE Age;

    DCL

    MyAge, YourAge Age;

    MyAge:=1,YourAge:=100

    Network Experiment

    StructStruct

  • 8/3/2019 sdl_net2

    49/54

    49Chi-I Hung

    StructStruct is a data type where the data structure is explicitly statedis a data type where the data structure is explicitly stated

    - StructStruct in SDL is similar to struct in C-Language

    typedef enum{type_802_11_a,type_802_11_b,type_802_11_g,

    } Connect_Type;

    typedef struct{

    Connect_Type con_type;

    char id;int timing ;

    } Con_Req_Arg;

    newtype Connect_Typeliterals type_802_11_a,

    type_802_11_b,

    type_802_11_g;

    endnewtype Connect_Type;

    newtype Con_Req_Arg struct

    con_type Connect_Type;

    id Character;

    timing Integer;endnewtype Con_Req_Arg;

    structstructin Cin C structstructin SDLin SDL

    Network Experiment

    TimerTimer

  • 8/3/2019 sdl_net2

    50/54

    50Chi-I Hung

    On timeout, a signal is sent to the process instanceOn timeout, a signal is sent to the process instance

    that set the timer.that set the timer.

    TIMER T;SYNONYM p Duration = 5;

    disconnected

    ICONreq

    SET(now + p, T)

    Wait

    T

    disconnected

    RESET(T)

    SET:- Start a timer with time value

    RESET:- The associated time value is lost- Corresponding signal in the inputport is removed

    Network Experiment

    GeneratorGenerator

  • 8/3/2019 sdl_net2

    51/54

    51Chi-I Hung

    The Generator is like theThe Generator is like the templatetemplate in C++in C++

    NEWTYPE intint_set_setLITERALS empty_int_set;

    OPERATORS

    add: int_set, Integer -> int_set;

    is_in: int_set, Integer -> Boolean;AXIOMS

    FOR ALL m, n IN Integer, s IN int_set

    ...

    ENDNEWTYPE:

    NEWTYPE real_setreal_setLITERALS empty_real_set;

    OPERATORS

    add: real_set, Integer -> real_set;

    is_in: real_set, Integer -> Boolean;AXIOMS

    FOR ALL m, n IN Integer, s IN real_set

    ...

    ENDNEWTYPE;

    GENERATORsetset(TYPE element, LITERALS empty_set)

    LITERALS empty_set;

    OPERATORS

    add: set, element -> set;is_in: set, element -> Boolean;

    AXIOMS

    FOR ALL m, n IN element, s IN set

    .

    ENDGENERATOR;

    NEWTYPE intint_set_set set (Integer, empty_int_set)

    ENDNEWTYPE;

    NEWTYPE real_setreal_set set (real, empty_real_set)

    ENDNEWTYPE;

    Network Experiment

    ArrayArray

  • 8/3/2019 sdl_net2

    52/54

    52Chi-I Hung

    Array is the predefined generator.Array is the predefined generator. --GENERATOR Array(TYPE Index, TYPE Itemsort);

    SYNTYPE IndexType = Natural

    CONSTANTS 1:100

    ENDSYNTYPE;

    NEWTYPE Person STRUCT

    theName Charstring;

    theAge Age;

    theEyeColor EyeColorType;

    ENDNEWTYPE Person;

    NEWTYPE PArrayType

    Array (IndexType, Person)

    ENDNEWTYPE PArrayType;

    DCL PersonArray PArrayType;

    PersonArray(2):= (. John, 26, Blue .)

    Network Experiment

    System Integration (i)System Integration (i)

  • 8/3/2019 sdl_net2

    53/54

    53Chi-I Hung

    SDL system (process) Light IntegrationLight Integration

    Process

    Instance

    CommunicationAdaptor

    operating system

    -- I/O ,Timer ,Process Management ,IPC ...

    Non-SDL Process

    Network Experiment

    System Integration (ii)System Integration (ii)

  • 8/3/2019 sdl_net2

    54/54

    54Chi-I Hung

    SDL process 1

    Tight IntegrationTight Integration

    Process

    Instance

    CommunicationAdaptor

    operating system

    -- I/O ,Timer ,Process Management ,IPC ...

    Non-SDL Process

    SDL process 2

    Process

    Instance

    CommunicationAdaptor

    SDL process 3

    Process

    Instance

    CommunicationAdaptor