Model Checking of Concurrent Software: Current Projects Thomas Reps University of Wisconsin.

Slides:



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

Partial Order Reduction: Main Idea
Program Analysis and Verification
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
1 Model checking. 2 And now... the system How do we model a reactive system with an automaton ? It is convenient to model systems with Transition systems.
Verification of Evolving Software Natasha Sharygina Joint work with Sagar Chaki and Nishant Sinha Carnegie Mellon University.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
3-Valued Logic Analyzer (TVP) Tal Lev-Ami and Mooly Sagiv.
1 Mooly Sagiv and Greta Yorsh School of Computer Science Tel-Aviv University Modern Compiler Design.
Introduction to Embedded Systems Chapter 14 Reachability Analysis (14.1, – ) Hao Zheng U of South Florida.
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
Review of topics Final exam : -May 2nd to May 7 th - Projects due on May 7th.
1 Lecture 08(a) – Shape Analysis – continued Lecture 08(b) – Typestate Verification Lecture 08(c) – Predicate Abstraction Eran Yahav.
Inferring Synchronization under Limited Observability Martin Vechev Eran Yahav Greta Yorsh IBM T.J. Watson Research Center.
Static Program Analysis via Three-Valued Logic Thomas Reps University of Wisconsin Joint work with M. Sagiv (Tel Aviv) and R. Wilhelm (U. Saarlandes)
Local Heap Shape Analysis Noam Rinetzky Tel Aviv University Joint work with Jörg Bauer Universität des Saarlandes Thomas Reps University of Wisconsin Mooly.
Abstractions. Outline Informal intuition Why do we need abstraction? What is an abstraction and what is not an abstraction A framework for abstractions.
Establishing Local Temporal Heap Safety Properties with Applications to Compile-Time Memory Management Ran Shaham Eran Yahav Elliot Kolodner Mooly Sagiv.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
1 Verifying Temporal Heap Properties Specified via Evolution Logic Eran Yahav, Tom Reps, Mooly Sagiv and Reinhard Wilhelm
1 Eran Yahav and Mooly Sagiv School of Computer Science Tel-Aviv University Verifying Safety Properties.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
1 Shape Analysis via 3-Valued Logic Mooly Sagiv Tel Aviv University Shape analysis with applications Chapter 4.6
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Comparison Under Abstraction for Verifying Linearizability Daphna Amit Noam Rinetzky Mooly Sagiv Tom RepsEran Yahav Tel Aviv UniversityUniversity of Wisconsin.
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
A Semantics for Procedure Local Heaps and its Abstractions Noam Rinetzky Tel Aviv University Jörg Bauer Universität des Saarlandes Thomas Reps University.
Static Program Analysis via Three-Valued Logic Thomas Reps University of Wisconsin Joint work with M. Sagiv (Tel Aviv) and R. Wilhelm (U. Saarlandes)
Thread-modular Abstraction Refinement Thomas A. Henzinger, et al. CAV 2003 Seonggun Kim KAIST CS750b.
Dagstuhl Seminar "Applied Deductive Verification" November Symbolically Computing Most-Precise Abstract Operations for Shape.
Program Analysis and Verification Noam Rinetzky Lecture 10: Shape Analysis 1 Slides credit: Roman Manevich, Mooly Sagiv, Eran Yahav.
Boolean Algebra – the ‘Lingua Franca’ of the Digital World The goal of developing an automata is based on the following (loosely described) ‘ideal’: if.
Applied Discrete Mathematics Week 13: Boolean Algebra
TVLA: A system for inferring Quantified Invariants Tal Lev-Ami Tom Reps Mooly Sagiv Reinhard Wilhelm Greta Yorsh.
1 Employing decision procedures for automatic analysis and verification of heap-manipulating programs Greta Yorsh under the supervision of Mooly Sagiv.
The Generic Gaming Engine Andrew Burke Advisor: Prof. Aaron Cass Abstract Games have long been a source of fascination. Their inherent complexity has challenged.
Shape Analysis Overview presented by Greta Yorsh.
CS6133 Software Specification and Verification
Shape Analysis via 3-Valued Logic Mooly Sagiv Thomas Reps Reinhard Wilhelm
Inferring Synchronization under Limited Observability Martin Vechev, Eran Yahav, Greta Yorsh IBM T.J. Watson Research Center (work in progress)
Symbolically Computing Most-Precise Abstract Operations for Shape Analysis Greta Yorsh Thomas Reps Mooly Sagiv Tel Aviv University University of Wisconsin.
The Power of Abstraction Barbara Liskov November 2009.
Model construction and verification for dynamic programming languages Radu Iosif
Symbolic Execution with Abstract Subsumption Checking Saswat Anand College of Computing, Georgia Institute of Technology Corina Păsăreanu QSS, NASA Ames.
1 CSEP590 – Model Checking and Automated Verification Lecture outline for August 6, 2003.
1 Shape Analysis via 3-Valued Logic Mooly Sagiv Tel Aviv University Shape analysis with applications Chapter 4.6
Data Structures and Algorithms for Efficient Shape Analysis by Roman Manevich Prepared under the supervision of Dr. Shmuel (Mooly) Sagiv.
SAT-Based Model Checking Without Unrolling Aaron R. Bradley.
1 Program Analysis via 3-Valued Logic Mooly Sagiv, Tal Lev-Ami, Roman Manevich Tel Aviv University Thomas Reps, University of Wisconsin, Madison Reinhard.
Program Analysis via 3-Valued Logic Thomas Reps University of Wisconsin Joint work with Mooly Sagiv and Reinhard Wilhelm.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Interprocedural shape analysis for cutpoint-free programs Noam Rinetzky Tel Aviv University Joint work with Mooly Sagiv Tel Aviv University Eran Yahav.
Putting Static Analysis to Work for Verification A Case Study Tal Lev-Ami Thomas Reps Mooly Sagiv Reinhard Wilhelm.
Formal methods: Lecture
Interprocedural shape analysis for cutpoint-free programs
Program Analysis and Verification
Semantic Minimization of 3-Valued Propositional Formulas
Lecture 2 of Computer Science II
Symbolic Implementation of the Best Transformer
Parametric Shape Analysis via 3-Valued Logic
Formal Methods in software development
Parametric Shape Analysis via 3-Valued Logic
Formal Methods in software development
Symbolic Characterization of Heap Abstractions
A Semantics for Procedure Local Heaps and its Abstractions
Dichotomies in CSP Karl Lieberherr inspired by the paper:
Abstraction-Guided Synthesis of synchronization
Presentation transcript:

