SlideShare a Scribd company logo
A Test Generation Tool
for Specifications in the
Form of State Machine
       Zheng-Wen Shen
         2004/11/23
References
   A Test Generation Tool for Specifications in the
    Form of State Machines
     Q. M. Tan, A. Petrenko and G. v. Bochmann
     To appear in IEEE International Conference on
      Communications -- 96, Dallas, USA, 1996.
Outline
1.        Introduction
2.        Using the tool
     1.      An Example
     2.      Functions provided by the Tool
     3.      The FSM specification
3.        Test derivation methods
     1.      Preambles
     2.      Postambles
     3.      Transition Cover
     4.      State Identification Sequences
4.        Experiments and Applications
5.        Conclusion
1.        Introduction
2.        Using the tool
     1.      An Example
     2.      Functions provided by the Tool
     3.      The FSM specification
3.        Test derivation methods
     1.      Preambles
     2.      Postambles
     3.      Transition Cover
     4.      State Identification Sequences
4.        Experiments and Applications
5.        Conclusion
1. Introduction
   TAG tool - Test Automatic Generation
     Automatically generates test case for an FSM
      specification.
     Transition identification approach for test derivation

     Output test cases in the form of an SDL skeleton.
   FSM has been extensively used in the testing
    phases of system developments.
       E.g. conformance testing of communication
        protocols.
   Communication protocols are the rules that
    govern the communication between the
    different components within a distributes system.
       7-layer OSI model
Protocol conformance testing
   A protocol specification generally can lead to
    several implementations in software and/or
    hardware.
   Assure the compatibility with other
    implementations of the same protocol.
The existing test derivation methods
   Check each transition in an FSM specification at
    least once (branch coverage criteria.)
   Verify the tail state of the transition to obtain
    high fault coverage and to guarantee
    conformance in the context of a more general
    fault model.
       Using state identification techniques
            Defect the fault that the FSM enters a different state than
             specified.
   Most of the existing protocols are not
    completely specified.
       Not all the sequences of interactions are foreseen.
   The existing test derivation methods for
    protocols are limited to completely specified
    specifications.
   TAG working directly for deterministic, partially
    specified FSM specifications.
1.        Introduction
2.        Using the tool
     1.      An Example
     2.      Functions provided by the Tool
     3.      The FSM specification
3.        Test derivation methods
     1.      Preambles
     2.      Postambles
     3.      Transition Cover
     4.      State Identification Sequences
4.        Experiments and Applications
5.        Conclusion
2. Using the tool
   A complete test suite that guarantees full fault
    coverage may be derived
   A set of test cases that cover a given test
    purpose may be derived.
   Output format
     Mnemonic format
     SDL skeleton
2.1 An example
        To achieve a particular test purpose which is a certain
         transition to be tested:
    1.     Bring the FSM from its initial state to the starting state of
           the transition under test using the shortest input sequence
           possible. – a preamble of the test case
    2.     Execute the transition and check the observed output
    3.     Check a tail state of the transition by observing its reaction
           to a pre-selected set of state identification sequences.
    4.     Apply an input sequence to return to the initial state of the
           FSM. – a postamble of the test case
   State cover
       The set of all preambles.
   Transition cover
       The set of sequences used to execute all specified
        transitions.
   State identification sequences
     Distinguish states by their output reactions.
     TAG implements the HSI method
   HSI method
       Similar to the widely used W-method
            A characterization set is used for state identification.
       A tuple of subsets of a W set.
            Can be applied to partially specified FSMs.
The INRES responder
   Input alphabet
       1- CR; 2- IDISreq; 3- ICONrsp; 4- DT0; 5- DT1
   Output alphabet
       0- NULL; 1- ICONind; 2- DR; 3- CC; 4- ACK0;
        5- ACK0,IDATind; 6- ACK1; 7- ACK1,IDATind
   States
       S0- Closed (the initial state); S1- Opening; S2-
        Waiting_DT0; S3- Waiting_DT1
