Presented By: Krishna Balasubramanian

Slides:



Advertisements
Similar presentations
CSCE 3110 Data Structures & Algorithm Analysis
Advertisements

Virtual Memory (II) CSCI 444/544 Operating Systems Fall 2008.
Data-Flow Analysis II CS 671 March 13, CS 671 – Spring Data-Flow Analysis Gather conservative, approximate information about what a program.
Chapter 6: Memory Management
White Box and Black Box Testing Tor Stålhane. What is White Box testing White box testing is testing where we use the info available from the code of.
 Program Slicing Long Li. Program Slicing ? It is an important way to help developers and maintainers to understand and analyze the structure.
Programming Types of Testing.
Program Slicing. 2 CS510 S o f t w a r e E n g i n e e r i n g Outline What is slicing? Why use slicing? Static slicing of programs Dynamic Program Slicing.
Program Slicing Mark Weiser and Precise Dynamic Slicing Algorithms Xiangyu Zhang, Rajiv Gupta & Youtao Zhang Presented by Harini Ramaprasad.
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,
Allocating Memory.
1 S. Tallam, R. Gupta, and X. Zhang PACT 2005 Extended Whole Program Paths Sriraman Tallam Rajiv Gupta Xiangyu Zhang University of Arizona.
Hashing21 Hashing II: The leftovers. hashing22 Hash functions Choice of hash function can be important factor in reducing the likelihood of collisions.
Chapter 8 Runtime Support. How program structures are implemented in a computer memory? The evolution of programming language design has led to the creation.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming Recursion.
1 Amortized Analysis Consider an algorithm in which an operation is executed repeatedly with the property that its running time fluctuates throughout the.
Common Sub-expression Elim Want to compute when an expression is available in a var Domain:
Overview Memory definitions Random Access Memory (RAM)
Multiprocessing Memory Management
Program Representations Xiangyu Zhang. CS590Z Software Defect Analysis Program Representations  Static program representations Abstract syntax tree;
CSI 400/500 Operating Systems Spring 2009 Lecture #9 – Paging and Segmentation in Virtual Memory Monday, March 2 nd and Wednesday, March 4 th, 2009.
1  Caches load multiple bytes per block to take advantage of spatial locality  If cache block size = 2 n bytes, conceptually split memory into 2 n -byte.
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
Recap from last time: live variables x := 5 y := x + 2 x := x + 1 y := x y...
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
1 CSC 222: Computer Programming II Spring 2005 Searching and efficiency  sequential search  big-Oh, rate-of-growth  binary search  example: spell checker.
Systems Life Cycle A summary of what needs to be done.
Precision Going back to constant prop, in what cases would we lose precision?
Secure Embedded Processing through Hardware-assisted Run-time Monitoring Zubin Kumar.
Tutorial 7 Memory Management presented by: Antonio Maiorano Paul Di Marco.
Data Structures & AlgorithmsIT 0501 Algorithm Analysis I.
Foundations of Software Testing Chapter 5: Test Selection, Minimization, and Prioritization for Regression Testing Last update: September 3, 2007 These.
« Performance of Compressed Inverted List Caching in Search Engines » Proceedings of the International World Wide Web Conference Commitee, Beijing 2008)
Cosc 2150: Computer Organization Chapter 6, Part 2 Virtual Memory.
Recursion. What is recursion? Rules of recursion Mathematical induction The Fibonacci sequence Summary Outline.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Technology and Science, Osaka University Dependence-Cache.
CSC 211 Data Structures Lecture 13
Chapter 4 Memory Management Virtual Memory.
Pseudocode. Simple Program Design, Fourth Edition Chapter 2 2 Objectives In this chapter you will be able to: Introduce common words, keywords, and meaningful.
1 5. Abstract Data Structures & Algorithms 5.2 Static Data Structures.
Chapter 11: Dynamic Analysis Omar Meqdadi SE 3860 Lecture 11 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Replicating Memory Behavior for Performance Skeletons Aditya Toomula PC-Doctor Inc. Reno, NV Jaspal Subhlok University of Houston Houston, TX By.
Software Engineering Research Group, Graduate School of Engineering Science, Osaka University A Slicing Method for Object-Oriented Programs Using Lightweight.
Project Presentation By: Dean Morrison 12/6/2006 Dynamically Adaptive Prepaging for Effective Virtual Memory Management.
Software Engineering Department Graph-Less Dynamic Dependence-Based Dynamic Slicing Algorithms Árpád Beszédes, Tamás Gergely and Tibor Gyimóthy University.
Memory Management OS Fazal Rehman Shamil. swapping Swapping concept comes in terms of process scheduling. Swapping is basically implemented by Medium.
Pruning Dynamic Slices With Confidence Original by: Xiangyu Zhang Neelam Gupta Rajiv Gupta The University of Arizona Presented by: David Carrillo.
Static Timing Analysis
CHAPTER 51 LINKED LISTS. Introduction link list is a linear array collection of data elements called nodes, where the linear order is given by means of.
Foundations of Software Testing Chapter 5: Test Selection, Minimization, and Prioritization for Regression Testing Last update: September 3, 2007 These.
Virtual memory.
Chapter 2 Memory and process management
Memory COMPUTER ARCHITECTURE
CS161 – Design and Architecture of Computer
Memory Allocation The main memory must accommodate both:
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.
CSC 222: Object-Oriented Programming
Data Structure and Algorithms
Chapter 9 – Real Memory Organization and Management
Data Structures Interview / VIVA Questions and Answers
Aditya P. Mathur Purdue University
Stacks Chapter 4.
Main Memory Management
A Survey of Program Slicing Techniques: Section 4
Program Slicing Baishakhi Ray University of Virginia
Main Memory Background Swapping Contiguous Allocation Paging
Lecture 16: Register Allocation
Virtual Memory: Working Sets
Page Main Memory.
Presentation transcript:

Presented By: Krishna Balasubramanian Precise Dynamic Slicing Algorithms Xiangyu Zhang, Rajiv Gupta and Youtao Zhang Presented By: Krishna Balasubramanian

Slicing Techniques? Static Slicing Isolates all possible statements computing a particular variable Criteria: <v, n> Dynamic Slicing Isolates unique statements computing variable for given inputs Criteria: <i, v, n>

Example – Data dependences Static Slice <10, z> = {1, 2, 3, 4, 7, 8, 9, 10} Dynamic Slice <input, variable, execution point> <N=1, z, 101> = {3, 4, 9, 10}

Slice Sizes: Static vs Dynamic Program Statements Static Dynamic Static/Dynamic 126.gcc 585,491 51,098 6,614 7.72 099.go 95,459 16,941 5,382 3.14 134.perl 116,182 5,242 765 6.85 130.li 31,829 2,450 206 11.89 008.expresso 74,039 2,353 350 6.72 Static slicing gives huge slices On an average, static slices much larger

Precise Dynamic Slicing Data dependences exercised during program execution captured precisely and saved Only dependences occurring in a specific execution of program are considered Dynamic slices constructed upon users requests by traversing captured dynamic dependence information Limitation : Costly to compute

Imprecise Dynamic Slicing Reduces cost of slicing Found to greatly increase slice sizes Reduces effectiveness Worthwhile to use precise algorithms

Precise vs Imprecise: Slice Size Implemented two imprecise algorithms: Algorithm I and Algorithm II Imprecise increases the Slice Size Algorithm II better than Algorithm I

Precise Dynamic Slicing - Approach Program executed Execution trace collected PDS involves: Preprocessing: Builds dependence graph by recovering dynamic dependences from program’s execution trace Slicing Computes slices for given slicing requests by traversing dynamic dependence graph

3 Algorithms Proposed Full preprocessing (FP) – Builds entire dependence graph before slicing No preprocessing (NP) No preprocessing performed Does demand driven analysis during slicing Caches the recovered dependencies Limited preprocessing (LP) Adds summary info to execution trace Uses demand driven analysis to recover dynamic dependences from compacted execution trace What do you think is better and why?

Comparison FP algorithm impractical for real programs Runs out of memory during preprocessing phase Dynamic dependence graphs extremely large NP algorithm does not run out of memory but is slow LP algorithm is practical Never runs out of memory Fast

