Analyzing Robustness of UML State Machines

Similar documents
Analyzing Robustness of UML State Machines

SCCharts. Sequentially Constructive Charts

Interactive Esterel to SyncCharts Transformation. Christian Motika

Executing SyncCharts with Ptolemy

Synchronous Statecharts. Christian Motika

Interactive Transformations for Visual Models

Synchronous Dataflow Processong

Inductive Proof Outlines for Multithreaded Java with Exceptions

A Solution Based on Modeling and Code Generation for Embedded Control System

Ingegneria del Software Corso di Laurea in Informatica per il Management. Introduction to UML

tempo2hsal: Converting Tempo Models into HybridSal Tool Description

Embedded Real-Time Systems

Theory and Algorithms for the Generation and Validation of Speculative Loop Optimizations

Introduction to Formal Methods

Concurrent Models of Computation

A Formal V&V Framework for UML Models Based on Model Transformation Techniques

Compositional Model Based Software Development

On the Role of Formal Methods in Software Certification: An Experience Report

Tsmart-BIPEX: An Integrated Graphical Design Toolkit for Software Systems

Updates on SCCharts Christian Motika Steven Smyth

Dresden OCL2 in MOFLON

Formal Methods for Software Development

Lecture 16: Hierarchical State Machines II

A Flexible Approach for Validating ı Models

2 nd UML 2 Semantics Symposium: Formal Semantics for UML

A Pratical Application of the Object Constraint Language OCL

Handling Integer Arithmetic in the Verification of Java Programs

Modal Models in Ptolemy

Reinhard v. Hanxleden 1, Michael Mendler 2, J. Aguado 2, Björn Duderstadt 1, Insa Fuhrmann 1, Christian Motika 1, Stephen Mercer 3 and Owen Brian 3

challenges in domain-specific modeling raphaël mannadiar august 27, 2009

A Tabular Expression Toolbox for Matlab/Simulink

How useful is the UML profile SPT without Semantics? 1

An Approach to the Generation of High-Assurance Java Card Applets

Lecture Notes on CASE-Tools: Together

Model Checking VHDL with CV

Management. Software Quality. Dr. Stefan Wagner Technische Universität München. Garching 28 May 2010

Formalizing UML Models and OCL Constraints in PVS 1

Compiling SCCharts A Case-Study on Interactive Model-Based Compilation

INSTITUT FÜR INFORMATIK

Key Properties for Comparing Modeling Languages and Tools: Usability, Completeness and Scalability

UML is still inconsistent!

Rance Cleaveland The Concurrency Factory is an integrated toolset for specication, simulation,

Transforming UML Collaborating Statecharts for Verification and Simulation

Static analysis and testing of executable DSL specification

States Transitions Connectors Esterel Studio

JPF SE: A Symbolic Execution Extension to Java PathFinder

Reactive Parallel Processing for Synchronous Dataflow

Overview. Synchronous Languages Lecture 12. Code Generation for Sequential Constructiveness. Compilation Overview. The 5-Minute Review Session

Developing Safety-Critical Systems: The Role of Formal Methods and Tools

Prof. Dr. Reinhard von Hanxleden. Christian-Albrechts Universität Kiel Department of Computer Science Real-Time Systems and Embedded Systems Group

Runtime Checking for Program Verification Systems

EMF Refactor: Specification and Application of Model Refactorings within the Eclipse Modeling Framework

It s all Done with Mirrors Patterns and OCL. KMF Kent Modelling Framework D.H.Akehurst and O.Patrascoiu

SOFTWARE MODELING AND DESIGN. UML, Use Cases, Patterns, and. Software Architectures. Ki Cambridge UNIVERSITY PRESS. Hassan Gomaa

The TTC 2011 Reengineering Challenge Using MOLA and Higher-Order Transformations

Abstract formula. Net formula

Proof Pearl: The Termination Analysis of Terminator

Algorithmic Verification. Algorithmic Verification. Model checking. Algorithmic verification. The software crisis (and hardware as well)

Flight Systems are Cyber-Physical Systems

Master Thesis Project Plan. Reusable Mathematical Models

