SDL+ The Simplest, Useful Enhanced SDL-Subset SDL+ The simplest, useful, enhanced SDL-subset! “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 “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 The starting point is: What is a state machine? allowing greater integration of tools And everything for implementation follows… Then to ask: What is a test? And everything for testing follows… SDL+ is really easy! “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 State Defines behaviour for a set of events State-Event Matrix Communication with other state machines Defines behaviour for the state machine Context Associated information, such as variables “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 “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 Wildcards for any gate and any PDU For signals this means signal name and parameters Also for any signal and any value Only one state can be active at a time “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 “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 “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 implement the ITU-T specifications, such as SS7, ISDN & INAP! “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 Or a specific number of gates Arrays of states machines 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. “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 Convert an ASN.1 encoded PDU to a variable ENCODE Variable TO PDU USING Encoding_Rule 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! “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 “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 • Receive signal with ASN.1 Variable Protocol stack • ENCODE Variable TO PDU • send PDU ASP for this layer FSM SDL-Signals Codec Codec PDUs ASP* of lower layer • Receive PDU • DECODE PDU TO ASN.1Variable • send Signal * ASP = Abstract Service Primitive “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. “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 for any kind of event-based testing! “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! “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 General Requirements for Test Specifications 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 Implementing a test suite is similar to implementing a state machine! “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 A test has a conclusion, successful or not Verdict (Pass, Fail or Inconclusive) Already defined for implementing state machines Preliminary or Final (end of test) Configuration data (test suite parameters) Change constants without rebuilding “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 implementation and testing just makes everything much easier! “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 interface definition protocol stack test harness FSM test suite Codec test object “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 tester test suite 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! “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 “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! “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 Improve the documentation Cooperate with more tool suppliers Getting started, tutorials, examples Embedded systems, safety critical… Cooperate with the ITU-T! We need your support – join us at: www.SDL-Task-Force.org “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