Test suite and intermediate results
   State Identifier = {{41}, {41}, {4}, {4}}
   Preamble = {ε, 1, 13, 135}
   Transition Cover = {1, 4, 5, 11, 12, 13, 14, 15,
    131, 132, 134, 135, 1351, 1352, 1354, 1355}
   Postamble = {ε, 2, 2, 2}
   Test Suite = {41, 441, 541, 1241, 13241, 135241,
    141, 1141, 1441, 1541, 134, 1314, 13514, 13514,
    13554}
2.2 Functions provided by the tool
   A text file containing the FSM specification with
    suffix “.fsm”
     Symbol table (.tbl)
     FSM structure (.cpl)

   Complete test derivation
       A complete test suite is generated.
   Selective test derivation
       Give the test purpose, which specifies one transition
        in the FSM.
   The test output is written in a text file.
     Mnemonic format (.mnc)
     SDL skeleton (.sdl)
2.3 the FSM specification
1.   the state definitions
2.   The input definitions
3.   The output definitions
4.   The transition definitions
5.   The variable declaration (optional)
6.   The homing sequence definition (optional)
7.   “end;”
   The state definitions are a list of state names.
   The input definition are a list of input names.
   The output definitions are list of output names.
   The transition definitions define the FSM state table
    itself by a list of transition specifications.
       Current state name, input name, output name and next state
        name.
       May be followed by a set of the comments.
   The variable definitions define the variables in
    parameters.
       Integer, Charstring, Octetstring, Boolean
   Using Keyword “homing” to give a sequence of
    input names as a homing sequence.
1.        Introduction
2.        Using the tool
     1.      An Example
     2.      Functions provided by the Tool
     3.      The FSM specification
3.        Test derivation methods
     1.      Preambles
     2.      Postambles
     3.      Transition Cover
     4.      State Identification Sequences
4.        Experiments and Applications
5.        Conclusion
3.1 Preambles
   A tree with the initial state as its root is
    constructed such that the tail states of the
    outgoing transitions from the state
    corresponding to a current node.
   All nodes in this tree must become a current
    node once and only once in the order that they
    enter this tree.
   The path from the root to a given node is
    preamble for the corresponding state.
S0


     1


S1


     3

         5
S2              S3



         Preamble = {ε, 1, 13, 135 }
3.2 Postambles
   A tree with given state as its root is constructed.
   Once the initial state has been added to the tree,
    the procedure stops.
   The path from the root to the last added node is
    a postamble from the given state.
   Maybe no postamble from the given state.
S0




S1

          2

S0




     S2           S3

              2        2

     S0           S0       Preamble = {ε, 2, 2, 2 }
3.3 Transition Cover
   The transition cover can be obtained by appending
    each outgoing transition from this state to its preamble.
    Preamble = {ε, 1, 13, 135 }
       S0:ε::1, ε::4, ε::5
       S1: 1::1, 1::2, 1::3, 1::4, 1::5
       S2: 13::1, 13::2, 13::4, 13::5
       S3: 135::1, 135::2, 135::4, 135::5
   Transition Cover = {1, 4, 5, 11, 12, 13, 14, 15, 131, 132,
    134, 135, 1351, 1352, 1354, 1355}
3.4 State Identification Sequences.
   The characterization set W is a set of input
    sequence.
   Harmonized state identification sets (HSI sets),
    subsets of W.
       {D0, D1, …, Dn-1}
       Di is a set of prefixes of sequences in W
       n is the number of states of S.
   For any two distinguishable states Si and Sj of S, there
    exists a sequence σ that is a prefix of both σi ∈ Di and
    σj ∈ Dj such that σ can be accepted by these two states
    and produces different outputs.
   How is Optimal ?
    1.   The number of sequences in W is minimal.
    2.   The sum of their lengths is minimal.
   To obtain a minimal characterization set for a
    give FSM maybe an NP-Hard problem.
A heuristic solution
A1: A set P0 of all the state pairs that are
    distinguishable for the given FSM is produced.