Simulink/Stateflow. June 2008

SyncCharts in C. Reinhard von Hanxleden

Model Querying with Graphical Notation of QVT Relations

Timing Analysis on Complex Real-Time Automotive Multicore Architectures

Java-MOP: A Monitoring Oriented Programming Environment for Java

Leslie Lamport: The Specification Language TLA +

Synchronous C + WCRT Algebra 101

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support

Modeling Systems Using Design Patterns

Secure Compilation of a Multi-tier Web Language

Static Program Analysis

Formal Specification of Software Systems

The Unified Modeling Language User Guide

Static Safety Analysis of UML Action Semantics for Critical Systems Development

SPT - The SDL Pattern Tool B4 - Generic Communication Systems

COMP 763. Eugene Syriani. Ph.D. Student in the Modelling, Simulation and Design Lab School of Computer Science. McGill University

RAMSES: a Reflective Middleware for Software Evolution

Simulation and Verification of UML-based Railway Interlocking Designs

The Formal Verification of a Distributed Realtime System. Lecture 2: Overview

SysML Past, Present, and Future. J.D. Baker Sparx Systems Ambassador Sparx Systems Pty Ltd

Reflective Design Patterns to Implement Fault Tolerance

TABLE OF CONTENT CHAPTER TITLE PAGE DECLARATION OF THESIS STATUS SUPERVISOR DECLARATION TITLE PAGE STUDENT DECLARATION ACKNOWLEDGEMENT ABSTRACT

The Unified Modelling Language. Example Diagrams. Notation vs. Methodology. UML and Meta Modelling

StateClock: a Tool for Timed Reactive Modules

Matching Logic. Grigore Rosu University of Illinois at Urbana-Champaign

Tools for Formally Reasoning about Systems. June Prepared by Lucas Wagner

Model Checking DSL-Generated C Source Code

Software Engineering of Robots

Verifying Java Programs Verifying Java Programs with KeY

Introduction In Practice State Explosion Problem Infinity and Uncomputability Techniques References. Model Checking. Toryn Qwyllyn Klassen

Scenario-based Synthesis of Annotated Class Diagrams in UML

Exploiting Visual Languages Generation and UML Meta Modeling to Construct Meta-CASE Workbenches

Lecture 10: State Machines Overview

An evaluation of Papyrus-RT for solving the leader-follower challenge problem

Validating UML Statechart-Based Assertions Libraries for Improved Reliability and Assurance 1

Towards a Unified View of Modeling and Programming (Track Summary)

Seminar: Specification and Verification of Object-oriented Software. The KeY Tool

Polynomial Size Analysis for an Imperative Language

Typestate Checking for Actionscript 3

SERG. Spoofax: An Extensible, Interactive Development Environment for Program Transformation with Stratego/XT

Transcription:

Analyzing Robustness of UML State Machines Reinhard von Hanxleden Department of Computer Science and Applied Mathematics Real-Time Systems and Embedded Systems Group Christian-Albrecht Universität zu Kiel MARTES 06, October 2006

Contents Introduction Style Checking in Statecharts The Style Checker Summary & Conclusion Appendix Reinhard von Hanxleden Analyzing Robustness of UML State Machines 2/11

Introduction Motivation realistic Statecharts possess high complexity size side effects misunderstanding potential errors can be subtle and hard to locate for humans tools provide restricted facilities to avoid modeling errors Reinhard von Hanxleden Analyzing Robustness of UML State Machines 3/11

Introduction Motivation realistic Statecharts possess high complexity size side effects misunderstanding potential errors can be subtle and hard to locate for humans tools provide restricted facilities to avoid modeling errors Purpose formulate profiles of robustness rules as a Statechart modeling style guide avoid errors, improve readability and maintainability establishment of automatic Statechart analysis in a highly configurable tool Reinhard von Hanxleden Analyzing Robustness of UML State Machines 3/11

Modeling Errors with Statecharts Humans tend to digress, err, and diversify. Reinhard von Hanxleden Analyzing Robustness of UML State Machines 4/11

Modeling Errors with Statecharts Humans tend to digress, err, and diversify. Reinhard von Hanxleden Analyzing Robustness of UML State Machines 4/11

