SlideShare a Scribd company logo
1 of 25
Formal Semantics of Extended Hierarchical
 State Transition Matrix (EHSTM) by CSP

      Y. Yamagata, W. Kong, A. Fukuda,
       T. Nguyen, H. Ohsaki, K. Tagucni
          AIST and Kyushu University

       Cnam Paris, August 27th, 2012
EHSTM (1)
• Table based modeling language
EHSTM (2)
                         Task1       Task2



           Root matrix




Child matrix
Table vs. Chart
EHSTM                            State chart
• Table based                    • Chart based
• Event/state hierarchy          • Composite state
• Pros                           • Pros
   – All combination of events      – Intuitive
     and states must be          • Cons
     considered
                                    – Possibility of overlooking a
• Cons                                combination of a state and
   – Less intuitive                   an event.
   – Tables tend to be very
     large
ZIPC (1)
• ZIPC uses EHSTM as a modeling method
• ZIPC provides
   – simulation of models
   – code generation to C/C++

 Tables   Simulation
                                Code generation
                         ZIPC                     C/C++
ZIPC (2)
• Market share in Japan
  – among non-UML based modeling tools
                 5
             5
                                ZIPC

                                MATLAB/Simlink
                         42
                                Rational Test
                                RealTime
        34
                                Rational Rose
                                RealTime
Garakabu2 (1)
• Automatic verifier for EHSTM
Garakabu2 (2)
CVC3 (SMT solver)




    Formulas




     EHSTM
                    Simulation


                                 ZIPC   C/C++
Garakabu2 (3)
CVC3 (SMT solver)




    Formulas

                                 Justification?
                                  Complexity of translation
                                    No formal justification
     EHSTM
                    Simulation


                                      ZIPC                    C/C++
Our approach
 PAT Verifier         State-of-the-art model checker for CSP




CSP language          High-level specification language



                      Relatively simple translation


   EHSTM
                Simulation


                                 ZIPC                          C/C++
Related works
Formal semantics of state-chart
• Uselton 1994, Harel, Naamad 1996

Translation from state-chart to CSP
• Fuhrmann 1998,
• Sun, et.al 2005, 2008,
• Zhang and Liu 2010
Previous works on EHSTM
• Kong et.al 2011, 2011
CSP
      Terminate abnormally

      Terminate successfully

      Prefix

      Boolean choice

      Parallel composition

      Sequential composition

      interrupt

      Hiding

      Choice
Translation

      EHSTM                       CSP
      System                     Process
        Task                     Process
Hierarchy of matrices      Parallel composition
       Matrix                    Process
       State                 Global variable
 Event virtual frame       Sequence of events
       Event                      Event
     Expression                 Expression
Hierarchical Matrix
         T0                   S1                   S2
                              S2
         e1                                        …
                              □T1

         e2                       …                …

T0    T0 .state?S1    (q?e1   call(T1 ); T0 .state: S2; T0 | )
     | T0 .state?S2

call(T1 ) T1.start    T1.return       SKIP
Hierarchical Matrix
       T1                           S3                     S4

                                    S4                     S3
        e3
                                    P1                return

        e4                          …                      …