A2: With P0, a characterization set W is obtained
    by forming a search tree from the input
    alphabet to distinguish the state pairs in P0.
A3: From this W, some HSI set Di is selected for
    each state i, such that the number of
    distinguishable state pairs and the length of a
    sequence are traded off.
The result of INRES responder
   The result P0 of the algorithm A1 is the set of all
    possible state pairs.
   The characterization set W from the algorithm
    A2 is {41}
   The HSI sets {{41}, {41}, {4}, {4}}
The algorithm A1
   The algorithm A1 is obtained by adapting the
    FSM minimization algorithm give in
    [ G. J. Holzmann. Design and Validation of
    Computer Protocols, 1991 ]
The algorithm A2
   Forms the root as the current node to probe
   For each input word, a son is built if it can lead
    to a better solution than other build nodes.
   If it is estimated that a subtree with a minimal
    number of branches and with a minimal average
    length that distinguishes a maximal number of
    state pairs could be formed by probing an
    unprobed son of ti.
The search tree in A2
The algorithm A3
   A sequence σk in W is selected such that
    weighted sum of its length and the number of
    the state pairs that it can not distinguish in the
    left state pairs is minimal.
   For each remaining state pair (l, m) that can be
    distinguished by σk, find a prefix of σk such that
    (l, m) is distinguished.
   Then the prefix is put into the HSI sets Dl and
    Dm.
W = {σ0, σ1,… σn-1}

  σk :

                                              Remain state pairs
   σ:
                         distinguish ?

                            (l, m)



HSI Sets: {D0, D1, D2, .. Dl, …, Dm, …Dn-1}
1.        Introduction
2.        Using the tool
     1.      An Example
     2.      Functions provided by the Tool
     3.      The FSM specification
3.        Test derivation methods
     1.      Preambles
     2.      Postambles
     3.      Transition Cover
     4.      State Identification Sequences
4.        Experiments and Applications
5.        Conclusion
4. Experiments and Applications

State num.     10    50     100   150    200
Transition num. 100 2500    10000 23500 40000
CPU time (sec.) 0.11 2.96   40.87 197.06 760.89
1.        Introduction
2.        Using the tool
     1.      An Example
     2.      Functions provided by the Tool
     3.      The FSM specification
3.        Test derivation methods
     1.      Preambles
     2.      Postambles
     3.      Transition Cover
     4.      State Identification Sequences
4.        Experiments and Applications
5.        Conclusion
5. Conclusion
   Proposed a heuristic solution to derive near-
    optimal harmonized state identification sets.

More Related Content

Similar to 20041113 A Test Generation Tool for Specifications in the Form of State Machine

PSYC 3663 SAFMEDS TERMS – Assignment 1Provide a definition for e.docx
PSYC 3663 SAFMEDS TERMS – Assignment 1Provide a definition for e.docxPSYC 3663 SAFMEDS TERMS – Assignment 1Provide a definition for e.docx
PSYC 3663 SAFMEDS TERMS – Assignment 1Provide a definition for e.docx
amrit47
 
Capturing Monotonic Components from Input Patterns
Capturing Monotonic Components from Input PatternsCapturing Monotonic Components from Input Patterns
Capturing Monotonic Components from Input Patterns
ijeukens
 
Test vector compression
Test vector compressionTest vector compression
Test vector compression
Amr Abd El Latief
 
Frame detection.pdf
Frame detection.pdfFrame detection.pdf
Frame detection.pdf
infomerlin
 
Notes on algorithms
Notes on algorithmsNotes on algorithms
Notes on algorithms
Valencia Jeremiah
 
Overview of verilog
Overview of verilogOverview of verilog
Overview of verilog
Raghu Veer
 
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
Sergey Staroletov
 
Model Checker NuSMV - Hao Zhang - University of Florida.pdf
Model Checker NuSMV - Hao Zhang - University of Florida.pdfModel Checker NuSMV - Hao Zhang - University of Florida.pdf
Model Checker NuSMV - Hao Zhang - University of Florida.pdf
HoussemHamdi5
 