Style Checking in Statecharts Static Analysis of Statecharts Syntactic Correctness Style Checking in Statecharts Error prevention: human code review dynamic testing Model Checking Style Checking Syntactic Analysis Semantic Robustness Readability Efficiency Syntactic Robustness Reinhard von Hanxleden Analyzing Robustness of UML State Machines 5/11

Style Checking in Statecharts Static Analysis of Statecharts Syntactic Correctness Style Checking in Statecharts Error prevention: human code review dynamic testing Model Checking Style Checking Syntactic Analysis Semantic Robustness Statechart Robustness: syntactic and semantic style Readability Efficiency Syntactic Robustness gather from element correlation Reinhard von Hanxleden Analyzing Robustness of UML State Machines 5/11

Style Checking Tools for Statecharts Robustness KIEL Checking Rule Checker State Analyzer Mint Guideline-Checker Layout Style Mint/Guideline-Checker: related to Matlab/Simulink/Stateflow trivial graphical and syntactic checks State Analyzer: related to Statemate automated theorem proving Problem Specific Rule Checker: related to UML checking with Java and OCL interpreting OCL Reinhard von Hanxleden Analyzing Robustness of UML State Machines 6/11

A Statechart Style Guide operational instructions for humans and configuration for automated analysis set of 41 wellformedness-, syntactic, and semantic rules defines a subset of the language Statechart Reinhard von Hanxleden Analyzing Robustness of UML State Machines 7/11

A Statechart Style Guide operational instructions for humans and configuration for automated analysis set of 41 wellformedness-, syntactic, and semantic rules defines a subset of the language Statechart Connectivity Syntactic Rules Reinhard von Hanxleden Analyzing Robustness of UML State Machines 7/11

A Statechart Style Guide operational instructions for humans and configuration for automated analysis set of 41 wellformedness-, syntactic, and semantic rules defines a subset of the language Statechart Dwelling Connectivity Syntactic Rules Overlapping Transitions Semantic Rules Reinhard von Hanxleden Analyzing Robustness of UML State Machines 7/11

Checking: The Environment Kiel Integrated Environment for Layout modeling environment to explore the visualization and intuitive comprehend complex reactive systems provides a simulation based on dynamic focus-and-context KIEL s generic concept of Statecharts can be adaptated to specific notations and semantics imports, visualizes, and simulates Statecharts created with Esterel Studio, Stateflow, UML tools via XMI format Statechart synthesis from textual languages (e. g. Esterel) structural Statechart optimization for compactness and readability Steffen Prochnow and Reinhard von Hanxleden. Comfortable Modeling of Complex Reactive Systems. In Proceedings of Design, Automation and Test in Europe (DATE 06), Munich, March 2006. Steffen Prochnow, Claus Traulsen, and Reinhard von Hanxleden. Synthesizing Safe State Machines from Esterel. In Proceedings of ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES 06), Ottawa, Canada, June 2006. Reinhard von Hanxleden Analyzing Robustness of UML State Machines 8/11

Checking: The Plug-In Syntactical Checks/Wellformedness: adopted OCL to KOCL rule UML13CompositeStateRule1 { declarations { message "A composite state can have...";} constraint { context ORState or Region; "self.subnodes->select( v v.oclistypeof(initialstate))-> size<=1";} fails {message;}} Reinhard von Hanxleden Analyzing Robustness of UML State Machines 9/11

Checking: The Plug-In Syntactical Checks/Wellformedness: adopted OCL to KOCL transformation into executable Java code Java Code Snippet OCL Constraint KIEL Datastructure Meta-model rule UML13CompositeStateRule1 { declarations { message "A composite state can have...";} constraint { context ORState or Region; "self.subnodes->select( v v.oclistypeof(initialstate))-> size<=1";} fails {message;}} Java Code for Checking Dresden OCL-Toolkit Reinhard von Hanxleden Analyzing Robustness of UML State Machines 9/11

