CTL Model-checking for Systems with Unspecified Components Summer-1384 Hajar Niamehr Neda Noroozi.

Slides:



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

Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Automatic Verification Book: Chapter 6. How can we check the model? The model is a graph. The specification should refer the the graph representation.
Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
1 Verification of Parameterized Systems Reducing Model Checking of the Few to the One. E. Allen Emerson, Richard J. Trefler and Thomas Wahl Junaid Surve.
October 29, 2004SAVCBS04 Presented by: Gaoyan Xie CTL Model-checking for Systems with Unspecified Components Gaoyan Xie and Zhe Dang School of Electrical.
Overview Structural Testing Introduction – General Concepts
Metodi formali dello sviluppo software a.a.2013/2014 Prof.Anna Labella.
CS 267: Automated Verification Lecture 2: Linear vs. Branching time. Temporal Logics: CTL, CTL*. CTL model checking algorithm. Counter-example generation.
Algorithmic Software Verification VII. Computation tree logic and bisimulations.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Partial Order Reduction: Main Idea
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Vered Gafni – Formal Development of Real Time Systems 1 Statecharts Semantics.
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
UPPAAL Introduction Chien-Liang Chen.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
Timed Automata.
The Big Picture Chapter 3. We want to examine a given computational problem and see how difficult it is. Then we need to compare problems Problems appear.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Introduction to Computability Theory
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture # 11.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
Temporal Logic and Model Checking. Reactive Systems We often classify systems into two types: Transformational: functions from inputs available at the.
Review of the automata-theoretic approach to model-checking.
Data Flow Analysis Compiler Design Nov. 8, 2005.
Embedded Systems Laboratory Department of Computer and Information Science Linköping University Sweden Formal Verification and Model Checking Traian Pop.
Witness and Counterexample Li Tan Oct. 15, 2002.
Lesson 6. Refinement of the Operator Model This page describes formally how we refine Figure 2.5 into a more detailed model so that we can connect it.
Data Flow Analysis Compiler Design Nov. 8, 2005.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Model Checking Lecture 5. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
1 3rd of July 2009 CEA LIST Symbolic execution based model checking of open systems with unbounded variables Nicolas RAPIN CEA LIST.
Flavio Lerda 1 LTL Model Checking Flavio Lerda. 2 LTL Model Checking LTL –Subset of CTL* of the form: A f where f is a path formula LTL model checking.
15-820A 1 LTL to Büchi Automata Flavio Lerda A 2 LTL to Büchi Automata LTL Formulas Subset of CTL* –Distinct from CTL AFG p  LTL  f  CTL. f.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Dina Workshop Analysing Properties of Hybrid Systems Rafael Wisniewski Aalborg University.
On Reducing the Global State Graph for Verification of Distributed Computations Vijay K. Garg, Arindam Chakraborty Parallel and Distributed Systems Laboratory.
Lazy Annotation for Program Testing and Verification Speaker: Chen-Hsuan Adonis Lin Advisor: Jie-Hong Roland Jiang November 26,
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
System Testing Beyond unit testing. 2 System Testing Of the three levels of testing, system level testing is closest to everyday experience We evaluate.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Parallel Model Checking Game for CTL Lecture 6 – Lecturer: Orna Grumberg.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Impossibility of Distributed Consensus with One Faulty Process By, Michael J.Fischer Nancy A. Lynch Michael S.Paterson.
SAT-Based Model Checking Without Unrolling Aaron R. Bradley.
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 9, 2003.
1 Software Testing & Quality Assurance Lecture 13 Created by: Paulo Alencar Modified by: Frank Xu.
Quality Assurance in the Presence of Variability Kim Lauenroth, Andreas Metzger, Klaus Pohl Institute for Computer Science and Business Information Systems.
Finding Regular Simple Paths Sept. 2013Yangjun Chen ACS Finding Regular Simple Paths in Graph Databases Basic definitions Regular paths Regular simple.
Overview of Previous Lesson(s) Over View  A token is a pair consisting of a token name and an optional attribute value.  A pattern is a description.
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Fundamentals of Fault-Tolerant Distributed Computing In Asynchronous Environments Paper by Felix C. Gartner Graeme Coakley COEN 317 November 23, 2003.
A Review of Software Testing - P. David Coward
Software Testing.
Alternating tree Automata and Parity games
CSEP590 – Model Checking and Automated Verification
CSCI1600: Embedded and Real Time Software
Translating Linear Temporal Logic into Büchi Automata
Program correctness Model-checking CTL
Presentation transcript:

CTL Model-checking for Systems with Unspecified Components Summer-1384 Hajar Niamehr Neda Noroozi

Hajar Niamehr, Neda Noroozi2 Outline Introduction to component based systems Problem definition in unspecified component-based system verification  Testing options  Formal verification methods Model checking driven black-box testing  System model  Related procedures of verification  Examples

Hajar Niamehr, Neda Noroozi3 Introduction Component-based software development has gained great popularity in building large software systems  Advantages Reusing valuable software assets Reducing development costs Improving productivity  Disadvantages Serious challenges in quality assurance Prefabricated component could be a new source of system failures

