SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the...

24
“The documentation is the design, the design is the system!” Copyright © 2003-2004 SDL Task Force Consortium. All rights reserved www.SDL-Task-Force.org SDL + The Simplest, Useful Enhanced SDL-Subset SDL + The simplest, useful, enhanced SDL-subset!

Transcript of SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the...

Page 1: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

SDL+

The simplest, useful, enhanced SDL-subset!

Page 2: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

SDL Background

SDL is a world-leader the most popular graphical representation

Special characteristics of SDL are Graphical representation

Hierarchical structure Functionality

Built-in concepts of states and events But SDL has become big & complex

Page 3: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

SDL+ The language of the people!

The SDL Task Force designed SDL+ to be accessible to users with typical requirements bring implementation and testing closer together

allowing greater integration of tools

The starting point is: What is a state machine? And everything for implementation follows…

Then to ask: What is a test? And everything for testing follows…

SDL+ is really easy!

Page 4: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

So What is a State Machine?

The most basic mechanism in SDL+ Interface

Communication with other state machines State

Defines behaviour for a set of events State-Event Matrix

Defines behaviour for the state machine Context

Associated information, such as variables

Page 5: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

State Machine: Interface

Used for communication with the environment Other state machines connected via gates

Gates are docking points for connections

Communication is based on events Protocol Data Unit sent or received at a gate Typically a list of signals

Signals have parameters, which must be present if defined

Page 6: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

State Machine: State

A state is a set of event constraints Each event constraint has a behaviour (action)

An event constraint matches a received event if the gate constraint and the PDU constraint match

For signals this means signal name and parameters

Wildcards for any gate and any PDU Also for any signal and any value

Only one state can be active at a time

Page 7: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

State Machine: State-Event Matrix

Defines the behavior for all states Special states

Start No possible inputs Defines the behavior when the state machine starts

Default Defines the behavior for undefined events

If not defined in the active state

Page 8: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

State Machine: Context

Associated information stored between events Variables

Data types from ASN.1-subset based on X.680 Local variables for procedures Timers

Page 9: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

State Machine: Conclusions

Fully compatible with subset of SDL concepts Introduction of an extended notion of event

Any data type Signal parameter values are checked

Improved scoping & data-hiding

This is already enough to implementthe ITU-T specifications, such as

SS7, ISDN & INAP!

Page 10: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

Dimensioning

Define a specific number of state machines Arrays of states machines

Or a specific number of gates Arrays of gates

And connect them with a single connection An index variable is only needed for gates

Limitations necessary to manage index values

Re-dimension a system by changing

a single parameter.

Page 11: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

PDU Encoding

Convert a variable to an ASN.1 encoded PDU ENCODE Variable TO PDU USING Encoding_Rule

Convert an ASN.1 encoded PDU to a variable DECODE PDU TO Variable USING Encoding_Rule

No additional information needed No additional ASN.1 compilers needed

Also works for non ASN.1 formatted PDUs!

Page 12: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

PDU Encoding Rules Considered

Basic Encoding Rules (BER) Packed Encoding Rules (PER) Basic Aligned Packed Encoding Rules (BA_PER) SER (SDL+ Encoding Rule)

All values as 32 bit integers SRER (SDL+ Reduced Encoding Rule)

No tag information, supports non-ASN.1 PDUs

Page 13: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

Encoding / Decoding

ASP* of lower layer

ASP for this layer

* ASP = Abstract Service Primitive

Protocol stack

FSM

Codec

• Receive signal with ASN.1 Variable• ENCODE Variable TO PDU• send PDU

• Receive PDU• DECODE PDU TO ASN.1Variable• send Signal

Codec

SDL-Signals

PDUs

Page 14: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

What is a Test?

A test is A sequence of stimuli and expected responses Chosen to test a specific behaviour

A test result is A conclusion reached from carrying out a set of tests

Recording the individual success of each test

A test results confirms the implementation of a test object.

Page 15: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

Testing State Machines with SDL+

There are many types of testing Load tests, functional tests, regression tests... White box tests, black box tests...

SDL+ is designed for state machines... ...And state machines look like black boxes... ...So SDL+ is designed for black box testing

But SDL+ can probably be used forany kind of event-based testing!

Page 16: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

Potential Benefits

Data sharing Portability Components recycling

Procedures, signals, user-defined data types Ease of use – one language instead of two

Cheaper to implement tools Faster to learn

Use the same language for

system specification and test specification!

Page 17: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

Key Requirements Features used for State Machines

Tester & IUT Blocks/Processes

Connecting between tester and IUT Gates & Channels

Communication between tester and IUT Signals sent & received

Sending stimuli to IUT Output

Receiving responses from IUT Input

Storing & Transferring data Variables & Data Type

Control of Flow Decisions, Labels & Join

Test Step Replication Procedures

Measuring the timing of responses Timers

General Requirements for Test Specifications

Implementing a test suite is similar to

implementing a state machine!

Page 18: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

Specific Requirements

A set of tests needs organisation Test suite, test groups, test cases and test purpose.

A test needs to check received values are correct Constraint

Already defined for implementing state machines

A test has a conclusion, successful or not Verdict (Pass, Fail or Inconclusive)

Preliminary or Final (end of test)

Configuration data (test suite parameters) Change constants without rebuilding

Page 19: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

Interface to Test Object

A test object is a state machine... ...A state machine has an interface...

Gates & Events (Signals) ...And a test suite connects to a test object... ...So a test suite has the same interface

Use same gates & events

Working with the same concepts for implementationand testing just makes everything much easier!

Page 20: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

SDL+ for Testing

test harnessprotocol stack

FSM

Codec

test object

tester

test suite

test suite

interfacedefinition

Page 21: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

Summary of Features for Testing

Test Suite Test Group Test Case Test Purpose Matching Mechanism

Already defined for state machines Verdict Test Suite Parameters

SDL+ Sometimes things really can be that simple!

Page 22: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

Additional Features Under Consideration

Test case selection expressions Parameterized constraint types Test Suite Variables Discussion ongoing

Page 23: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

Summary SDL+ is lightweight

But suitable for heavyweight applications All features are the ‘simplest, useful’

It is almost fully compatible with an SDL-subset SDL-2000 could be defined as an extension

SDL+ has one major difference to SDL... ...It has features for testing state machines!

One language can be used for the implementation and testing of state machines!

Page 24: SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © 2003-2004 SDL Task Force Consortium.

“The documentation is the design, the design is the system!”Copyright © 2003-2004 SDL Task Force Consortium.  All rights reserved

www.SDL-Task-Force.org

SDL+

The Simplest, Useful Enhanced SDL-Subset

Future Use SDL+ to promote SDL Increase acceptance by users

Getting started, tutorials, examples Improve the documentation Cooperate with more tool suppliers

Embedded systems, safety critical… Cooperate with the ITU-T!

We need your support – join us at:www.SDL-Task-Force.org