solver (1)
solver (1)solver (1)
solver (1)
Raj Mitra
 
Test vector compression in Digital Testing
Test vector compression in Digital Testing Test vector compression in Digital Testing
Test vector compression in Digital Testing
Amr Abd El Latief
 
Isola 12 presentation
Isola 12 presentationIsola 12 presentation
Isola 12 presentation
Iakovos Ouranos
 
Control structures
Control structuresControl structures
Control structures
M Vishnuvardhan Reddy
 
ders 6 Panel data analysis.pptx
ders 6 Panel data analysis.pptxders 6 Panel data analysis.pptx
ders 6 Panel data analysis.pptx
Ergin Akalpler
 
High Sensitivity Sanger Sequencing for Minor Variant Detection
High Sensitivity Sanger Sequencing for Minor Variant DetectionHigh Sensitivity Sanger Sequencing for Minor Variant Detection
High Sensitivity Sanger Sequencing for Minor Variant Detection
Thermo Fisher Scientific
 
An Approach To Verilog-VHDL Interoperability For Synchronous Designs
An Approach To Verilog-VHDL Interoperability For Synchronous DesignsAn Approach To Verilog-VHDL Interoperability For Synchronous Designs
An Approach To Verilog-VHDL Interoperability For Synchronous Designs
Dawn Cook
 
verilog_fsm.pdf
verilog_fsm.pdfverilog_fsm.pdf
verilog_fsm.pdf
Ahmed Abdelazeem
 
Section 16
Section 16Section 16
Hidro Modelamiento
Hidro ModelamientoHidro Modelamiento
Hidro Modelamiento
Carmen Luisa Hilasaca Celis
 
Chap06 (méthodes de vérification)
Chap06 (méthodes de vérification)Chap06 (méthodes de vérification)
Chap06 (méthodes de vérification)
infcom
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 

Similar to 20041113 A Test Generation Tool for Specifications in the Form of State Machine (20)

PSYC 3663 SAFMEDS TERMS – Assignment 1Provide a definition for e.docx
PSYC 3663 SAFMEDS TERMS – Assignment 1Provide a definition for e.docxPSYC 3663 SAFMEDS TERMS – Assignment 1Provide a definition for e.docx
PSYC 3663 SAFMEDS TERMS – Assignment 1Provide a definition for e.docx
 
Capturing Monotonic Components from Input Patterns
Capturing Monotonic Components from Input PatternsCapturing Monotonic Components from Input Patterns
Capturing Monotonic Components from Input Patterns
 
Test vector compression
Test vector compressionTest vector compression
Test vector compression
 
Frame detection.pdf
Frame detection.pdfFrame detection.pdf
Frame detection.pdf
 
Notes on algorithms
Notes on algorithmsNotes on algorithms
Notes on algorithms
 
Overview of verilog
Overview of verilogOverview of verilog
Overview of verilog
 
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
 
Model Checker NuSMV - Hao Zhang - University of Florida.pdf
Model Checker NuSMV - Hao Zhang - University of Florida.pdfModel Checker NuSMV - Hao Zhang - University of Florida.pdf
Model Checker NuSMV - Hao Zhang - University of Florida.pdf
 
solver (1)
solver (1)solver (1)
solver (1)
 
Test vector compression in Digital Testing
Test vector compression in Digital Testing Test vector compression in Digital Testing
Test vector compression in Digital Testing
 
Isola 12 presentation
Isola 12 presentationIsola 12 presentation
Isola 12 presentation
 
Control structures
Control structuresControl structures
Control structures
 
ders 6 Panel data analysis.pptx
ders 6 Panel data analysis.pptxders 6 Panel data analysis.pptx
ders 6 Panel data analysis.pptx
 
High Sensitivity Sanger Sequencing for Minor Variant Detection
High Sensitivity Sanger Sequencing for Minor Variant DetectionHigh Sensitivity Sanger Sequencing for Minor Variant Detection
High Sensitivity Sanger Sequencing for Minor Variant Detection
 