Hajar Niamehr, Neda Noroozi4 Problem? how to ensure that a component functions correctly in the host system where the component is deployed?

Hajar Niamehr, Neda Noroozi5 Assurance of component functionality When integrating a component into a system, system developers could:  Trust the component provider’s claim and go ahead to use it  Extensively retest the component alone  Hook the component to the system and conduct integration testing Software components are generally built with multiple sets of functionality and testing all the functionality of a software component is  expensive  infeasible, considering the potentially huge state space of the component interface This option is not always applicable. Because, software components could be applied for dynamic upgrading or extending a running system that is costly or not supposed to shut down for retesting at all.

Hajar Niamehr, Neda Noroozi6 Formal verification techniques Testing-based strategies are not sufficient to solve the problem for critical systems.  We need formal methods like model- checking!

Hajar Niamehr, Neda Noroozi7 Formal verification techniques cont. Formal verification techniques not directly applicable  Design details  Source code of the component are not available to the developers of the host system.

Hajar Niamehr, Neda Noroozi8 Verification of systems with unspecified components A new approach: Model-checking driven black-box testing Advantages  Strong confidence about the reliability of the system  System developers can customize the testing with respect to specific system properties  Intermediate model-checking results can be reused to avoid integration testing

Hajar Niamehr, Neda Noroozi9 The system Model Consider system with only one unspecified component.  M: host system  X: an unspecified component Both M and X are finite-state transition systems communicating synchronously with each other via a finite set of input and output symbols.

Hajar Niamehr, Neda Noroozi10 System Model cont. X is defined as a deterministic Mealy machine whose internal structure is unknown. X is defined as a triple  : set of X’s input symbols  : set of X’s output symbols  m : an upper bound for the number of states in X ( the m is given) A run of X is a sequence of alternating input-output symbols, α 0 β 0 α 1 β 1 … such that, starting form the initial state s init.

Hajar Niamehr, Neda Noroozi11 System Model cont. The host system M is defined as 5- tuple  S: a finite set of state  Г: a finite set of events  R env ⊆ S ×Г ×S defines a set of environment transitions.  R comm ⊆ S × Σ× ∇ ×S defines a set of communication transitions.  I ⊆ S is M’s initial states.

Hajar Niamehr, Neda Noroozi12 System Model cont. An execution path of the system can be represented as a sequence ζ of states and symbols, s 0 c 0 s 1 c 1...  each s i ∈ S  each c i is either a symbol in Гor a pair α i β i. ζ satisfies the following requirements:  s 0 is an initial state of M;  for each c i ∈ Г, (s i, c i, s i+1 ) is an environment transition of M;  for each c i = α i β i, (s i, α i, β i, s i+1 ) is a communication transition of M.

Hajar Niamehr, Neda Noroozi13 System Model cont. The communication trace of ζ, denoted by ζ X, is the sequence obtained from ζ by retaining only symbols in Σ and ∇. For any given state s ∈ S, we say that the system Sys can reach s iff Sys has an execution path ζ on which s appears ζ X and X (if not empty) is also a run of X.

Hajar Niamehr, Neda Noroozi14 An example System

Hajar Niamehr, Neda Noroozi15 Model-checking driven black- box testing ‹ M,X › ╞ f holds, where f is a CTL formula specifying some requirement for system.  Model-checking procedure drives from the M and f a condition P over the component X.  The system satisfies f iff P is satisfied by X.  Condition P over component X is checked through adequate black-box testing.  Condition P is in the form of communication graph, called witness graph

Hajar Niamehr, Neda Noroozi16 Ideas For each subformula h in the form of EX g, E[g 1 Ug 2 ] or EG g, the witness graph (WG) is constructed.  :Represents exactly all the path that witness h is true at some state.  If K is the total number of the CTL operators in f, the algorithm construct k WG (from 2 to k+1, 1 is reserved for true).  : denotes the ID number of h’s WG If h is in the form of ¬ or V, the state which holds h is labeled as follows:  ID := 1 | 2 | … | k+1  Ψ := ID | ¬ Ψ | Ψ V Ψ Ψ is set of all the ID expressions.  L h : S  Ψ: labeling function to record the ID expression of each state for each subformula h.

Hajar Niamehr, Neda Noroozi17 The Algorithm for solving CTL Problem.

Hajar Niamehr, Neda Noroozi18 Processing the CTL Formula

Hajar Niamehr, Neda Noroozi19 Processing the CTL Formula – HandleUnion and HandleNegation HandleUnion  If state s is in both Lg 1 ’s and Lg 2 ’s domain, L h labels s with 1 if either Lg 1 or Lg 2 labels s with 1 and label s with ID expression Lg 1 (s) ∨ Lg 2 (s) otherwise;  If state s is in Lg 1 ’s domain but not in Lg 2 ’s domain, let L label s with Lg 1 (s). HandleNegation  If state s is not in the domain of Lg, let L h label s with 1;  If state s is in the domain of Lg but not labeled with 1 by Lg, L h labels s with ID expression ¬Lg(s).

