Pruning Dynamic Slices With Confidence Xiangyu Zhang Neelam Gupta Rajiv Gupta The University of Arizona.

Slides:



Advertisements
Similar presentations
P3 / 2004 Register Allocation. Kostis Sagonas 2 Spring 2004 Outline What is register allocation Webs Interference Graphs Graph coloring Spilling Live-Range.
Advertisements

Aberystwyth University Department of Computer Science 1 Lessons from engineering: Can software benefit from product based evidence of reliability? Neal.
HARDWARE SOFTWARE PARTITIONING AND CO-DESIGN PRINCIPLES MADHUMITA RAMESH BABU SUDHI PROCH 1/37.
1 CS 201 Compiler Construction Lecture 3 Data Flow Analysis.
Chair of Software Engineering From Program slicing to Abstract Interpretation Dr. Manuel Oriol.
 Program Slicing Long Li. Program Slicing ? It is an important way to help developers and maintainers to understand and analyze the structure.
Program Slicing Mark Weiser and Precise Dynamic Slicing Algorithms Xiangyu Zhang, Rajiv Gupta & Youtao Zhang Presented by Harini Ramaprasad.
Presented By: Krishna Balasubramanian
1 Cost Effective Dynamic Program Slicing Xiangyu Zhang Rajiv Gupta The University of Arizona.
CS590F Software Reliability What is a slice? S: …. = f (v)  Slice of v at S is the set of statements involved in computing v’s value at S. [Mark Weiser,
FIT FIT1002 Computer Programming Unit 19 Testing and Debugging.
1 S. Tallam, R. Gupta, and X. Zhang PACT 2005 Extended Whole Program Paths Sriraman Tallam Rajiv Gupta Xiangyu Zhang University of Arizona.
Scalable Dynamic Analysis for Automated Fault Location and Avoidance Rajiv Gupta Funded by NSF grants from CPA, CSR, & CRI programs and grants from Microsoft.
Program Slicing Xiangyu Zhang. CS590F Software Reliability What is a slice? S: …. = f (v)  Slice of v at S is the set of statements involved in computing.
Automatically Proving the Correctness of Compiler Optimizations Sorin Lerner Todd Millstein Craig Chambers University of Washington.
02/13/20071 Indexing Noncrashing Failures: A Dynamic Program Slicing-Based Approach Chao Liu, Xiangyu Zhang, Jiawei Han, Yu Zhang, Bharat K. Bhargava University.
Dynamically Discovering Likely Program Invariants to Support Program Evolution Michael D. Ernst, Jake Cockrell, William G. Griswold, David Notkin Presented.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Fundamentals (Chapter 4) Axiomatic Semantics ICS 535.
Testing an individual module
Page 1 Building Reliable Component-based Systems Chapter 14 - Testing Reusable Software Components in Safety- Critical Real-Time Systems Chapter 14 Testing.
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
Automated Diagnosis of Software Configuration Errors
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
Data Flow Testing Data flow testing(DFT) is NOT directly related to the design diagrams of data-flow-diagrams(DFD). It is a form of structural testing.
Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Explore.
Software (Program) Analysis. Automated Static Analysis Static analyzers are software tools for source text processing They parse the program text and.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Bug Localization with Machine Learning Techniques Wujie Zheng
Scalable Dynamic Analysis for Automated Fault Location and Avoidance Rajiv Gupta Funded by NSF grants from CPA, CSR, & CRI programs and grants from Microsoft.
Interactive Debugging QuickZoom: A State Alteration and Inspection-based Interactive Debugger 1.
Which Configuration Option Should I Change? Sai Zhang, Michael D. Ernst University of Washington Presented by: Kıvanç Muşlu.
Chapter 13: Regression Testing Omar Meqdadi SE 3860 Lecture 13 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Keyword Searching and Browsing in Databases using BANKS Seoyoung Ahn Mar 3, 2005 The University of Texas at Arlington.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 20 Slide 1 Critical systems development 3.
1 Test Selection for Result Inspection via Mining Predicate Rules Wujie Zheng
Reasoning about programs March CSE 403, Winter 2011, Brun.
Chapter 11: Dynamic Analysis Omar Meqdadi SE 3860 Lecture 11 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
References: “Pruning Dynamic Slices With Confidence’’, by X. Zhang, N. Gupta and R. Gupta (PLDI 2006). “Locating Faults Through Automated Predicate Switching’’,
Lecture Notes - Copyright © S. C. Kothari, All rights reserved.1 Efficient Debugging CPRE 556 Lecture 19.
1 Data Flow Analysis Data flow analysis is used to collect information about the flow of data values across basic blocks. Dominator analysis collected.
How to isolate cause of failure? 최윤라. Contents Introduction Isolating relevant input Isolating relevant states Isolating the error Experiments.
Author: Alex Groce, Daniel Kroening, and Flavio Lerda Computer Science Department, Carnegie Mellon University Pittsburgh, PA Source: R. Alur and.
Bug Localization with Association Rule Mining Wujie Zheng
Programming with Loops. When to Use a Loop  Whenever you have a repeated set of actions, you should consider using a loop.  For example, if you have.
Automated Debugging with Error Invariants TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAA A A A AA A A Chanseok Oh.
Pruning Dynamic Slices With Confidence Original by: Xiangyu Zhang Neelam Gupta Rajiv Gupta The University of Arizona Presented by: David Carrillo.
/ PSWLAB Evidence-Based Analysis and Inferring Preconditions for Bug Detection By D. Brand, M. Buss, V. C. Sreedhar published in ICSM 2007.
Lecture 3 Computer Programming -1-. The main steps of program development to solve the problem: 1- problem definition : The problem must be defined into.
Phoenix Based Dynamic Slicing Debugging Tool Eric Cheng Lin Xu Matt Gruskin Ravi Ramaseshan Microsoft Phoenix Intern Team (Summer '06)
Testing and Debugging PPT By :Dr. R. Mall.
Static Slicing Static slice is the set of statements that COULD influence the value of a variable for ANY input. Construct static dependence graph Control.
Algorithmic complexity: Speed of algorithms
Chapter 8 – Software Testing
Verification and Testing
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 6 Domain Testing
SwE 455 Program Slicing.
A Survey of Program Slicing Techniques: Section 4
Software testing strategies 2
Program Slicing Baishakhi Ray University of Virginia
Improving Test Suites for Efficient Fault Localization
Test Case Purification for Improving Fault Localization
CS 1111 Introduction to Programming Fall 2018
Algorithmic complexity: Speed of algorithms
Artificial Intelligence
50.530: Software Engineering
Algorithmic complexity: Speed of algorithms
CPRE 416-Software Evolution and Maintenance-Lecture 11
CSE 1020:Software Development
CHAPTER 6 Testing and Debugging.
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Presentation transcript:

Pruning Dynamic Slices With Confidence Xiangyu Zhang Neelam Gupta Rajiv Gupta The University of Arizona

2 Dynamic Slicing Dynamic slice is the set of statements that did affect the value of a variable at a program point for a specific program execution. [Korel and Laski, 1988 ] …… 10. A = … B = …… 30. P = 31. If (P<0) { A = A } 37. B=B+1 …… 40. Error(A) Dynamic Slice = {10, 30, 31, 35, 40}

3 Effectiveness of Dynamic Slicing Dynamic slicing is very effective in containing the faulty statement, however it usually produces over- sized slices -- [AADEBUG’05]. Problem: How to automatically prune dynamic slices? Approaches: Coarse-grained pruning by intersecting multiple types (backward, forward, bidirectional) of dynamic slices -- [ASE’05, ICSE’06] Fine-grained pruning of a backward slice by using confidence analysis -- this paper.

4 Types of Evidence Used in Pruning Buggy Execution output_x  Classical dynamic slicing algorithms investigate bugs through the evidence of the wrong output  Critical Predicate [ICSE’06] input0 input_x input2 output_x predicate_x output0 output1 predicate_x  Other types of evidence:  Failure inducing input [ASE’05]  Partially correct output -- this paper  Benefits of more evidence Narrow the search for faulty stmt. Broaden the applicability

5 Coarse-grained Pruning by Intersecting Slices failure inducing input BS FS FS(CP) BiS(CP) + CP BS^FS

6 Fine-grained Pruning by Exploiting Correct Outputs …… 10. A = 1 (Correct: A=3) … B = A % 2 …… 30. C = A + 2 …… 40. Print (B) 41. Print (C)  Correct outputs produced in addition to wrong output.  BS(O wrong ) – BS (O correct ) is problematic. {10, 30, 41} {10, 20, 40} = {30,41}

7 Confidence Analysis  Value produced at node n can reach only wrong output nodesn There is no evidence that n is correct, so it should be in the pruned slice. Should we include n in the slice?? Confidence(n)=0 Confidence(n)=?; 0 ≤ ? ≤ 1  Value produced at node n can reach both the correct and wrong output nodes.nnn Confidence(n)=1  Value produced at n can reach only correct outputs There is no evidence of incorrectness of n. Therefore it cannot be in the slice.

8 Confidence Analysisnn Range(n)={ a, b, c, d, e, f, g } Alt(n)={ a } Value(n) = a Value(n) = bValue(n) = c, c When |Alt(n)|==1, we have the highest confidence (=1) on the correctness of n; When |Alt(n)|==|Range(n)|, we have the lowest confidence (=0). |Range(n)| >= |Alt(n)|>=1 Alt(n) is a set of possible values of the variable defined by n, that when propagated through the dynamic dependence graph, produce the same values for correct outputs.

9 Confidence Analysis: Example …… 10. A =... … B = A % 2 …… 30. C = A + 2 …… 40. Print (B) 41. Print (C)

10 Confidence Analysis: Two Problems  How to decide the Range of values for a node n? Based on variable type (e.g., Integer). Static range analysis. Our choice:  Dynamic analysis based on value profiles.  Range of values for a statement is the set of values defined by all of the execution instances of the statement during the program run.  How to compute Alt(n)? Consider the set of correct output values as constraints. Compute Alt(n) by backward propagation of constraints through the dynamic dependence subgraph corresponding to the slice.

11 Computing Alt(n) Along Data Dependence S1: T=...9 S2: X=T+110 S3: Y=T%30 (X,T)= (6,5) (9,8) (10,9) (T,...)= (1,...) (3,...) (5,...) (8,...) (9,...) (Y,T)=( 0,3) (0,9) (1,1) (2,5) (2,8) alt(S1) = ∩ alt = {9} alt(S2)={10} alt(S3)={0,1}

12 Computing Alt(n) Along Control Dependence S1: if (P) …True S2: X=T+110 S3: Y=T%30 (X,T)= (6,5) (9,8) (10,9) (Y,T)=( 0,3) (0,9) (1,1) (2,5) (2,8) alt(S1) = {True} alt(S2)={10} alt(S3)={0,1}

13 Characteristics of Siemens Suite Programs ProgramDescriptionLOCVersionsTests print_tokensLexical analyzer print_tokens2Lexical analyzer replacePattern replacement schedulePriority scheduler schedule2Priority scheduler gzipUnix utility flexUnix utility Each faulty version has a single manually injected error. All the versions are not included:  No output is produced.  Faulty statement is not contained in the backward slice. For each version three tests were selected.

14 Results of Pruning ProgramDSPDS max PDS max / DS PDS min %Missed by PDS min print_tokens %350% print_tokens %550% replace %4338.1% schedule %5620% schedule %500% gzip %10100% flex %250% On average, PDS max = 41.1% of DS

15 Confidence Based Prioritization DD – dep. distance CV – confidence values Executed statement instances examined (%)

16 The Potential of Confidence Analysis (1)  Case Study (replace v14) 88  74  23 Dynamic Slicer With Confidence Pruned Slices User Verified Statements as correct Buggy Code Input

17 The Potential of Confidence Analysis (2)  Relevant slicing (gzip v3 run r1) Potential dep. Data dep.

18 Conclusions  We have presented a new approach - Confidence analysis - that exploits the correct output values produced in an execution to prune the dynamic slice of an incorrect output.  We have developed a novel dynamic analysis based implementation of confidence analysis, which effectively pruned backward dynamic slices in our experiments. Pruned Slices = 41.1% Dynamic Slices, and still contain the faulty statement.  Our study shows that confidence analysis has additional applications beyond pruning – prioritization, interactive pruning & relevant slicing.

19 The End