Concurrency Analysis for Correct Concurrent Programs: Fight Complexity Systematically and Efficiently Moonzoo Kim Computer Science, KAIST.

Slides:



Advertisements
Similar presentations
Applications of Synchronization Coverage A.Bron,E.Farchi, Y.Magid,Y.Nir,S.Ur Tehila Mayzels 1.
Advertisements

Model Checker In-The-Loop Flavio Lerda, Edmund M. Clarke Computer Science Department Jim Kapinski, Bruce H. Krogh Electrical & Computer Engineering MURI.
Paul Ammann & Jeff Offutt
Graph Coverage (2).
Introduction to Software Testing Chapter 2.1, 2.2 Overview Graph Coverage Criteria Paul Ammann & Jeff Offutt
Lecture 2 White-box Testing and Structural Coverage.
Necessity of Systematic & Automated Testing Techniques Moonzoo Kim CS Dept, KAIST.
The Path to Multi-core Tools Paul Petersen. Multi-coreToolsThePathTo 2 Outline Motivation Where are we now What is easy to do next What is missing.
Concurrent & Distributed Systems Lecture 4: ME solutions Lecture 3 considered possible algorithms for achieving Mutual Exclusion between the critical sections.
TI1400 Ten Minutes of Personal Notes on Being a TU Delft Student Alexandru Iosup (lecturer) Parallel and Distributed Systems
Topics in Software Dynamic White-box Testing: Data-flow Testing
Advances in Language Design
Topics in Software Dynamic White-box Testing Part 2: Data-flow Testing
Provable Software Laboratory Moonzoo Kim
Paul Ammann & Jeff Offutt
Software testing techniques Testing criteria based on data flow
Presented By Dr. Shazzad Hosain Asst. Prof., EECS, NSU
CMSC 345 Fall 2000 Unit Testing. The testing process.
1 VeriSoft A Tool for the Automatic Analysis of Concurrent Reactive Software Represents By Miller Ofer.
Overview Graph Coverage Criteria ( Introduction to Software Testing Chapter 2.1, 2.2) Paul Ammann & Jeff Offutt.
Programming Paradigms for Concurrency Part 2: Transactional Memories Vasu Singh
Introduction to Software Testing Chapter 8.1 Building Testing Tools –Instrumentation Paul Ammann & Jeff Offutt
COMP 111 Threads and concurrency Sept 28, Tufts University Computer Science2 Who is this guy? I am not Prof. Couch Obvious? Sam Guyer New assistant.
Introduction to Software Testing Chapters 1-5 Coverage Summary Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 2.3 Graph Coverage for Source Code Paul Ammann & Jeff Offutt.
Software Testing and Maintenance Lecture 2.1 Overview Graph Coverage
The Spin Model Checker : Part I Moonzoo Kim KAIST.
Software Construction Lecture 19 Software Testing-2.
Deadlock Bug Detection Techniques Prof. Moonzoo Kim CS KAIST CS492B Analysis of Concurrent Programs 1.
1 Graph Coverage (3). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section 2.2 ◦ Section
Lazy Annotation for Program Testing and Verification (Supplementary Materials) Speaker: Chen-Hsuan Adonis Lin Advisor: Jie-Hong Roland Jiang December 3,
Paul Ammann & Jeff Offutt
Data Flow Coverage Criteria
Agenda  Quick Review  Finish Introduction  Java Threads.
Software Testing and Maintenance Lecture 3 Graph Coverage for Source Code Paul Ammann & Jeff Offutt Instructor: Hossein Momeni Mazandaran.
Data Flow Testing. Introduction to Software Testing (Ch 2) © Ammann & Offutt 2 Definition of a Graph A set N of nodes, N is not empty A set N 0 of initial.
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Moonzoo Kim SWTV Group CS Dept. KAIST
Paul Ammann & Jeff Offutt
Graph Coverage Criteria CS 4501 / 6501 Software Testing
Graph: Data Flow Criteria CS 4501 / 6501 Software Testing
Jeff Offutt SWE 637 Software Testing
Paul Ammann & Jeff Offutt
CS453: Automated Software Testing
Automated Software Analysis Techniques For High Reliability: A Concolic Testing Approach Moonzoo Kim.
Introduction to Concurrent Programming
Introduction to Concurrency
Moonzoo Kim SWTV Group CS Dept. KAIST
Paul Ammann & Jeff Offutt
Quality Concurrent SW - Fight the Complexity of SW
Graph: Data Flow Coverage Criteria CS 4501 / 6501 Software Testing
Graph Coverage for Source Code
Paul Ammann & Jeff Offutt
Jeff Offutt SWE 637 Software Testing
Graph Coverage Criteria CS 4501 / 6501 Software Testing
Automated Software Analysis Techniques For High Reliability: A Concolic Testing Approach Moonzoo Kim.
Moonzoo Kim SWTV Group CS Dept. KAIST
Graph Coverage Criteria
Graph Coverage Criteria CS 4501 / 6501 Software Testing
Paul Ammann & Jeff Offutt
Graph Coverage Criteria
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Review for Final – Spring 2018
Paul Ammann & Jeff Offutt
Review for Final – Spring 2019
Unit III – Chapter 3 Path Testing.
Presentation transcript:

Concurrency Analysis for Correct Concurrent Programs: Fight Complexity Systematically and Efficiently Moonzoo Kim Computer Science, KAIST

/37 Motivation for Concurrency Analysis Most of my subjects (interviewee) have found that the hardest bugs to track down are in concurrent code … And almost every one seem to think that ubiquitous multi-core CPUs are going to force some serious changes in the way software is written Most of my subjects (interviewee) have found that the hardest bugs to track down are in concurrent code … And almost every one seem to think that ubiquitous multi-core CPUs are going to force some serious changes in the way software is written P. Siebel, Coders at work (2009) -- interview with 15 top programmers of our times: Jamie Zawinski, Brad Fitzpatrick, Douglas Crockford, Brendan Eich, Joshua Bloch, Joe Armstrong, Simon Peyton Jones, Peter Norvig, Guy Steele, Dan Ingalls, L Peter Deutsch, Ken Thompson, Fran Allen, Bernie Cosell, Donald Knuth Unintended/unexpected thread scheduling (a.k.a., interleaving scenarios) raises hard to detect concurrency errors

/ 30 SWTV KAIST Concurrent Programming is Error-prone Correctness of concurrent programs is hard to achieve – Interactions between threads should be carefully performed – A large # of thread executions due to non-deterministic thread scheduling – Testing technique for sequential programs do not properly work 3 Ex. Peterson mutual exclusion (From Dr. Moritz Hammer’s Visualisierung ) 2 processes, 30 states 3 processes, 853 states4 processes, states

Concurrency 4/11 Concurrent programs have very high complexity due to non-deterministic scheduling Ex. int x=0, y=0, z =0; void p() {x=y+1; y=z+1; z= x+1;} void q() {y=z+1; z=x+1; x=y+1;} – Total 20 interleaving scenarios = (3+3)!/(3!x3!) – However, only 11 unique outcomes p() q() x=y+1 y=z+1 z=x+1 x=y+1 y=z+1 z=x+1 Trail1: 2,2,3 Trail2: 3,2,4 Trail3: 3,2,3 Trail4: 2,4,3 Trail5: 5,4,6 Trail6: 5,4,3 Trail7: 2,1,3 Trail8: 2,3,3 Trail9: 4,3,5 Trail10: 4,3,2 Trail11: 2,1,2

Moonzoo Kim5/11 Very difficult to find concurrency bugs !!!

Operational Semantics of Software A system execution  is a sequence of states s 0 s 1 … –A state has an environment  s :Var-> Val A system has its semantics as a set of system executions 6 x:0,y:0 x:0,y:1 x:1,y:2 x:1,y:3 x:2,y:4 s0s0 s1s1 s2s2 s3s3 s4s4 x:5,y:1 x:5,y:2 x:5,y:3 x:5,y:4 s 11 s 12 s 13 s 14 x:7,y:3 x:7,y:4 s 21 s 22

Model Checker Analyzes All Possible Scheduling active type A() { byte x; again: x++; goto again; } 7 x:0 x:1 x:2 x:255 active type A() { byte x; again: x++; goto again; } active type B() { byte y; again: y++; goto again; } x:0,y:0 x:1,y:0 x:2,y:0 x:255,y:0 x:0,y:1 x:1,y:1 x:0,y:255 x:1,y:255 x:255,y:255 x:2,y:1 x:2,y:255

Hierarchy of SW Coverage Criteria 8/60 Simple Round Trip Coverage SRTC Node Coverage NC Edge Coverage EC Edge-Pair Coverage EPC Prime Path Coverage PPC Complete Path Coverage CPC Complete Round Trip Coverage CRTC All-DU-Paths Coverage ADUP All-uses Coverage AUC All-defs Coverage ADC Complete Value Coverage CVC (SW) Model checking Concolic testing