Verifying Component Substitutability Nishant Sinha Sagar Chaki Edmund Clarke Natasha Sharygina Carnegie Mellon University.

Slides:



Advertisements
Similar presentations
Abstraction in Model Checking Nishant Sinha. Model Checking Given a: –Finite transition system M –A temporal property p The model checking problem: –Does.
Advertisements

October 29, 2004SAVCBS04 Presented by: Gaoyan Xie CTL Model-checking for Systems with Unspecified Components Gaoyan Xie and Zhe Dang School of Electrical.
An Abstract Interpretation Framework for Refactoring P. Cousot, NYU, ENS, CNRS, INRIA R. Cousot, ENS, CNRS, INRIA F. Logozzo, M. Barnett, Microsoft Research.
Translation-Based Compositional Reasoning for Software Systems Fei Xie and James C. Browne Robert P. Kurshan Cadence Design Systems.
© 2006 Carnegie Mellon University Combining Predicate and Numeric Abstraction for Software Model Checking Software Engineering Institute Carnegie Mellon.
Verification of Evolving Software Natasha Sharygina Joint work with Sagar Chaki and Nishant Sinha Carnegie Mellon University.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
© Anvesh Komuravelli Spacer Automatic Abstraction in SMT-Based Unbounded Software Model Checking Anvesh Komuravelli Carnegie Mellon University Joint work.
Model Checker In-The-Loop Flavio Lerda, Edmund M. Clarke Computer Science Department Jim Kapinski, Bruce H. Krogh Electrical & Computer Engineering MURI.
Efficient Reachability Analysis for Verification of Asynchronous Systems Nishant Sinha.
SYMBOLIC MODEL CHECKING: STATES AND BEYOND J.R. Burch E.M. Clarke K.L. McMillan D. L. Dill L. J. Hwang Presented by Rehana Begam.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
Automated assume-guarantee reasoning for component verification Dimitra Giannakopoulou (RIACS), Corina Păsăreanu (Kestrel) Automated Software Engineering.
Software Verification via Refinement Checking Sagar Chaki, Edmund Clarke, Alex Groce, CMU Somesh Jha, Wisconsin.
A … Framework for Verifying Concurrent C Programs Sagar Chaki Thesis Defense Talk.
1 Model Checking, Abstraction- Refinement, and Their Implementation Based on slides by: Orna Grumberg Presented by: Yael Meller June 2008.
1 Learning Assumptions for Compositional Verification J. M. Cobleigh, D. Giannakopoulou and C. S. Pasareanu Presented by: Sharon Shoham.
State-Event Software Verification for Branching-Time Specifications Sagar Chaki, Ed Clarke, Joel Ouaknine, Orna Grumberg Natasha Sharygina, Tayssir Touili,
Synergy: A New Algorithm for Property Checking
1 Predicate Abstraction of ANSI-C Programs using SAT Edmund Clarke Daniel Kroening Natalia Sharygina Karen Yorav (modified by Zaher Andraus for presentation.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
Developing Verifiable Concurrent Software Tevfik Bultan Department of Computer Science University of California, Santa Barbara
What Went Wrong? Alex Groce Carnegie Mellon University Willem Visser NASA Ames Research Center.
Predicate Abstraction for Software and Hardware Verification Himanshu Jain Model checking seminar April 22, 2005.
Finite State Verification for Software Systems Lori A. Clarke University of Massachusetts Laboratory for Advanced Software Engineering Research
© 2007 Carnegie Mellon University Optimized L*-based Assume-Guarantee Reasoning Sagar Chaki, Ofer Strichman March 27, 2007.
Computing Over­Approximations with Bounded Model Checking Daniel Kroening ETH Zürich.
Word Level Predicate Abstraction and Refinement for Verifying RTL Verilog Himanshu Jain Daniel Kroening Natasha Sharygina Edmund Clarke Carnegie Mellon.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Compositional Verification of Evolving Component-based Systems Nishant Sinha ECE, CMU PhD Proposal Presentation.
Formal Verification of SpecC Programs using Predicate Abstraction Himanshu Jain Daniel Kroening Edmund Clarke Carnegie Mellon University.
Model Checking for Embedded Systems Edmund Clarke, CMU High-Confidence Embedded Systems Workshop, May 1 st.
Thread-modular Abstraction Refinement Thomas A. Henzinger, et al. CAV 2003 Seonggun Kim KAIST CS750b.
Grand Challenge Problem: Model Check Concurrent Software Edmund M. Clarke Department of Computer Science Carnegie Mellon University.
Verifying Concurrent Message- Passing C Programs with Recursive Calls Sagar Chaki, Edmund Clarke, Nicholas Kidd, Thomas Reps, and Tayssir Touili.
Learning Based Assume-Guarantee Reasoning Corina Păsăreanu Perot Systems Government Services, NASA Ames Research Center Joint work with: Dimitra Giannakopoulou.
Lifecycle Verification of the NASA Ames K9 Rover Executive Dimitra Giannakopoulou Mike Lowry Corina Păsăreanu Rich Washington.
Argumentation and Trust: Issues and New Challenges Jamal Bentahar Concordia University (Montreal, Canada) University of Namur, Belgium, June 26, 2007.
Automatic Assumption Generation for Compositional Verification Dimitra Giannakopoulou (RIACS), Corina Păsăreanu (Kestrel) Automated Software Engineering.
Dynamic Component Substitutability Analysis Edmund Clarke Natasha Sharygina* Nishant Sinha Carnegie Mellon University The University of Lugano.
Predicate Abstraction of ANSI-C Programs Using SAT By Edmund Clarke, Daniel Kroening, Natalia Sharygina, Karen Yorav Presented by Yunho Kim Provable Software.
Lazy Abstraction Jinseong Jeon ARCS, KAIST CS750b, KAIST2/26 References Lazy Abstraction –Thomas A. Henzinger et al., POPL ’02 Software verification.
Lyra – A service-oriented and component-based method for the development of communicating systems (by Sari Leppänen, Nokia/NRC) Traditionally, the design,
Submodule construction in logics 1 Gregor v. Bochmann, University of Ottawa Using First-Order Logic to Reason about Submodule Construction Gregor v. Bochmann.
Symbolic Execution with Abstract Subsumption Checking Saswat Anand College of Computing, Georgia Institute of Technology Corina Păsăreanu QSS, NASA Ames.
Towards a Compositional SPIN Corina Păsăreanu QSS, NASA Ames Research Center Dimitra Giannakopoulou RIACS/USRA, NASA Ames Research Center.
1 Predicate Abstraction and Refinement for Verifying Hardware Designs Himanshu Jain Joint work with Daniel Kroening, Natasha Sharygina, Edmund M. Clarke.
Learning Symbolic Interfaces of Software Components Zvonimir Rakamarić.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
11 Counter-Example Based Predicate Discovery in Predicate Abstraction Satyaki Das and David L. Dill Computer Systems Lab Stanford University
Open Incremental Model Checking (OIMC) and the Role of Contracts Model-Based Programming and Verification.
Compositionality Entails Sequentializability Pranav Garg, P. Madhusudan University of Illinois at Urbana-Champaign.
Learning Universally Quantified Invariants of Linear Data Structures Pranav Garg 1, Christof Loding, 2 P. Madhusudan 1 and Daniel Neider 2 1 University.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
/ PSWLAB Thread Modular Model Checking by Cormac Flanagan and Shaz Qadeer (published in Spin’03) Hong,Shin Thread Modular Model.
CHARME’03 Predicate abstraction with Minimum Predicates Sagar Chaki*, Ed Clarke*, Alex Groce*, Ofer Strichman** * Carnegie Mellon University ** Technion.
3-Valued Abstraction and 3-Valued Model-Checking.
Compositional Verification for System-on-Chip Designs SRC Student Symposium Paper 16.5 Nishant Sinha Edmund Clarke Carnegie Mellon University.
Compositional Verification part II Dimitra Giannakopoulou and Corina Păsăreanu CMU / NASA Ames Research Center.
Symbolic Model Checking of Software Nishant Sinha with Edmund Clarke, Flavio Lerda, Michael Theobald Carnegie Mellon University.
A Framework for Automated and Composable Testing of Component-based Services Miguel A. Jiménez, Ángela Villota, Norha M. Villegas, Gabriel Tamura, Laurence.
© Anvesh Komuravelli Spacer Model Checking with Proofs and Counterexamples Anvesh Komuravelli Carnegie Mellon University Joint work with Arie Gurfinkel,
Presentation Title 2/4/2018 Software Verification using Predicate Abstraction and Iterative Refinement: Part Bug Catching: Automated Program Verification.
Formal methods: Lecture
Designing Software for Ease of Extension and Contraction
Propositional Calculus: Boolean Algebra and Simplification
Property Directed Reachability with Word-Level Abstraction
High-Level Abstraction of Concurrent Finite Automata
Over-Approximating Boolean Programs with Unbounded Thread Creation
Presentation transcript:

Verifying Component Substitutability Nishant Sinha Sagar Chaki Edmund Clarke Natasha Sharygina Carnegie Mellon University

Substitutability Check Assembly A Component C Component C’ P ?

Motivation Component-based Software –Software modules shipped by separate developers –Undergo several updates/bug-fixes during their lifecycle Component assembly verification –Necessary on upgrade of any component –High costs of complete global verification –Instead check for substitutability of new component

Substitutability Check Local check –Only for upgraded components –Reuses previous verification results Two phases: –Containment check All interface behaviors of the previous component contained in new one –Compatibility check Safety with respect to other components in assembly: all global specifications still hold

Containment, Compatibility Component C Containment Check Compatibility Check Identical Behaviors New Behaviors Lost Behaviors Upgraded Component C’

Substitutability Check Formulation –Obtain a finite interface behavioral model of all components by abstraction: labeled kripke structures –Containment: Use under- and over- approximations –Compatibility: Use dynamic assume-guarantee reasoning

Predicate Abstraction into LKS Labeled Kripke Structures – Composition semantics –Synchronize on shared actions Represents abstractions State-event traces – p !q q    !p

Predicate Abstraction into LKS L1 lock = 0 if (x < y) lock=1 x < y if (x >= y) lock = 0 x < y if (x < y) x >= y lock=1 void OSSemPend(…) { L1: lock = 1; if (x < y) { L2: lock = 0; … } if (x >= y) { … L3: lock = 0; … } else { … } L2  if (x >= y) x >= y   L3 

Component Assembly A set of communicating concurrent C programs –No recursion, procedures inlined Each component abstracted into a Component LKS –Communication between components is abstracted into interface actions C1C1 C2C2 C3C3 M1M1 M2M2 M3M3 Component Assembly C Abstraction M Predicate Abstraction

Containment Check Goal: Check C µ C’ –All behaviors retained after upgrade –Cannot check directly: need approximations Idea: Use both under- and over- approximations Solution –Compute M: C µ M –Compute M’: M’ µ C’ –Check for M µ M’ C Containment Check Identical NewLost C’

Containment (contd.) CC’ M M’ over-approxunder-approx µ ? True C µ C’ False, CE CE 2 C ? False, Refine M CE 2 C’ ? True, Refine M’ C * C’, CE provided False True M C C’ M’

Containment (contd.) Computing over-approximation –Conventional predicate abstraction Computing under-approximation –Modified predicate abstraction –Compute Must transitions instead of May

Compatibility Check C Identical NewLost C’ Assume-guarantee to verify assembly properties –Related: Cobleigh et. al. at NASA Ames Reuse previous verification results Use learning algorithm for regular languages, L* Automatically generate assumption A M 1 || A ² P M 2 ² A M 1 || M 2 ² P AG-NonCircular

L* learner Learning Regular languages: L* Proposed by D. Angluin, improved by Rivest et al. –Learning regular sets from queries and counterexamples, Information and Computation, 75(2), Polynomial in the number of states and length of counterexample Minimally adequate Teacher IsMember( trace  ) IsCandidate( DFA D ) a b a b Unknown Regular Language ±Counterexample/ Yes Modelchecker Yes/No Minimum DFA

Learning for Verification Model checker as a Teacher –Possesses information about concrete components –Model checks and returns true/counterexample Learner builds a model sufficient to verify properties Relies on both learner and teacher being efficient Finding wide applications –Adaptive Model Checking: Groce et al. –Automated Assume-Guarantee Reasoning: Cobleigh et al. –Synthesize Interface Specifications for Java Programs: Alur et al. –Regular Model Checking: Vardhan et al., Habermehl et al.

Compatibility Check R 1 : M 1 || A ² P R 2 : M 2 ² A true L* Assumption Generation A CE CE Analysis Actual CE M 1 || M 2 2 P -CE for A +CE for A Teacher M 1 || M 2 ² P true

Handling Multiple Components AG-NC is recursive –(Cobleigh et al.) R 1 : M 1 || A ² P R 2 : M 2 ² A M 1 || M 2 ² P M 1 k A 1 ² P M 2 k A 2 ² A 1 M 3 ² A 2 M 2 k M 3 ² A 1 M 1 k M 2 k M 3 ² P Each A i computed by a separate L* instantiation

Compatibility of Upgrades Dynamic AG: Reuse previous verification results Can we reuse previous assumptions directly? –NO: upgrades may change the unknown U to be learned Requires Dynamic L* –Unknown language U changes to U’ –Goal: Continue learning from previous model A –Central Idea: Re-validate A to A’ which agrees with U’ C Identical NewLost C’

Dynamic L* L* maintains a table data-structure to store samples Definition: Valid Tables –All table entries agree with U Theorem –L* terminates with any valid observation table When U changes to U’, –Suppose the last candidate w.r.t. U is A –Re-validate OT of A w.r.t. U’ –Obtain A’ from OT –Continue learning from A’

Implementation MAGIC framework (now part of ComFoRT) –Compatibility phase with Dynamic AG Industrial benchmark –Inter-process Communication (IPC) software –4 main components – CriticalSection, IPCQueue, ReadMQ, WriteMQ Evaluated on single and simultaneous upgrades – WriteMQ and IPCQueue components Properties –P 1 : Write after obtaining CS lock –P 2 : Correct protocol to write to IPCQueue

Experimental Results Upgrade# (Property) #Mem QueriesT orig (msec)T ug (msec) Ipc 1 (P 1 ) Ipc 1 (P 2 ) Ipc 2 (P 1 ) Ipc 2 (P 2 ) Ipc 3 (P 1 ) Ipc 3 (P 2 ) Ipc 4 (P 1 )

MAGIC Schema Verification Yes System OK Abstraction Model Counterexample Valid? System Abstraction Guidance Yes No Counterexample Abstraction Refinement Improved Abstraction Guidance No Spurious Counterexample Assume-Guarantee Reasoning

Conclusion Automated Substitutability Checking –Containment and Compatibility –Reuses previous verification results –Handles multiple upgrades –Built upon CEGAR framework Implementation –MAGIC/ComFoRT framework –Promising results on an industrial example

Ongoing Work Assume-Guarantee for Liveness Other AG Rules, e.g., Circular Containment Check –Compare any two similar programs