Model Checking of Concurrent Software: Current Projects Thomas Reps University of Wisconsin

Projects and Personnel University of Wisconsin –Anne Mulhern –Alexey Loginov Tel-Aviv University –Prof. Mooly Sagiv –Eran Yahav –Noam Rinetzky –Greta Yorsh University of Saarbrücken –Prof. Reinhard Wilhelm

Verifying Behavioral Subtyping Anne Mulhern Inheritance of code vs. inheritance of behavior Liskov Substitution Principle: For every object x ’ of type t ’ there is an object x of type t, such that for all programs P defined in terms of t, the behavior of P is unchanged when x ’ is substituted for x. [Liskov 1988] Not enforced by compilers Goal: Build a tool that provides some amount of checking

Why? class FooNode { FooNode next;...  many data members ... }; class Foo { FooNode first; FooNode last; AppendElmt(Datum);...  many members ... }; class ListNode { ListNode next; }; class List { ListNode first; ListNode last; AddToEnd(); }; ??

Abstraction Refinement for TVLA/TVMC Alexey Loginov Identify additional abstraction predicates –Nullary? Unary? –Both can be used to refine an abstraction Need to be able to automatically create update formulas –Finite differencing of formulas [Reps, Sagiv] Semantic minimization of formulas

Semantic Minimization    (A): Value of formula  in assignment A In 3-valued logic,    (A) may equal ½  p + p ’  ([p  0]) = 1  p + p ’  ([p  ½]) = ½  p + p ’  ([p  1]) = 1