An Approach To Verilog-VHDL Interoperability For Synchronous Designs
An Approach To Verilog-VHDL Interoperability For Synchronous DesignsAn Approach To Verilog-VHDL Interoperability For Synchronous Designs
An Approach To Verilog-VHDL Interoperability For Synchronous Designs
 
verilog_fsm.pdf
verilog_fsm.pdfverilog_fsm.pdf
verilog_fsm.pdf
 
Section 16
Section 16Section 16
Section 16
 
Hidro Modelamiento
Hidro ModelamientoHidro Modelamiento
Hidro Modelamiento
 
Chap06 (méthodes de vérification)
Chap06 (méthodes de vérification)Chap06 (méthodes de vérification)
Chap06 (méthodes de vérification)
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 

More from Will Shen

20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
Will Shen
 
16格筆記讀書法
16格筆記讀書法16格筆記讀書法
16格筆記讀書法
Will Shen
 
Bade Smells in Code
Bade Smells in CodeBade Smells in Code
Bade Smells in Code
Will Shen
 
Intro To BOOST.Spirit
Intro To BOOST.SpiritIntro To BOOST.Spirit
Intro To BOOST.Spirit
Will Shen
 
20070514 introduction to test ng and its application for test driven gui deve...
20070514 introduction to test ng and its application for test driven gui deve...20070514 introduction to test ng and its application for test driven gui deve...
20070514 introduction to test ng and its application for test driven gui deve...
Will Shen
 
20060411 face recognition using face arg matching
20060411 face recognition using face arg matching20060411 face recognition using face arg matching
20060411 face recognition using face arg matching
Will Shen
 
20060411 Analytic Hierarchy Process (AHP)
20060411 Analytic Hierarchy Process (AHP)20060411 Analytic Hierarchy Process (AHP)
20060411 Analytic Hierarchy Process (AHP)
Will Shen
 
20050713 critical paths for gui regression testing
20050713 critical paths for gui regression testing20050713 critical paths for gui regression testing
20050713 critical paths for gui regression testing
Will Shen
 
20050314 specification based regression test selection with risk analysis
20050314 specification based regression test selection with risk analysis20050314 specification based regression test selection with risk analysis
20050314 specification based regression test selection with risk analysis
Will Shen
 
Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)
Will Shen
 
Junit Recipes - Elementary tests (1/2)
Junit Recipes  - Elementary tests (1/2)Junit Recipes  - Elementary tests (1/2)
Junit Recipes - Elementary tests (1/2)
Will Shen
 
Junit Recipes - Intro
Junit Recipes - IntroJunit Recipes - Intro
Junit Recipes - Intro
Will Shen
 
20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software
Will Shen
 
20060712 automated model based testing of community-driven open-source gui ap...
20060712 automated model based testing of community-driven open-source gui ap...20060712 automated model based testing of community-driven open-source gui ap...
20060712 automated model based testing of community-driven open-source gui ap...
Will Shen
 
20041221 gui testing survey
20041221 gui testing survey20041221 gui testing survey
20041221 gui testing survey
Will Shen
 
20060927 application facades
20060927 application facades20060927 application facades
20060927 application facades
Will Shen
 
20111018 boost and gtest
20111018 boost and gtest20111018 boost and gtest
20111018 boost and gtest
Will Shen
 
Data collection for field studies
Data collection for field studiesData collection for field studies
Data collection for field studies
Will Shen
 

More from Will Shen (18)

20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
 
16格筆記讀書法
16格筆記讀書法16格筆記讀書法
16格筆記讀書法
 
Bade Smells in Code
Bade Smells in CodeBade Smells in Code
Bade Smells in Code
 
Intro To BOOST.Spirit
Intro To BOOST.SpiritIntro To BOOST.Spirit
Intro To BOOST.Spirit
 
