Open Incremental Model Checking (OIMC) and the Role of Contracts Model-Based Programming and Verification.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
1 Chapter 4 - Part 1 Software Processes. 2 Software Processes is: Coherent (logically connected) sets of activities for specifying, designing, implementing,
Software Processes Coherent sets of activities for specifying, designing, implementing and testing software systems.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
May 11, ACL2 Panel: What is the Future of Theorem Proving? Arvind Computer Science & Artificial Intelligence Laboratory.
Chapter 6: Design of Expert Systems
Automated Analysis and Code Generation for Domain-Specific Models George Edwards Center for Systems and Software Engineering University of Southern California.
CBSD – Component Based Software Development - Introduction -
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 1 Slide 1 An Introduction to Software Engineering.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
Testing Components in the Context of a System CMSC 737 Fall 2006 Sharath Srinivas.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen-Bolzano Lesson 1 – Component-Based.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Real-Time System Requirements & Design Specs Shaw - Chapters 3 & 4 Homework #2: 3.3.1, 3.4.1, Add Error states to Fig 4.1 Lecture 4/17.
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
20 February Detailed Design Implementation. Software Engineering Elaborated Steps Concept Requirements Architecture Design Implementation Unit test Integration.
[ §4 : 1 ] 4. Requirements Processes II Overview 4.1Fundamentals 4.2Elicitation 4.3Specification 4.4Verification 4.5Validation Software Requirements Specification.
COMPONENT-BASED SOFTWARE ENGINEERING
What is Concurrent Programming? Maram Bani Younes.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Chapter 5CSA 217 Design in Construction Chapter 5 1.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software Processes.
The Program Development Cycle
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Formalizing the Asynchronous Evolution of Architecture Patterns Workshop on Self-Organizing Software Architectures (SOAR’09) September 14 th 2009 – Cambrige.
Testing -- Part II. Testing The role of testing is to: w Locate errors that can then be fixed to produce a more reliable product w Design tests that systematically.
Institute e-Austria in Timisoara 1 Author: prep. eng. Calin Jebelean Verification of Communication Protocols using SDL ( )
Component Technology. Challenges Facing the Software Industry Today’s applications are large & complex – time consuming to develop, difficult and costly.
FORMAL VERIFICATION OF ADVANCED SYNTHESIS OPTIMIZATIONS Anant Kumar Jain Pradish Mathews Mike Mahar.
On Reducing the Global State Graph for Verification of Distributed Computations Vijay K. Garg, Arindam Chakraborty Parallel and Distributed Systems Laboratory.
A Static Approach to Consistency Verification of UML Models Andrea Baruzzo Department of Computer Science University of Udine MoDeV.
Chapter 10 Analysis and Design Discipline. 2 Purpose The purpose is to translate the requirements into a specification that describes how to implement.
Basic Concepts of Component- Based Software Development (CBSD) Model-Based Programming and Verification.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
© 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.
UniTesK Test Suite Architecture Igor Bourdonov Alexander Kossatchev Victor Kuliamin Alexander Petrenko.
SEG 4110 – Advanced Software Design and Reengineering Topic T Introduction to Refactoring.
Using Symbolic PathFinder at NASA Corina Pãsãreanu Carnegie Mellon/NASA Ames.
CS223: Software Engineering Lecture 2: Introduction to Software Engineering.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
Properties as Processes : FORTE slide Properties as Processes: their Specification and Verification Joel Kelso and George Milne School of Computer.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 15. Review Interaction-Oriented Software Architectures – MVC.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
1 Here are some quotations to get an overview of the kinds of issues of interest.
Quality Assurance in the Presence of Variability Kim Lauenroth, Andreas Metzger, Klaus Pohl Institute for Computer Science and Business Information Systems.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Verifying Component Substitutability Nishant Sinha Sagar Chaki Edmund Clarke Natasha Sharygina Carnegie Mellon University.
Chapter 10 Software quality. This chapter discusses n Some important properties we want our system to have, specifically correctness and maintainability.
Systems Development Life Cycle
CS 310 Ch 4: Software Processes Software process: a set of activities that lead to a software system specification design and implementation validation.
Chapter3:Software Processes
Separation of Concerns in the Design of Distributed Systems
The Development Process of Web Applications
Complexity Time: 2 Hours.
Software Processes (a)
Software Design Methodology
Model-Driven Analysis Frameworks for Embedded Systems
Logical architecture refinement
Programming Languages 2nd edition Tucker and Noonan
Chapter 10 – Software Testing
CS310 Software Engineering Lecturer Dr.Doaa Sami
Transaction Level Modeling: An Overview
Programming Languages 2nd edition Tucker and Noonan
Presentation transcript:

Open Incremental Model Checking (OIMC) and the Role of Contracts Model-Based Programming and Verification