Two- vs. Three-Valued Logic 01 Two-valued logic {0,1} {0}{1} Three-valued logic {0}  {0,1} {1}  {0,1}

Two- vs. Three-Valued Logic Two-valued logicThree-valued logic

Two- vs. Three-Valued Logic Three-valued logic 0 1 Two-valued logic {1} {0,1} {0} 1 ½ 0

Two- vs. Three-Valued Logic 01 Two-valued logic {0}{1} Three-valued logic {0,1}

Two- vs. Three-Valued Logic 01 Two-valued logic ½ 01 Three-valued logic 0  ½ 1  ½

1: True 0: False 1/2: Unknown A join semi-lattice: 0  1 = 1/2 Three-Valued Logic   1/2 Information order

Boolean Connectives [Kleene]

Semantic Minimization    (A): Value of formula  in assignment A In 3-valued logic,    (A) may equal ½  p + p ’  ([p  0]) = 1  p + p ’  ([p  ½]) = ½  p + p ’  ([p  1]) = 1

Semantic Minimization    (A): Value of formula  in assignment A In 3-valued logic,    (A) may equal ½  p + p ’  ([p  0]) = 1  p + p ’  ([p  ½]) = ½  p + p ’  ([p  1]) = 1 However,  1  ([p  0]) = 1  1  ([p  ½]) = 1  1  ([p  1]) = 1

Semantic Minimization  1  ([p  0]) = 1 =  p + p ’  ([p  0])  1  ([p  ½]) = 1  ½ =  p + p ’  ([p  ½])  1  ([p  1]) = 1 =  p + p ’  ([p  1]) 2-valued logic: 1 is equivalent to p + p ’ 3-valued logic: 1 is better than p + p ’ For a given , is there a best formula? Yes!

Semantic Minimization Input: Propositional formula  Output: Propositional formula  such that For all 3-valued assignments A,    (A) =     (a) a  A, a definite By the monotonicity of    (),    (A) =     (a)     (A) a  A, a definite

Example Original formula (  ) xy ’ + x ’ z ’ + yz (Note:  is an irredundant sum of products) Minimal formula (  ) y ’ z ’ + yz + x ’ z ’ + x ’ y + xz + xy ’   (x ’ y ’ z + xyz ’ ) For which A’s do we have    (A)     (A)? A    (A)    (A) [x  ½, y  0, z  0] 1 ½ [x  0, y  1, z  ½] 1 ½ [x  1, y  ½, z  1] 1 ½

TVMC: A 3-Valued Model Checker Eran Yahav Programming-language features –concurrency –unbounded #’s of threads –pointers/aliasing –unbounded #’s of heap-allocated cells Properties to be checked –FOLTL (LTL + quantification) –Safety properties –Liveness properties (at least some forms...)

Java Threads Are Heap-Allocated Objects  Thread Analysis  Shape Analysis A memory configuration: thread3 inCritical lock1 isAcquired thread1 atStart thread2 atStart thread4 atStart csLock heldBy

An abstract memory configuration: thread inCritical lock1 isAcquired thread ’ atStart csLock heldBy Java Threads Are Heap-Allocated Objects  Thread Analysis  Shape Analysis

Here, model checking means: Explore the space of possible transitions among abstract memory configurations Java Threads Are Heap-Allocated Objects  Thread Analysis  Shape Analysis

Analysis of ADTs Noam Rinetzky Analysis of ADTs (classes) and their clients Objects summarized by finite-state machines obtained via shape-analysis Example: –Class Queue –Four states of a Queue object: Not allocated Empty Non-empty Error

Analysis of Trees Greta Yorsh Shape analysis of tree-manipulation programs –Binary-search-tree operations –Deutsch-Schorr-Waite tree traversal without a stack Challenges –Garbage-collection marking algorithm that uses Deutsch-Schorr-Waite graph traversal (DSW tree traversal of depth-first-search tree) –Barnes-Hut: uses an oct-tree with chained leaves Improved materialization algorithm for TVLA