T1 ' T1.sate?S3             (q?e3   ...| )
     | T1.state?S4          (q?e3   T1.return   T1.start    T'1 | ...)
T1    T1.start       T1 '
Experiments

Experiment 1
• Test the interpretation of hierarchical
  matrices
• Compare the result with Garakabu2
Experiment 2
• Motivating example in Kong 2011
• Check the performance of the translation
Experiments - results

Experiment 1
• Both report deadlock as supposed.

Experiment 2
• PAT is >1000 times faster than Garakabu2
• This is most likely because
  • PAT does explicit model checking, while
  • Garakabu2 uses a SMT solver.
Experiment 1 - model
                  □0          S0        S1         S2
                              S1                   S0
                 e0==0                   x     □0.1
                              e0=1
                                               e0=1
                              S1        S2
                 e0==1                             x
                              □0.2     e0=0


                                     □0.2     S011      S012     S013
□0.1    S01            S02
                                              S012      S013
        S02
                                     e2==0                       return
e1==0                    x                    e2=1      e2=1
        e1=1
                                                                 S011
                       S01                               e2=0;
e1==1   return                       e2==1     x                 tmp=1;
                       e1=1                             tmp=0;
                                                                  e2=1;
Experiment 1 - results
• Garakabu2 and PAT report deadlock
• Time required < 1s
Experiment 2 - model
Experiment 2 – properties
•   Deadlock-free
•   STC1≡□(returner==ret⇒changer==wait_money_taken)
•   STC2≡□(changer==wait_request⇒returner==wait)
•   DYN≡□((changer==wait_requiest
            && X changer== wait_money_taken)⇒
             X returner==ret)
Experiment 2 – results(1)

             Example with bug

             PAT       PAT      Garakabu2   Garakabu2
Properties
             result    Time     result      time

Deadlock     Invalid   0.0013    Invalid       93

  STC1       Invalid   0.011     Invalid       14

  STC2       Invalid   0.0016    Invalid       16

  DYN        Invalid   0.0016    Invalid        4
Experiment 2 – results(2)

             Example without bug

             PAT      PAT     Garakabu2   Garakabu2
Properties
             result   time    result      time

Deadlock     Valid    0.077     Valid       1239

  STC1       Valid    0.053     Valid        511

  STC2       Valid    0.039     Valid        735

  DYN        Valid    0.056     Valid       3211
Summary
• Simple translation from EHSTM to CSP
  – Give a rigorous model of EHSTM
• Verification of translated model using PAT
  – The result coincides with that of Garakabu2
  – Faster than using Garakabu2
Future work
• Support more functionality of EHSTM
  – Hierarchical states
  – Interrupt
• PAT plugin
  – Mechanize translation

More Related Content

What's hot

Discreate time system and z transform
Discreate time system and z transformDiscreate time system and z transform
Discreate time system and z transform
VIKAS KUMAR MANJHI
 
Linear circuit and superposition
Linear circuit and superpositionLinear circuit and superposition
Linear circuit and superposition
lipschitzembed
 
Correlative level coding
Correlative level codingCorrelative level coding
Correlative level coding
srkrishna341
 
Robust adaptive integral backstepping control and its implementation on
Robust adaptive integral backstepping control and its implementation onRobust adaptive integral backstepping control and its implementation on
Robust adaptive integral backstepping control and its implementation on
Shubhobrata Rudra
 

What's hot (16)

01 intro to algorithm--updated 2015
01 intro to algorithm--updated 201501 intro to algorithm--updated 2015
01 intro to algorithm--updated 2015
 
Hd2
Hd2Hd2
Hd2
 
Chapter5
Chapter5Chapter5
Chapter5
 
Theory of Computation Unit 4
Theory of Computation Unit 4Theory of Computation Unit 4
Theory of Computation Unit 4
 
signal and system Lecture 1
signal and system Lecture 1signal and system Lecture 1
signal and system Lecture 1
 
Discreate time system and z transform
Discreate time system and z transformDiscreate time system and z transform
Discreate time system and z transform
 
Linear circuit and superposition
Linear circuit and superpositionLinear circuit and superposition
Linear circuit and superposition
 
publication1
publication1publication1
publication1
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Correlative level coding
Correlative level codingCorrelative level coding
Correlative level coding
 
Robust adaptive integral backstepping control and its implementation on
Robust adaptive integral backstepping control and its implementation onRobust adaptive integral backstepping control and its implementation on
Robust adaptive integral backstepping control and its implementation on
 
Signals and systems analysis using transform methods and matlab 3rd edition r...
Signals and systems analysis using transform methods and matlab 3rd edition r...Signals and systems analysis using transform methods and matlab 3rd edition r...
Signals and systems analysis using transform methods and matlab 3rd edition r...
 
Lecture10 Signal and Systems
Lecture10 Signal and SystemsLecture10 Signal and Systems
Lecture10 Signal and Systems
 
Capturing the Long Term Impact of Changes
Capturing the Long Term Impact of ChangesCapturing the Long Term Impact of Changes
Capturing the Long Term Impact of Changes
 
OS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and MonitorsOS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and Monitors
 
Z transform Day 1
Z transform Day 1Z transform Day 1
Z transform Day 1
 

Viewers also liked

Camomile - OCaml用Unicodeライブラリ
Camomile - OCaml用UnicodeライブラリCamomile - OCaml用Unicodeライブラリ
Camomile - OCaml用Unicodeライブラリ
Yamagata Yoriyuki
 
Camomile : A Unicode library for OCaml
Camomile : A Unicode library for OCamlCamomile : A Unicode library for OCaml
Camomile : A Unicode library for OCaml
Yamagata Yoriyuki
 
CSPによるコンカレントシステムの検証(1)
CSPによるコンカレントシステムの検証(1)CSPによるコンカレントシステムの検証(1)
CSPによるコンカレントシステムの検証(1)
Yamagata Yoriyuki
 
Consistency proof of a feasible arithmetic inside a bounded arithmetic
Consistency proof of a feasible arithmetic inside a bounded arithmeticConsistency proof of a feasible arithmetic inside a bounded arithmetic
Consistency proof of a feasible arithmetic inside a bounded arithmetic
Yamagata Yoriyuki
 
Bounded arithmetic in free logic
Bounded arithmetic in free logicBounded arithmetic in free logic
Bounded arithmetic in free logic
Yamagata Yoriyuki
 
CSPによる並行システムの検証(2)
CSPによる並行システムの検証(2)CSPによる並行システムの検証(2)
CSPによる並行システムの検証(2)
Yamagata Yoriyuki
 
Google 日本語入力 TechTalk 2010
Google 日本語入力 TechTalk 2010Google 日本語入力 TechTalk 2010
Google 日本語入力 TechTalk 2010
Yamagata Yoriyuki
 
透明な真理観を巡って
透明な真理観を巡って透明な真理観を巡って
透明な真理観を巡って
Shunsuke Yatabe
 

Viewers also liked (20)

Consistency proof of a feasible arithmetic inside a bounded arithmetic
Consistency proof of a feasible arithmetic inside a bounded arithmeticConsistency proof of a feasible arithmetic inside a bounded arithmetic
Consistency proof of a feasible arithmetic inside a bounded arithmetic
 
Bounded arithmetic in free logic
Bounded arithmetic in free logicBounded arithmetic in free logic
Bounded arithmetic in free logic
 
Camomile - OCaml用Unicodeライブラリ
Camomile - OCaml用UnicodeライブラリCamomile - OCaml用Unicodeライブラリ
Camomile - OCaml用Unicodeライブラリ
 
Translating STM to CSP
Translating STM to CSPTranslating STM to CSP
Translating STM to CSP
 
Camomile : A Unicode library for OCaml
Camomile : A Unicode library for OCamlCamomile : A Unicode library for OCaml
Camomile : A Unicode library for OCaml
 
CSPによるコンカレントシステムの検証(1)
CSPによるコンカレントシステムの検証(1)CSPによるコンカレントシステムの検証(1)
CSPによるコンカレントシステムの検証(1)
 
Consistency proof of a feasible arithmetic inside a bounded arithmetic
Consistency proof of a feasible arithmetic inside a bounded arithmeticConsistency proof of a feasible arithmetic inside a bounded arithmetic
Consistency proof of a feasible arithmetic inside a bounded arithmetic
 
Scalaによるドメイン特化言語を使ったソフトウェアの動作解析
Scalaによるドメイン特化言語を使ったソフトウェアの動作解析Scalaによるドメイン特化言語を使ったソフトウェアの動作解析
Scalaによるドメイン特化言語を使ったソフトウェアの動作解析
 
モデル検査紹介
モデル検査紹介モデル検査紹介
モデル検査紹介
 
OCamlとUnicode
OCamlとUnicodeOCamlとUnicode
OCamlとUnicode
 
Consistency proof of a feasible arithmetic inside a bounded arithmetic
Consistency proof of a feasible arithmetic inside a bounded arithmeticConsistency proof of a feasible arithmetic inside a bounded arithmetic
Consistency proof of a feasible arithmetic inside a bounded arithmetic
 
CamomileでUnicode
CamomileでUnicodeCamomileでUnicode
CamomileでUnicode
 
Bounded arithmetic in free logic
Bounded arithmetic in free logicBounded arithmetic in free logic
Bounded arithmetic in free logic
 
ヴォイニッチ手稿と私
ヴォイニッチ手稿と私ヴォイニッチ手稿と私
ヴォイニッチ手稿と私
 
CSPによる並行システムの検証(2)
CSPによる並行システムの検証(2)CSPによる並行システムの検証(2)
CSPによる並行システムの検証(2)
 
Google 日本語入力 TechTalk 2010
Google 日本語入力 TechTalk 2010Google 日本語入力 TechTalk 2010
Google 日本語入力 TechTalk 2010
 
透明な真理観を巡って
透明な真理観を巡って透明な真理観を巡って
透明な真理観を巡って
 
LT資料
LT資料LT資料
LT資料
 
機械学習に取り組んでいる企業の紹介
機械学習に取り組んでいる企業の紹介機械学習に取り組んでいる企業の紹介
機械学習に取り組んでいる企業の紹介
 
CSPを用いたログ解析その他
CSPを用いたログ解析その他CSPを用いたログ解析その他
CSPを用いたログ解析その他
 

Similar to UML&FM 2012

asymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisasymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysis
Anindita Kundu
 
DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..
KarthikeyaLanka1
 
Generating Automated and Online Test Oracles for Simulink Models with Continu...
Generating Automated and Online Test Oracles for Simulink Models with Continu...Generating Automated and Online Test Oracles for Simulink Models with Continu...
Generating Automated and Online Test Oracles for Simulink Models with Continu...
Lionel Briand
 
Algorithms - Rocksolid Tour 2013
Algorithms  - Rocksolid Tour 2013Algorithms  - Rocksolid Tour 2013
Algorithms - Rocksolid Tour 2013
Gary Short
 
2. Asymptotic Notations and Complexity Analysis.pptx
2. Asymptotic Notations and Complexity Analysis.pptx2. Asymptotic Notations and Complexity Analysis.pptx
2. Asymptotic Notations and Complexity Analysis.pptx
Rams715121
 
Molecular models, threads and you
Molecular models, threads and youMolecular models, threads and you
Molecular models, threads and you
Jiahao Chen
 
Computer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docxComputer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docx
ladonnacamplin
 

Similar to UML&FM 2012 (20)

1_Asymptotic_Notation_pptx.pptx
1_Asymptotic_Notation_pptx.pptx1_Asymptotic_Notation_pptx.pptx
1_Asymptotic_Notation_pptx.pptx
 
asymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisasymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysis
 
Lec1
Lec1Lec1
Lec1
 
DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..
 
Generating Automated and Online Test Oracles for Simulink Models with Continu...
Generating Automated and Online Test Oracles for Simulink Models with Continu...Generating Automated and Online Test Oracles for Simulink Models with Continu...
Generating Automated and Online Test Oracles for Simulink Models with Continu...
 
CS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdfCS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdf
 
Systems Analysis & Control: Steady State Errors
Systems Analysis & Control: Steady State ErrorsSystems Analysis & Control: Steady State Errors
Systems Analysis & Control: Steady State Errors
 
Algorithms - Rocksolid Tour 2013
Algorithms  - Rocksolid Tour 2013Algorithms  - Rocksolid Tour 2013
Algorithms - Rocksolid Tour 2013
 
Krish final
Krish  finalKrish  final
Krish final
 
2. Asymptotic Notations and Complexity Analysis.pptx
2. Asymptotic Notations and Complexity Analysis.pptx2. Asymptotic Notations and Complexity Analysis.pptx
2. Asymptotic Notations and Complexity Analysis.pptx
 
Waveform_codingUNIT-II_DC_-PPT.pptx
Waveform_codingUNIT-II_DC_-PPT.pptxWaveform_codingUNIT-II_DC_-PPT.pptx
Waveform_codingUNIT-II_DC_-PPT.pptx
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
 
Lecture 3 insertion sort and complexity analysis
Lecture 3   insertion sort and complexity analysisLecture 3   insertion sort and complexity analysis
Lecture 3 insertion sort and complexity analysis
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of Algorithms
 
Waveform_codingUNIT-II_DC_-PPT.pptx
Waveform_codingUNIT-II_DC_-PPT.pptxWaveform_codingUNIT-II_DC_-PPT.pptx
Waveform_codingUNIT-II_DC_-PPT.pptx
 
ALGORITHM-ANALYSIS.ppt
ALGORITHM-ANALYSIS.pptALGORITHM-ANALYSIS.ppt
ALGORITHM-ANALYSIS.ppt
 
18103010 algorithm complexity (iterative)
18103010 algorithm complexity (iterative)18103010 algorithm complexity (iterative)
18103010 algorithm complexity (iterative)
 
Molecular models, threads and you
Molecular models, threads and youMolecular models, threads and you
Molecular models, threads and you
 
Analysis and design of algorithms part2
Analysis and design of algorithms part2Analysis and design of algorithms part2
Analysis and design of algorithms part2
 
Computer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docxComputer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docx
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

UML&FM 2012

  • 1. Formal Semantics of Extended Hierarchical State Transition Matrix (EHSTM) by CSP Y. Yamagata, W. Kong, A. Fukuda, T. Nguyen, H. Ohsaki, K. Tagucni AIST and Kyushu University Cnam Paris, August 27th, 2012
  • 2. EHSTM (1) • Table based modeling language
  • 3. EHSTM (2) Task1 Task2 Root matrix Child matrix
  • 4. Table vs. Chart EHSTM State chart • Table based • Chart based • Event/state hierarchy • Composite state • Pros • Pros – All combination of events – Intuitive and states must be • Cons considered – Possibility of overlooking a • Cons combination of a state and – Less intuitive an event. – Tables tend to be very large
  • 5. ZIPC (1) • ZIPC uses EHSTM as a modeling method • ZIPC provides – simulation of models – code generation to C/C++ Tables Simulation Code generation ZIPC C/C++
  • 6. ZIPC (2) • Market share in Japan – among non-UML based modeling tools 5 5 ZIPC MATLAB/Simlink 42 Rational Test RealTime 34 Rational Rose RealTime
  • 7. Garakabu2 (1) • Automatic verifier for EHSTM
  • 8. Garakabu2 (2) CVC3 (SMT solver) Formulas EHSTM Simulation ZIPC C/C++
  • 9. Garakabu2 (3) CVC3 (SMT solver) Formulas Justification? Complexity of translation No formal justification EHSTM Simulation ZIPC C/C++
  • 10. Our approach PAT Verifier State-of-the-art model checker for CSP CSP language High-level specification language Relatively simple translation EHSTM Simulation ZIPC C/C++
  • 11. Related works Formal semantics of state-chart • Uselton 1994, Harel, Naamad 1996 Translation from state-chart to CSP • Fuhrmann 1998, • Sun, et.al 2005, 2008, • Zhang and Liu 2010 Previous works on EHSTM • Kong et.al 2011, 2011
  • 12. CSP Terminate abnormally Terminate successfully Prefix Boolean choice Parallel composition Sequential composition interrupt Hiding Choice
  • 13. Translation EHSTM CSP System Process Task Process Hierarchy of matrices Parallel composition Matrix Process State Global variable Event virtual frame Sequence of events Event Event Expression Expression
  • 14. Hierarchical Matrix T0 S1 S2 S2 e1 … □T1 e2 … … T0 T0 .state?S1 (q?e1 call(T1 ); T0 .state: S2; T0 | ) | T0 .state?S2 call(T1 ) T1.start T1.return SKIP
  • 15. Hierarchical Matrix T1 S3 S4 S4 S3 e3 P1 return e4 … … T1 ' T1.sate?S3 (q?e3 ...| ) | T1.state?S4 (q?e3 T1.return T1.start T'1 | ...) T1 T1.start T1 '
  • 16. Experiments Experiment 1 • Test the interpretation of hierarchical matrices • Compare the result with Garakabu2 Experiment 2 • Motivating example in Kong 2011 • Check the performance of the translation
  • 17. Experiments - results Experiment 1 • Both report deadlock as supposed. Experiment 2 • PAT is >1000 times faster than Garakabu2 • This is most likely because • PAT does explicit model checking, while • Garakabu2 uses a SMT solver.
  • 18. Experiment 1 - model □0 S0 S1 S2 S1 S0 e0==0 x □0.1 e0=1 e0=1 S1 S2 e0==1 x □0.2 e0=0 □0.2 S011 S012 S013 □0.1 S01 S02 S012 S013 S02 e2==0 return e1==0 x e2=1 e2=1 e1=1 S011 S01 e2=0; e1==1 return e2==1 x tmp=1; e1=1 tmp=0; e2=1;
  • 19. Experiment 1 - results • Garakabu2 and PAT report deadlock • Time required < 1s
  • 20. Experiment 2 - model
  • 21. Experiment 2 – properties • Deadlock-free • STC1≡□(returner==ret⇒changer==wait_money_taken) • STC2≡□(changer==wait_request⇒returner==wait) • DYN≡□((changer==wait_requiest && X changer== wait_money_taken)⇒ X returner==ret)
  • 22. Experiment 2 – results(1) Example with bug PAT PAT Garakabu2 Garakabu2 Properties result Time result time Deadlock Invalid 0.0013 Invalid 93 STC1 Invalid 0.011 Invalid 14 STC2 Invalid 0.0016 Invalid 16 DYN Invalid 0.0016 Invalid 4
  • 23. Experiment 2 – results(2) Example without bug PAT PAT Garakabu2 Garakabu2 Properties result time result time Deadlock Valid 0.077 Valid 1239 STC1 Valid 0.053 Valid 511 STC2 Valid 0.039 Valid 735 DYN Valid 0.056 Valid 3211
  • 24. Summary • Simple translation from EHSTM to CSP – Give a rigorous model of EHSTM • Verification of translated model using PAT – The result coincides with that of Garakabu2 – Faster than using Garakabu2
  • 25. Future work • Support more functionality of EHSTM – Hierarchical states – Interrupt • PAT plugin – Mechanize translation