Motivation  Component Based Software Development (CBSD) is considered to revolutionize software technology.  CBSD builds around two concepts: reuse and evolution.  In short, it is possible – in theory – to develop software systems faster and reduce the costs of maintenance (e.g. modifying or replacing specific parts of the software without affecting the rest of the system).

Verified components  Growing dependency of people on the proper functioning of computer systems demands new methods to increase the reliability and correctness of these systems.  Well-known methods of verification: testing, synthesis, correctness proof and model checking.  Only testing and model checking is currently used in practice considering commercial application development.

Drawbacks  Testing of component-based systems can be extremely complicated because it is usually not possible for system architects to pre-check the compatibility of the individual parts before the actual integration takes place.  The environment of the development and the deployment are rarely the same if prefabricated components also referred to as Components Off- The-Shelf (COTS) are used.  The use of these components may also differ considerably from the original purpose they were developed for.

Contract-based testing  A possible solution to this problem is based on the idea of building correct programs in which reliability is built-in.  This means the correctness properties of a program may be transferable or at least checkable in other environments as well. The concept behind that is the method of “design-by-contract”.  But after testing the components separately an integration testing of the assembled application is still needed.

Model checking  Testing methods generally do not guarantee that no hidden errors remain in a system, so the attention of researchers has turned towards formal methods.  Model checking is an automatic technique for verifying finite state concurrent systems.  Main challenge in model checking is dealing with the state space explosion problem occurring in systems with many components that can make transitions in parallel.

Sample component  In our example we designed an automatic betting machine to “TippMix”, the Hungarian version of “Bet and Win”. The only input needed for the betting machine is the number of events a person wants to bet on and produces a ticket that is bound to the rules of the game with a combination of bets.  The simplified functioning of the automatic betting machine can be seen in the next slide.

Automatic Betting Machine

Behavioral specification Initial State and PreconditionTransitionFinal State and Postcondition Idle and Enter not PressedWaitingIdle and Display(0) Idle and Enter not PressedEnter_Num(Num)Idle and Display(0) Idle and Enter_Num(0)Press EnterIdle and Display(0) Idle and Enter_Num(Num)Press EnterChecking Num and Display(Num) Checking_Num and 1<=Num<3 Working and Display(Num) and Max=50 Checking_Num and 3<Num<=5 Working and Display(Num) and Max=150 Checking_Num and 5<Num<=14 Working and Display(Num) and Max=200 Checking_Num and Num>14ErrorIdle and Display(0) Working and Num=1Generate Tips and Print Ticket Idle and Event_Num <=50 and Tip in ("Home","Draw","Guest") Working and Num>1Generate Tips and Print Ticket Idle and all Event_Num i in (1..Max) Where i=1..Num and Event_Num i <> Event_Num j Where i <> j and Tip in ("Home","Draw","Guest")

Open Incremental Model Checking (OIMC)  OIMC addresses the changes to a system instead of re-checking the entire system model including the new extensions.  The model checking is executed in an incremental manner within the extension component only.  The conditions (inter-component constraints) resemble to pre- and post-conditions in “design- by-contract”.

Scalability of OIMC *  General case: the n-th version of the component (C n ) during software evolution as a structure of components B, E 1, E 2, …, E n where E i is the refining component to the (i-1)-th evolved version (C (i-1) ), i=1,n. The initial version is C 0 =B and C i =C i-1 +E i.  Theorem: If all respective pairs of base (C (i-1) ) and refining (E i ) components conform, the complexity of OIMC to verify the consistency between E n and B is independent from the n-th version C n, i.e. it only executes within E n. *Source: Thang, N. T., Katayama, T.: “Specification and verification of inter-component constraints in CTL” in Proceedings of the 2005 conference on Specification and verification of component-based systems, Vol. 31, Issue 2, pp. 1-8, published by ACM Press.

Extending the sample component  The automatic betting machine – if necessary – may be extended with multiple terminal consoles.  In this case the betting component remains unchanged (properties must be preserved), though the mutual exclusion and liveliness properties of the system must be guaranteed additionally.  The betting component may also be transformed into a lottery component if – for instance – the number of events is 5 and the range of events is between 1 and 90 and the bet itself is ignorable.

Extending the system

Future work  Circular dependency between interface states of the base and the extension cannot be handled by OIMC.  There are existing software products able to extract contracts from the source code of an application. A tool should be developed that is able to transform these contracts to CTL temporal constraints for model checking (especially OIMC).  An educational framework with a library of verified components needs to be created for providing an environment for IT students to practice design decisions.

Conclusions  This research can result in the better use of formal methods in practical applications, the better understanding of specifications, and finally less debugging work for developers who could easily misinterpret specifications.  Ultimate goal: integration testing becomes unnecessary for large and complex systems in the case of replaced or modified components.  Third-party components formally verified by model checking techniques become more reliable and trustable.