20070514 introduction to test ng and its application for test driven gui deve...
20070514 introduction to test ng and its application for test driven gui deve...20070514 introduction to test ng and its application for test driven gui deve...
20070514 introduction to test ng and its application for test driven gui deve...
 
20060411 face recognition using face arg matching
20060411 face recognition using face arg matching20060411 face recognition using face arg matching
20060411 face recognition using face arg matching
 
20060411 Analytic Hierarchy Process (AHP)
20060411 Analytic Hierarchy Process (AHP)20060411 Analytic Hierarchy Process (AHP)
20060411 Analytic Hierarchy Process (AHP)
 
20050713 critical paths for gui regression testing
20050713 critical paths for gui regression testing20050713 critical paths for gui regression testing
20050713 critical paths for gui regression testing
 
20050314 specification based regression test selection with risk analysis
20050314 specification based regression test selection with risk analysis20050314 specification based regression test selection with risk analysis
20050314 specification based regression test selection with risk analysis
 
Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)
 
Junit Recipes - Elementary tests (1/2)
Junit Recipes  - Elementary tests (1/2)Junit Recipes  - Elementary tests (1/2)
Junit Recipes - Elementary tests (1/2)
 
Junit Recipes - Intro
Junit Recipes - IntroJunit Recipes - Intro
Junit Recipes - Intro
 
20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software
 
20060712 automated model based testing of community-driven open-source gui ap...
20060712 automated model based testing of community-driven open-source gui ap...20060712 automated model based testing of community-driven open-source gui ap...
20060712 automated model based testing of community-driven open-source gui ap...
 
20041221 gui testing survey
20041221 gui testing survey20041221 gui testing survey
20041221 gui testing survey
 
20060927 application facades
20060927 application facades20060927 application facades
20060927 application facades
 
20111018 boost and gtest
20111018 boost and gtest20111018 boost and gtest
20111018 boost and gtest
 
Data collection for field studies
Data collection for field studiesData collection for field studies
Data collection for field studies
 

Recently uploaded

Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 

Recently uploaded (20)

Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 