Checking: The Plug-In Syntactical Checks/Wellformedness: adopted OCL to KOCL transformation into executable Java code Java Code Snippet OCL Constraint KIEL Datastructure Meta-model rule UML13CompositeStateRule1 { declarations { message "A composite state can have...";} constraint { context ORState or Region; "self.subnodes->select( v v.oclistypeof(initialstate))-> size<=1";} fails {message;}} Java Code for Checking Dresden OCL-Toolkit Semantical Checks: using of a theorem prover (CVC Lite) e. g. detecting a non-dwelling state: ((e 1 c 1 ) (e 2 c 2 )) implementation of JNI communication with SWIG Reinhard von Hanxleden Analyzing Robustness of UML State Machines 9/11

Demo: Error Checking Reinhard von Hanxleden Analyzing Robustness of UML State Machines 10/11

Summary & Conclusion Contributions: Comprehensive Statechart Style Guide Syntactic and Semantic analyses Transformative Approach for OCL usage Reinhard von Hanxleden Analyzing Robustness of UML State Machines 11/11

Summary & Conclusion Contributions: Comprehensive Statechart Style Guide Syntactic and Semantic analyses Transformative Approach for OCL usage Conclusion: OCL sufficient for most of our checks OCL rule specification is much faster then programming OCL doesn t fit all intended Statechart analyses: theorem proving was necessary Reinhard von Hanxleden Analyzing Robustness of UML State Machines 11/11

Summary & Conclusion Contributions: Comprehensive Statechart Style Guide Syntactic and Semantic analyses Transformative Approach for OCL usage Conclusion: OCL sufficient for most of our checks OCL rule specification is much faster then programming OCL doesn t fit all intended Statechart analyses: theorem proving was necessary We look for realistic models to apply our checks! thanks! questions or comments? Reinhard von Hanxleden Analyzing Robustness of UML State Machines 11/11

Appendix: SWIG Workflow CVCL.h files manual annotation SWIG interface definition file Java Wrapper Classes SWIG Java Native Interface (JNI) KIEL Checking Plug-In SWIG C++ wapper for CVCL library CVCL C++ library C++ Wrapper Classes CVCL C++ library uses Java wrapper classes for CVCL communication through JNI gcc wrapped CVCL libraray, JNI enabled (a) The SWIG Workflow (b) Composition of Wrapper Layers Figure: Interfacing of KIEL and the CVC Lite Library via JNI and SWIG. Reinhard von Hanxleden Analyzing Robustness of UML State Machines 11/11

Appendix: Further Rules Dwelling Connectivity DefaultTransition Syntactic Rules Overlapping Transitions Semantic Rules Read/Write Race Condition Reinhard von Hanxleden Analyzing Robustness of UML State Machines 11/11

Appendix: Bibliography Miltiadis Moutos, Albrecht Korn, and Carsten Fisel. Guideline-Checker. Studienarbeit, University of Applied Sciences in Esslingen, June 2000. Christian Scheidler. Systems Engineering for Time Triggered Architectures. SETTA Consortium, 2002. Deliverable D7.3 Final Document. Martin Mutz and Michaela Huhn. Automated statechart analysis for user-defined design rules. Technical report, Technische Universität Braunschweig, 2003. David M. Beazley. SWIG: An easy to use tool for integrating scripting languages with C and C++. In Proceedings of the Fourth Annual USENIX Tcl/Tk Workshop, pages 129 139, 1996. Clark W. Barrett and Sergey Berezin. CVC Lite: A new implementation of the Cooperating Validity Checker Category B. In Rajeev Alur and Doron A. Peled, editors, Proceedings of Computer Aided Verification: 16th International Conference, CAV 2004, Boston, volume 3114 of Lecture Notes in Computer Science, pages 515 518. Springer, 2004. Steffen Prochnow and Reinhard von Hanxleden. Comfortable Modeling of Complex Reactive Systems. In Proceedings of Design, Automation and Test in Europe (DATE 06), Munich, March 2006. Steffen Prochnow, Claus Traulsen, and Reinhard von Hanxleden. Synthesizing Safe State Machines from Esterel. In Proceedings of ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES 06), Ottawa, Canada, June 2006. Reinhard von Hanxleden Analyzing Robustness of UML State Machines 11/11