Hajar Niamehr, Neda Noroozi20 Processing the CTL Formula- HandlingEX If state s has a successor s′ in the domain of L g  if s′ is reachable through an environment transition and s′ is labeled with 1 by L g then L h also labels s with 1  otherwise L h labels s with the current value of the global variable id. The witness graph of EX g is created as triple:  N is a set of nodes and E is a set of annotated edges.

Hajar Niamehr, Neda Noroozi21 Processing the CTL Formula- HandlingEX cont. The witness graph is created as follows:  Add one node to N for each state that is in the domain of Lg.  Add one node to N for each state that has a successor in the domain of Lg.  Add one edge between two nodes in N to E when M has a transition between two states; if the transition involves a communication with X then annotate the edge with the communication symbols.  Increase the global variable ID by 1 (since one new witness graph has been created).

Hajar Niamehr, Neda Noroozi22 Processing the CTL Formula- HandlingEU Labeling function is constructed recursively  Fist, L h labels state s in the domain of Lg 2 with Lg 2 (s).  Second, if state s has a successor s′ in the domain of L h if both s and s′ is labeled with 1 by Lg 1 and L h respectively and s can reach s′ through an environment transition then L h also labels s with 1 otherwise L h labels s with the current value of the global variable id. Notice that, in the second step, if a state s can be labeled with both 1 and the current value of id, let L h label s with 1.

Hajar Niamehr, Neda Noroozi23 Processing the CTL Formula- HandlingEU cont. The witness graph is created as a 4- tuple,  N is a set of nodes and constructed by adding one node for each state that is in the domain of L h  E is a set of edges and constructed in the same way as that of HandleEX.  At last the global variable id is increased by 1.

Hajar Niamehr, Neda Noroozi24 Processing the CTL Formula- HandlingEG The labeling function L h is constructed :  state s that can reach a loop C through a path p such that every state (including s) on p and C is in the domain of Lg, If every state (including s) on p and C is labeled with 1 by Lg And if no communications are involved on the path and the loop then L h also labels s with 1  otherwise L h labels s with the current value of the global variable id. The witness graph is created as triple,  The graph is constructed in a same way as that of HandleEU.

Hajar Niamehr, Neda Noroozi25 Testing a Witness Graph The algorithm CheckCTL  gives a definite “yes” or “no” answer  or reduces the problem to check whether the ID expression Ψ labeled to s 0 can be evaluated true at the state. The evaluation procedure is carried out by the following recursive procedure TestWG, after an input sequence π has been accepted by the component X.

Hajar Niamehr, Neda Noroozi26 Testing a Witness Graph- TestEX For checking whether an EX witness graph G can be evaluated true at a state s 0 :  test whether the system M can reach from s 0 to another state s′ ∈ dom(Lg) through a transition in G such that the ID expression Lg(s′) can be evaluated true at s′.

Hajar Niamehr, Neda Noroozi27 Testing a Witness Graph- TestEU For checking whether an EU witness graph G can be evaluated true at a state s0:  traverse all paths p in G with length less than mn m is an upper bound for the number of states in the unspecified component X n is the maximal number of communications on all simple paths between s0 and s′  test the unspecified component X to see whether the system can reach some state s′ ∈ dom(Lg 2 ) through one of those paths.  In the meantime, it should also check whether Lg 2 (s′) can be evaluated true at s′ and whether Lg 1 (s i ) can be evaluated true at s i for each s i on p (excluding s′) by calling TestWG.

Hajar Niamehr, Neda Noroozi28 Testing a Witness Graph- TestEG For checking whether an EG witness graph G can be evaluated true at a state s0, it is sufficient to find an infinite path in G along which the system can run forever. Procedure TestEG  first decomposes G into a set of SCCs.  Then, for each state s f in the SCCs, it calls another procedure SubTestEG to test whether the system can reach s f from s 0 along a path not longer than mn, as well as whether the system can further reach s f from s f for m−1 times.

Hajar Niamehr, Neda Noroozi29 Example Ξ The EG witness graph:

Hajar Niamehr, Neda Noroozi30 References 1. G. Xie, Z. Dang, CTL Model-checking for Systems with Unspecified Components, 3rd Workshop on Specification and Verification of Component-based Systems at ACM SIGSOFT, California, October 31-November 1, G. Xie, Decompositional Verification of Component-based System- A Hybrid Approach,19th IEEE International Conference on Automated Software Engineering (ASE'04 Doctoral Symposium), Linz, Austria, pp , September 20, D. Hung, D. Vu Anh, Model Checking Component Based Systems with Black-box Testing, International Institute for software technology, October D. Hung, D. Vu Anh, Model Checking Real-time Component Based Systems With Black-box Testing, N. Aguirre, T. Maibaum, Hierarchical Temporal Speci¯cations of Dynamically Recon¯gurable Component Based Systems, FESA G. Xie, Z. Dang, Model checking Driven Blackbox Testing Algorithms for Systems with Unspecified Components, 2004