20041113 A Test Generation Tool for Specifications in the Form of State Machine

  • 1. A Test Generation Tool for Specifications in the Form of State Machine Zheng-Wen Shen 2004/11/23
  • 2. References  A Test Generation Tool for Specifications in the Form of State Machines  Q. M. Tan, A. Petrenko and G. v. Bochmann  To appear in IEEE International Conference on Communications -- 96, Dallas, USA, 1996.
  • 3. Outline 1. Introduction 2. Using the tool 1. An Example 2. Functions provided by the Tool 3. The FSM specification 3. Test derivation methods 1. Preambles 2. Postambles 3. Transition Cover 4. State Identification Sequences 4. Experiments and Applications 5. Conclusion
  • 4. 1. Introduction 2. Using the tool 1. An Example 2. Functions provided by the Tool 3. The FSM specification 3. Test derivation methods 1. Preambles 2. Postambles 3. Transition Cover 4. State Identification Sequences 4. Experiments and Applications 5. Conclusion
  • 5. 1. Introduction  TAG tool - Test Automatic Generation  Automatically generates test case for an FSM specification.  Transition identification approach for test derivation  Output test cases in the form of an SDL skeleton.
  • 6. FSM has been extensively used in the testing phases of system developments.  E.g. conformance testing of communication protocols.  Communication protocols are the rules that govern the communication between the different components within a distributes system.  7-layer OSI model
  • 7. Protocol conformance testing  A protocol specification generally can lead to several implementations in software and/or hardware.  Assure the compatibility with other implementations of the same protocol.
  • 8. The existing test derivation methods  Check each transition in an FSM specification at least once (branch coverage criteria.)  Verify the tail state of the transition to obtain high fault coverage and to guarantee conformance in the context of a more general fault model.  Using state identification techniques  Defect the fault that the FSM enters a different state than specified.
  • 9. Most of the existing protocols are not completely specified.  Not all the sequences of interactions are foreseen.  The existing test derivation methods for protocols are limited to completely specified specifications.  TAG working directly for deterministic, partially specified FSM specifications.
  • 10. 1. Introduction 2. Using the tool 1. An Example 2. Functions provided by the Tool 3. The FSM specification 3. Test derivation methods 1. Preambles 2. Postambles 3. Transition Cover 4. State Identification Sequences 4. Experiments and Applications 5. Conclusion
  • 11. 2. Using the tool  A complete test suite that guarantees full fault coverage may be derived  A set of test cases that cover a given test purpose may be derived.  Output format  Mnemonic format  SDL skeleton
  • 12. 2.1 An example  To achieve a particular test purpose which is a certain transition to be tested: 1. Bring the FSM from its initial state to the starting state of the transition under test using the shortest input sequence possible. – a preamble of the test case 2. Execute the transition and check the observed output 3. Check a tail state of the transition by observing its reaction to a pre-selected set of state identification sequences. 4. Apply an input sequence to return to the initial state of the FSM. – a postamble of the test case
  • 13. State cover  The set of all preambles.  Transition cover  The set of sequences used to execute all specified transitions.  State identification sequences  Distinguish states by their output reactions.  TAG implements the HSI method
  • 14. HSI method  Similar to the widely used W-method  A characterization set is used for state identification.  A tuple of subsets of a W set.  Can be applied to partially specified FSMs.
  • 16. Input alphabet  1- CR; 2- IDISreq; 3- ICONrsp; 4- DT0; 5- DT1  Output alphabet  0- NULL; 1- ICONind; 2- DR; 3- CC; 4- ACK0; 5- ACK0,IDATind; 6- ACK1; 7- ACK1,IDATind  States  S0- Closed (the initial state); S1- Opening; S2- Waiting_DT0; S3- Waiting_DT1
  • 17. Test suite and intermediate results  State Identifier = {{41}, {41}, {4}, {4}}  Preamble = {ε, 1, 13, 135}  Transition Cover = {1, 4, 5, 11, 12, 13, 14, 15, 131, 132, 134, 135, 1351, 1352, 1354, 1355}  Postamble = {ε, 2, 2, 2}  Test Suite = {41, 441, 541, 1241, 13241, 135241, 141, 1141, 1441, 1541, 134, 1314, 13514, 13514, 13554}
  • 18. 2.2 Functions provided by the tool  A text file containing the FSM specification with suffix “.fsm”  Symbol table (.tbl)  FSM structure (.cpl)  Complete test derivation  A complete test suite is generated.  Selective test derivation  Give the test purpose, which specifies one transition in the FSM.
  • 19. The test output is written in a text file.  Mnemonic format (.mnc)  SDL skeleton (.sdl)
  • 20. 2.3 the FSM specification 1. the state definitions 2. The input definitions 3. The output definitions 4. The transition definitions 5. The variable declaration (optional) 6. The homing sequence definition (optional) 7. “end;”
  • 21. The state definitions are a list of state names.  The input definition are a list of input names.  The output definitions are list of output names.  The transition definitions define the FSM state table itself by a list of transition specifications.  Current state name, input name, output name and next state name.  May be followed by a set of the comments.
  • 22. The variable definitions define the variables in parameters.  Integer, Charstring, Octetstring, Boolean  Using Keyword “homing” to give a sequence of input names as a homing sequence.
  • 23. 1. Introduction 2. Using the tool 1. An Example 2. Functions provided by the Tool 3. The FSM specification 3. Test derivation methods 1. Preambles 2. Postambles 3. Transition Cover 4. State Identification Sequences 4. Experiments and Applications 5. Conclusion
  • 24. 3.1 Preambles  A tree with the initial state as its root is constructed such that the tail states of the outgoing transitions from the state corresponding to a current node.  All nodes in this tree must become a current node once and only once in the order that they enter this tree.  The path from the root to a given node is preamble for the corresponding state.
  • 25. S0 1 S1 3 5 S2 S3 Preamble = {ε, 1, 13, 135 }
  • 26. 3.2 Postambles  A tree with given state as its root is constructed.  Once the initial state has been added to the tree, the procedure stops.  The path from the root to the last added node is a postamble from the given state.  Maybe no postamble from the given state.
  • 27. S0 S1 2 S0 S2 S3 2 2 S0 S0 Preamble = {ε, 2, 2, 2 }
  • 28. 3.3 Transition Cover  The transition cover can be obtained by appending each outgoing transition from this state to its preamble. Preamble = {ε, 1, 13, 135 }  S0:ε::1, ε::4, ε::5  S1: 1::1, 1::2, 1::3, 1::4, 1::5  S2: 13::1, 13::2, 13::4, 13::5  S3: 135::1, 135::2, 135::4, 135::5  Transition Cover = {1, 4, 5, 11, 12, 13, 14, 15, 131, 132, 134, 135, 1351, 1352, 1354, 1355}
  • 29. 3.4 State Identification Sequences.  The characterization set W is a set of input sequence.  Harmonized state identification sets (HSI sets), subsets of W.  {D0, D1, …, Dn-1}  Di is a set of prefixes of sequences in W  n is the number of states of S.
  • 30. For any two distinguishable states Si and Sj of S, there exists a sequence σ that is a prefix of both σi ∈ Di and σj ∈ Dj such that σ can be accepted by these two states and produces different outputs.
  • 31. How is Optimal ? 1. The number of sequences in W is minimal. 2. The sum of their lengths is minimal.  To obtain a minimal characterization set for a give FSM maybe an NP-Hard problem.
  • 32. A heuristic solution A1: A set P0 of all the state pairs that are distinguishable for the given FSM is produced. A2: With P0, a characterization set W is obtained by forming a search tree from the input alphabet to distinguish the state pairs in P0. A3: From this W, some HSI set Di is selected for each state i, such that the number of distinguishable state pairs and the length of a sequence are traded off.
  • 33. The result of INRES responder  The result P0 of the algorithm A1 is the set of all possible state pairs.  The characterization set W from the algorithm A2 is {41}  The HSI sets {{41}, {41}, {4}, {4}}
  • 34. The algorithm A1  The algorithm A1 is obtained by adapting the FSM minimization algorithm give in [ G. J. Holzmann. Design and Validation of Computer Protocols, 1991 ]
  • 35. The algorithm A2  Forms the root as the current node to probe  For each input word, a son is built if it can lead to a better solution than other build nodes.  If it is estimated that a subtree with a minimal number of branches and with a minimal average length that distinguishes a maximal number of state pairs could be formed by probing an unprobed son of ti.
  • 37. The algorithm A3  A sequence σk in W is selected such that weighted sum of its length and the number of the state pairs that it can not distinguish in the left state pairs is minimal.  For each remaining state pair (l, m) that can be distinguished by σk, find a prefix of σk such that (l, m) is distinguished.  Then the prefix is put into the HSI sets Dl and Dm.
  • 38. W = {σ0, σ1,… σn-1} σk : Remain state pairs σ: distinguish ? (l, m) HSI Sets: {D0, D1, D2, .. Dl, …, Dm, …Dn-1}
  • 39. 1. Introduction 2. Using the tool 1. An Example 2. Functions provided by the Tool 3. The FSM specification 3. Test derivation methods 1. Preambles 2. Postambles 3. Transition Cover 4. State Identification Sequences 4. Experiments and Applications 5. Conclusion
  • 40. 4. Experiments and Applications State num. 10 50 100 150 200 Transition num. 100 2500 10000 23500 40000 CPU time (sec.) 0.11 2.96 40.87 197.06 760.89
  • 41. 1. Introduction 2. Using the tool 1. An Example 2. Functions provided by the Tool 3. The FSM specification 3. Test derivation methods 1. Preambles 2. Postambles 3. Transition Cover 4. State Identification Sequences 4. Experiments and Applications 5. Conclusion
  • 42. 5. Conclusion  Proposed a heuristic solution to derive near- optimal harmonized state identification sets.