Hongyu Zhang, Jeremy S. Bradbury, James R. Cordy, Juergen Dingel

Slides:



Advertisements
Similar presentations
Jeremy S. Bradbury, James R. Cordy, Juergen Dingel, Michel Wermelinger
Advertisements

Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
Reliable Scripting Using Push Logic Push Logic David Greaves, Daniel Gordon University of Cambridge Computer Laboratory Reliable Scripting.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
© Chinese University, CSE Dept. Software Engineering / Software Engineering Topic 1: Software Engineering: A Preview Your Name: ____________________.
ECE 720T5 Fall 2012 Cyber-Physical Systems Rodolfo Pellizzoni.
Presenter: PCLee – This paper outlines the MBAC tool for the generation of assertion checkers in hardware. We begin with a high-level presentation.
ISBN Chapter 3 Describing Syntax and Semantics.
Software Model Checking for Embedded Systems PIs: Matthew Dwyer 1, John Hatcliff 1, and George Avrunin 2 Post-docs: Steven Seigel 2, Radu Iosif 1 Students:
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Discrete-Event Simulation: A First Course Steve Park and Larry Leemis College of William and Mary.
Java for High Performance Computing Jordi Garcia Almiñana 14 de Octubre de 1998 de la era post-internet.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Operational Semantics.
Introduction and Syntax. Course objectives Discuss features of programming languages. Discuss how the features are implemented in a simple computer architecture.
Describing Syntax and Semantics
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare.
Software Engineering Tools and Methods Presented by: Mohammad Enamur Rashid( ) Mohammad Rashim Uddin( ) Masud Ur Rahman( )
What Exactly are the Techniques of Software Verification and Validation A Storehouse of Vast Knowledge on Software Testing.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
CS102 Introduction to Computer Programming
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
CSC3315 (Spring 2009)1 CSC 3315 Programming Languages Hamid Harroud School of Science and Engineering, Akhawayn University
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
1 Specialization Tools and Techniques for Systematic Optimization of System Software McNamee, Walpole, Pu, Cowan, Krasic, Goel, Wagle, Consel, Muller,
Proof Carrying Code Zhiwei Lin. Outline Proof-Carrying Code The Design and Implementation of a Certifying Compiler A Proof – Carrying Code Architecture.
WSMX Execution Semantics Executable Software Specification Eyal Oren DERI
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
Verification of behavioural elements of UML models using B Truong, Ninh-Thuan and Souquieres, Jeanine In Proceedings of the 2005 ACM Symposium on.
Requirements Specification. Welcome to Software Engineering: “Requirements Specification” “Requirements Specification”  Verb?  Noun?  “Specification”
Basic Concepts of Component- Based Software Development (CBSD) Model-Based Programming and Verification.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Open Incremental Model Checking (OIMC) and the Role of Contracts Model-Based Programming and Verification.
CSCI1600: Embedded and Real Time Software Lecture 28: Verification I Steven Reiss, Fall 2015.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
What’s Ahead for Embedded Software? (Wed) Gilsoo Kim
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
Programming Languages Concepts Chapter 1: Programming Languages Concepts Lecture # 4.
The PLA Model: On the Combination of Product-Line Analyses 강태준.
Principles of Programming & Software Engineering
Advanced Computer Systems
Chapter 1 Introduction.
SysML v2 Formalism: Requirements & Benefits
DDC 1023 – Programming Technique
Complexity Time: 2 Hours.
Distribution and components
Chapter 1 Introduction.
Web Ontology Language for Service (OWL-S)
Compiler Lecture 1 CS510.
runtime verification Brief Overview Grigore Rosu
Syntax-based Testing CS 4501 / 6501 Software Testing
Introduction to Software Testing Chapter 5.1 Syntax-based Testing
Unit# 8: Introduction to Computer Programming
Model-Driven Analysis Frameworks for Embedded Systems
Introduction to Software Testing
Ada – 1983 History’s largest design effort
Objective of This Course
Multiple Aspect Modeling of the Synchronous Language Signal
Event-Based Architecture Definition Language
Software Verification and Validation
Software Verification and Validation
Introduction to Software Testing Chapter 5.1 Syntax-based Testing
Automated Analysis and Code Generation for Domain-Specific Models
Chapter 10: Compilers and Language Translation
Software Verification and Validation
Presentation transcript:

Hongyu Zhang, Jeremy S. Bradbury, James R. Cordy, Juergen Dingel Implementation and Verification of Implicit Invocation Systems Using Source Transformation Hongyu Zhang, Jeremy S. Bradbury, James R. Cordy, Juergen Dingel Software Technology Laboratory School of Computing, Queen’s University Kingston, Ontario, Canada SCAM 2005 SUPPORTED BY

Verification and Validation Testing and model checking Certification gap: Testing uses execution artifacts (code) directly Model checking uses separate, hand-constructed models and properties Bridged by hand: Either code-to-model or model-to-code Disjoint, error prone With the growing size and complexity of software systems, software verification and validation (V&V) is becoming increasingly important. Testing and model checking belong to the two categories of software V&V: testing/ inspection and formal methods. While testing focuses on the actual behavior of the program, model checking focuses on the mathematical model. In fact, there is often a large semantic gap between the software developer artifacts that are tested and the artifacts that are SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Implicit Invocation Implicit invocation (II) systems Concurrent, loosely coupled components Communicate using events (external / internal) Increasingly popular for service integration (web) Particularly difficult to certify Prone to deadlock, race conditions, etc. Good candidate for comparing, contrasting and unifying testing and model checking With the growing size and complexity of software systems, software verification and validation (V&V) is becoming increasingly important. Testing and model checking belong to the two categories of software V&V: testing/ inspection and formal methods. While testing focuses on the actual behavior of the program, model checking focuses on the mathematical model. In fact, there is often a large semantic gap between the software developer artifacts that are tested and the artifacts that are SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Our Approach: IIL Custom language and system for uniform testing and model checking of II systems Custom implicit invocation language - IIL Clear, transparent expression of paradigm including verification constraints Executable for testing, automatic modelling for verification of constraints Implementation of both execution and modelling using formal source transformations To alleviate the semantic artifact gap, II systems feature a lot of non-determinism due to concurrent execution of components. This high degree of non-determinism makes II systems challenging to test and model check. Additionally, II has become increasingly popular as an integration mechanism for loosely coupled components. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

II Language (IIL) Special features in II language: Event declarations. Component declarations. Announce statements. Dispatcher declaration. Event-method bindings. Property declarations. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

II Language (IIL) Event Declarations Special features in II language: Event declarations. Component declarations. Announce statements. Dispatcher declaration. Event-method bindings. Property declarations. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Component Declarations II Language (IIL) Component Declarations Special features in II language: Event declarations. Component declarations. Announce statements. Dispatcher declaration. Event-method bindings. Property declarations. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