1) Full Preprocessing Edges corresponding to data dependences extracted from execution trace Added to statement level control flow graph Execution instances labeled on graph Uses instance labels during slicing Only relevant edges traversed

FP - Example Load to store edge on left labeled (1,1) Load to store edge on right labeled (2,1) 1st/2nd instance of load’s execution gets value from 1st instance of execution of store on the left/right When load included in dynamic slice, not necessary to include both stores in dynamic slice. Instance Labels

FP - Example

FP - Example Dynamic data dependence edges shown Edges labeled with execution instances of statements involved in data dependences Data dependence edges traversed during slice computation of Z used in the only execution of statement 16 is: (161, 143), (143, 132), (132, 122), (132, 153), (153, 31), (153, 152), (152, 31), (152, 151), (151, 31), (151, 41) Precise dynamic slice computed is: DS<x=6, z, 161> = {16,14,13,12,4,15,3} Compute the slice corresponding to the value of x used during the first execution of statement 15 ?? DS <x=6, x, 151> = Slice {4,15}

2) No Preprocessing Demand driven analysis to recover dynamic dependences Requires less storage compared to FP Takes more time Caching used to avoid repetitive computations Cost of maintaining cache vs repeated recovery of same dependences from trace

NP Example No dynamic data dependence edges present initially To compute slice for z at only execution of st 16: single backward traversal of trace (161, 143), (143, 132), (132, 122), (132, 153), (153, 31), (153, 152), (152, 31), (152, 151), (151, 31), (151, 41) extracted

NP with Cache Data dependence edges added to program flow graph Compute slice for use of x in 3rd instance of st 14 All dependences required already present in graph Trace not reexamined Compute slice for use of x by 2nd instance of st 10 Trace traversed again Additional dynamic data dependences extracted

3) Limited Preprocessing LP strikes a balance b/w preprocessing & slicing costs Limited preprocessing of trace Augments trace with summary information Faster traversal of augmented trace Demand driven analysis to compute slice using augmented trace Addresses Space problems of FP Time problems of NP

LP – Approach Trace divided into trace blocks Each trace block of fixed size Store summary of all downward exposed definitions of variable names & memory addresses Look for variable definition in summary of downward exposed definitions If definition found, traverse trace block to locate it Else, use size information to skip to start of trace block

Evaluation Execution traces on 3 different input sets for each benchmark computed Computed 25 different slices for each execution trace Slices computed wrt end of program’s execution (@ End) Computed 25 slices at an additional point in program’s execution (@ midpoint) for 1st input

Results – Slice sizes PDS Sizes for additional Input PDS sizes for 2nd & 3rd program inputs for @ End are shown No. of statements in dynamic slice is small fraction of statements executed Different inputs give similar observations Thus, Dynamic slicing is effective across different inputs

Evaluation - Slice computation times Compared FP, NPwoC, NPwC, and LP Cumulative execution time in seconds as slices are computed one by one is shown Graphs include both preprocessing times & slice computation times

Y-Axis: Cum Exec time(s) Execution Times X-Axis: Slices Y-Axis: Cum Exec time(s)

Observations FP rarely runs to completion Mostly runs out of memory NPwoC, NPwC and LP successful Makes computation of PDS feasible NPwoC shows linear increase in cumulative exec time with no. of slices LP cumulative exec time rises much more slowly than NPwoC and NPwC

Observations Cumulative times: NP vs LP Trace Blocks skipped by LP Exec times of LP are 1.13 to 3.43 times < than NP Due to % of trace blocks skipped by LP Shows that limited preprocessing does pay off

LP (Precise) vs Algorithm II (Imprecise) Slice Sizes: Slices computed by LP 1.2 to 17.33 times smaller than imprecise data slices of Algorithm II Relative performance was similar Execution Times: @ End, total time taken by LP 0.55 to 2.02 times Algorithm II @ Midpoint, total time taken by LP is 0.51 to 1.86 times Algorithm II

Results Both have no memory problems Smaller slice sizes for LP For large slices, execution time greater than imprecise For small slices, execution time less than imprecise

Summary Precise LP algorithm performs the best Imprecise dynamic slicing algorithms are too imprecise, hence not an attractive option LP algorithm is practical Provides Precise Dynamic Slices at reasonable space and time costs

Thank you!