II Language (IIL) Announce Statements Special features in II language: Event declarations. Component declarations. Announce statements. Dispatcher declaration. Event-method bindings. Property declarations. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Dispatcher Declaration II Language (IIL) Dispatcher Declaration Special features in II language: Event declarations. Component declarations. Announce statements. Dispatcher declaration. Event-method bindings. Property declarations. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Event-method Declarations II Language (IIL) Special features in II language: Event declarations. Component declarations. Announce statements. Dispatcher declaration. Event-method bindings. Property declarations. Event-method Declarations SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Property Declarations II Language (IIL) Special features in II language: Event declarations. Component declarations. Announce statements. Dispatcher declaration. Event-method bindings. Property declarations. Property Declarations SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Implementation of IIL Source transformation framework using TXL Experiment in both V&V and source transformation Formal, verifiable SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Execution & Testing IIL Programs Turing Plus Efficiently executable concurrent programming language with random scheduling SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Execution & Testing IIL Programs Turing Plus concurrent language with random scheduling concurrency simulation Need execution model of IIL (distributed, implicit) in Turing Plus (monolithic, explicit) In our Turing Plus model, we take this approach and use three steps of explicit invocation to implement II (see Figure 4). That is, an explicit method call is used in event announcement, event delivery and bound method invocation. The three main elements of our implementation of II in Turing Plus are: 1. A system event warehouse, a set of queues, is built to receive all the announced events. When components announce an event or an environment event is generated, it will be sent to the system event warehouse. 2. The dispatcher removes the events in the system event warehouse and delivers them. Environment events will be delivered immediately. Local events will be delivered according to the delivery policy. The dispatcher delivers the events in the system event warehouse by calling the bound component to receive the event. 3. Each component has a component event warehouse to receive the events delivered by the dispatcher. The component will invoke the bound method after it receives the delivered events. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Transforming IIL to Turing Plus Nontrivial local/global, global/local, coupled transformation II to Turing Plus Transformation The transformation is divided into four steps: Component transformation. Dispatcher transformation. System and environment setup. Re-ordering of the system body. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Transforming IIL to Turing Plus Component Transformation II to Turing Plus Transformation The transformation is divided into four steps: Component transformation. Dispatcher transformation. System and environment setup. Re-ordering of the system body. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Transforming IIL to Turing Plus Dispatcher Transformation SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Transforming IIL to Turing Plus System and Environment Setup SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Transforming IIL to Model We currently check properties written in LTL. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Transforming IIL to XML IL Two step TXL transformation from IIL to XML intermediate modelling language of Garlan & Khershonsky Step 1: Normalization of IIL to reorder, simplify and reduce semantics to meet constraints of XML intermediate language (in IIL syntax) Step 2: Syntactic translation of normalized simplified IIL to XML intermediate language To model check systems written in IIL we use the existing approach we previously presented in [2]. This approach is an extension of an II model checking system originally developed by Garlan and Khersonsky in [6, 7]. This approach focuses on the automatic analysis of II by representing an II system in an XML parameterized representation. Once the XML input has been created, a Java transformation tool converts the information into a set of finite state machines. This set of state machines can then be checked using the Cadence SMV model checker [14]. We currently check properties written in LTL. A major drawback to our model checking work presented in [2] was that it was not completely automatic since user interaction was required in developing the XML representation. The approach presented in this paper overcomes this deficiency and completely bridges the gap between artifacts by automating the process of generating finite state models for software systems written in IIL. 5.1. Transformation of IIL to XML Originally, due to the verbose nature of XML, IIL started out as a replacement to the XML intermediate language that would be easier to read and write. In addition to improving the syntax, IIL evolved into a special-purpose language that includes notational conveniences such as variable declarations in methods, the use of for loops and the use of switch statements. As with the transformation to Turing Plus, our transformation from IIL to XML is done using an automatic transformation tool written in TXL. The transformation from IIL to XML involves two steps. In the first step the notational conveniences of IIL are removed. For example, for loops are unrolled. The program is also reorganized to follow the program order required by the XML representation. After the first step the IIL program is a statement-by-statement match to the XML representation. The second step of the transformation involves the syntax translation from IIL to XML. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Transforming XML IL to Model SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Transforming XML IL to Model Use existing Java automatic transformation tool from XML IL to finite state machine model modified from Garlan & Khershonsky Resulting model then checked using Cadence SMV model checker to verify properties specified in original IIL program To model check systems written in IIL we use the existing approach we previously presented in [2]. This approach is an extension of an II model checking system originally developed by Garlan and Khersonsky in [6, 7]. This approach focuses on the automatic analysis of II by representing an II system in an XML parameterized representation. Once the XML input has been created, a Java transformation tool converts the information into a set of finite state machines. This set of state machines can then be checked using the Cadence SMV model checker [14]. We currently check properties written in LTL. A major drawback to our model checking work presented in [2] was that it was not completely automatic since user interaction was required in developing the XML representation. The approach presented in this paper overcomes this deficiency and completely bridges the gap between artifacts by automating the process of generating finite state models for software systems written in IIL. 5.1. Transformation of IIL to XML Originally, due to the verbose nature of XML, IIL started out as a replacement to the XML intermediate language that would be easier to read and write. In addition to improving the syntax, IIL evolved into a special-purpose language that includes notational conveniences such as variable declarations in methods, the use of for loops and the use of switch statements. As with the transformation to Turing Plus, our transformation from IIL to XML is done using an automatic transformation tool written in TXL. The transformation from IIL to XML involves two steps. In the first step the notational conveniences of IIL are removed. For example, for loops are unrolled. The program is also reorganized to follow the program order required by the XML representation. After the first step the IIL program is a statement-by-statement match to the XML representation. The second step of the transformation involves the syntax translation from IIL to XML. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Experiments Three “guinea pigs” Set-Counter, a standard toy example II system with sychronization constraints Active Badge Location System (ABLS), an II system for a realistic application with liveness constraints Unmanned Vehicle Control System (UVCS), a realistic simulated II system with safety constraints Turing Plus 3-5 times as big and Our evaluation of each example involved modeling the example in the IIL language and verifying that our transformation tools from IIL to Turing Plus and from IIL to XML worked correctly. Our evaluation of our automatic transformation tools also demonstrated that the semantics was well preserved during all of the transformations. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Results Systems executed and traced over hundreds of random test runs System properties verified as specified using Cadence SMV Demonstrated errors discovered independently using both testing and model checking Turing Plus 3-5 times as big and Our evaluation of each example involved modeling the example in the IIL language and verifying that our transformation tools from IIL to Turing Plus and from IIL to XML worked correctly. Our evaluation of our automatic transformation tools also demonstrated that the semantics was well preserved during all of the transformations. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Experiences with Source Transformation Verifiable - formal independent rewrite rules, pure first order functional application Efficient - max 3 seconds per program Effort - where did project time go? Not into source transformation: actual implementation of transformations smaller part of effort Turing Plus 3-5 times as big and Our evaluation of each example involved modeling the example in the IIL language and verifying that our transformation tools from IIL to Turing Plus and from IIL to XML worked correctly. Our evaluation of our automatic transformation tools also demonstrated that the semantics was well preserved during all of the transformations. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Experiences with Source Transformation Saved: Design and implementation of IIL compiler / interpreter Design and implementation of IIL concurrency kernel and simulation library Design and implementation of IIL modeller Did not save: Design and understanding time for language framework and concurrency model Turing Plus 3-5 times as big and Our evaluation of each example involved modeling the example in the IIL language and verifying that our transformation tools from IIL to Turing Plus and from IIL to XML worked correctly. Our evaluation of our automatic transformation tools also demonstrated that the semantics was well preserved during all of the transformations. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Conclusion Transformational framework for specifying, testing, and model checking II systems IIL language Automatic implementation and modelling by source transformation IIL to Turing Plus for execution and testing IIL to SMV model for model checking Test bed for studying relationship and synergies between testing and model checking Turing Plus 3-5 times as big and Our evaluation of each example involved modeling the example in the IIL language and verifying that our transformation tools from IIL to Turing Plus and from IIL to XML worked correctly. Our evaluation of our automatic transformation tools also demonstrated that the semantics was well preserved during all of the transformations. SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Hongyu Zhang, Jeremy S. Bradbury, James R. Cordy, Juergen Dingel Implementation and Verification of Implicit Invocation Systems Using Source Transformation Hongyu Zhang, Jeremy S. Bradbury, James R. Cordy, Juergen Dingel Software Technology Laboratory School of Computing, Queen’s University Kingston, Ontario, Canada SCAM 2005 SUPPORTED BY

Future Work: Testing vs Model Checking To what extent can parallel testing be used to increase confidence in model checking results and correctness of the model checker? How can testing be used to simplify or optimize model checking and vice-versa? Can we use similar transformation techniques to automatically derive run-time monitors for temporal safety properties? Can model checking be used to evaluate the coverage offered by the test suite? SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy

Future Work: Generalization of IIL IIL currently restricted to a subset of II systems Centralized event dispatcher with static bindings We would like to expand our framework to more general forms of II systems Dynamic bindings, multiple dispatchers, and additional concurrency models What other generalizations are interesting? SCAM 2005, Budapest, Sept 2005 © 2005 J. Bradbury & J.R. Cordy