Chapter 11: Dynamic Analysis Omar Meqdadi SE 3860 Lecture 11 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.

Slides:



Advertisements
Similar presentations
Program Slicing and Debugging Elton Alves Informatics Center Federal University of Pernambuco (UFPE) V Encontro Brasilieiro de Testes de Software (EBTS),
Advertisements

DATAFLOW TESTING DONE BY A.PRIYA, 08CSEE17, II- M.s.c [C.S].
A Survey of Program Slicing Techniques A Survey of Program Slicing Techniques Sections 3.1,3.6 Swathy Shankar
Program Slicing – Based Techniques
Chapter 6 Path Testing Software Testing
Course Outline Traditional Static Program Analysis –Theory Compiler Optimizations; Control Flow Graphs Data-flow Analysis – today’s class –Classic analyses.
Static Single Assignment CS 540. Spring Efficient Representations for Reachability Efficiency is measured in terms of the size of the representation.
 Program Slicing Long Li. Program Slicing ? It is an important way to help developers and maintainers to understand and analyze the structure.
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 Program Slicing Purvi Patel. 2 Contents Introduction What is program slicing? Principle of dependences Variants of program slicing Slicing classifications.
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,
Introduction to Program Slicing Presenter: M. Amin Alipour Software Design Laboratory
Prof. B. I. Khodanpur HOD – Dept. of CSE R. V. College of Engineering
Data Flow Testing (DFT) Data flow testing is NOT the same as constructing Design Diagrams in the form of data-flow-diagrams (DFD) or E-R diagrams. It is.
CS4723 Software Engineering Lecture 10 Debugging and Fault Localization.
Program Representations Xiangyu Zhang. CS590F Software Reliability Why Program Representations  Initial representations Source code (across languages).
1 CS 201 Compiler Construction Lecture 3 Data Flow Analysis.
Program Representations Xiangyu Zhang. CS590Z Software Defect Analysis Program Representations  Static program representations Abstract syntax tree;
BASIS PATH TESTING ● By Tom McCabe ● McCabe, T., "A Software Complexity Measure," IEEE Trans. Software Engineering, vol. SE-2, December 1976, pp
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
CHAPTER 10 Recursion. 2 Recursive Thinking Recursion is a programming technique in which a method can call itself to solve a problem A recursive definition.
Prof. Bodik CS 164 Lecture 16, Fall Global Optimization Lecture 16.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
Topics in Software Dynamic White-box Testing Part 2: Data-flow Testing
Chapter 9: Coupling & Cohesion Omar Meqdadi SE 273 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software (Program) Analysis. Automated Static Analysis Static analyzers are software tools for source text processing They parse the program text and.
Chapter 2: Software Process Omar Meqdadi SE 2730 Lecture 2 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
1 A Static Analysis Approach for Automatically Generating Test Cases for Web Applications Presented by: Beverly Leung Fahim Rahman.
Foundations of Software Testing Chapter 5: Test Selection, Minimization, and Prioritization for Regression Testing Last update: September 3, 2007 These.
Bug Localization with Machine Learning Techniques Wujie Zheng
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Design and Implementation.
Chapter 13: Regression Testing Omar Meqdadi SE 3860 Lecture 13 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Dataflow Analysis Topic today Data flow analysis: Section 3 of Representation and Analysis Paper (Section 3) NOTE we finished through slide 30 on Friday.
Chapter 15: Risk Management
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Technology and Science, Osaka University Dependence-Cache.
1 Program Slicing Amir Saeidi PhD Student UTRECHT UNIVERSITY.
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Chapter 12: Software Inspection Omar Meqdadi SE 3860 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Lecture Notes - Copyright © S. C. Kothari, All rights reserved.1 Efficient Debugging CPRE 556 Lecture 19.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
Java Basics Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Software Engineering Research Group, Graduate School of Engineering Science, Osaka University A Slicing Method for Object-Oriented Programs Using Lightweight.
Software Engineering Emphasis for Engineering Computing Courses William Hankley Computing & Information Sciences Kansas State University.
Software Engineering Department Graph-Less Dynamic Dependence-Based Dynamic Slicing Algorithms Árpád Beszédes, Tamás Gergely and Tibor Gyimóthy University.
Program Slicing Techniques CSE 6329 Spring 2013 Parikksit Bhisay
The Hashemite University Computer Engineering Department
Chapter 10: Software Size Estimation Omar Meqdadi SE 273 Lecture 10 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Chapter 9: Coupling & Cohesion Omar Meqdadi SE 273 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Foundations of Software Testing Chapter 5: Test Selection, Minimization, and Prioritization for Regression Testing Last update: September 3, 2007 These.
Debugging and Testing Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Phoenix Based Dynamic Slicing Debugging Tool Eric Cheng Lin Xu Matt Gruskin Ravi Ramaseshan Microsoft Phoenix Intern Team (Summer '06)
Testing and Debugging UCT Department of Computer Science Computer Science 1015F Hussein Suleman March 2009.
White-Box Testing Pfleeger, S. Software Engineering Theory and Practice 2nd Edition. Prentice Hall, Ghezzi, C. et al., Fundamentals of Software Engineering.
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.
Aditya P. Mathur Purdue University
SwE 455 Program Slicing.
White-Box Testing Techniques II
CHAPTER 4 Test Design Techniques
A Survey of Program Slicing Techniques: Section 4
Program Slicing Baishakhi Ray University of Virginia
White-Box Testing Techniques II
“White box” or “glass box” tests
White-Box Testing Techniques II
CPRE 416-Software Evolution and Maintenance-Lecture 11
Presentation transcript:

Chapter 11: Dynamic Analysis Omar Meqdadi SE 3860 Lecture 11 Department of Computer Science and Software Engineering University of Wisconsin-Platteville

2 Topic Covered Why Dynamic Analysis Control Flow Trace Dynamic Dependence Graph Dynamic Backward Slicing

3 Dynamic Analysis Dynamic analysis : dynamic representations of the code  determine a flow through a software system given a particular set of inputs or a user scenario(s). Part of the impact analysis of required change Why  Help maintainer gain initial understanding of a software system  Diagnose and/or localize problems.  Static analysis is very imprecise Example: Debugger

Dynamic Analysis Dynamic program representations  Control Flow Trace  Dynamic Dependence Graph

Control Flow Trace List of all the execution points (execution paths) given a particular program point (input) Flow chart when executing a given input Format : , where x i is an execution point Steps:  Draw the flow chart  Find the execution given a particular input

Control Flow Trace: Example 3: while ( i<N) do 1: sum=0 2: i=1 4: i=i+1 5: sum=sum+i 6: print (sum) 1 1 : sum=0 3 1 : while ( i<N) do 5 1 : sum=sum+i 3 2 : while ( i<N) do 4 2 : i=i : while ( i<N) do 6 1 : print (sum) N=3: 2 1 : i=1 4 1 : i=i : sum=sum+i Flow Chart Control Flow Trace at N=3 N = 3 :

Dynamic Dependence Graph Dynamic Dependency Graph (DDG) :  A PDG ( see Chapter 10) assuming fixed input for the program Reconsider the following code from Chapter 10 and assume X( from statement S1) = -1:

DDG Example PDG DDG at X = -1

Dynamic Backward Slicing Recall that program slice is a subset of a program that contains the relevant code to the computation of interest, see Chapter 10. Dynamic Slicing assumes fixed input for a program A dynamic backward slice query is S  The set of statements involved in computing variable V’s value at statement N assuming that I is the input for the program Advantages :  Smaller  More precise  More helpful to the user

Dynamic Backward Slicing Two Approaches: Considering only the data dependency (Minimal Slicing)  Using Dynamic Data Dependency Graph Considering both data and control dependencies  Using Dynamic Dependency Graph

1: b=0 2: a=2 3: for i= 1 to N do 4: if ((i++)%2==1) then 5: a = a+1 else 6: b = a*2 endif done 7: z = a+b 8: print(z) S 1 1 : b=0 [b=0] 2 1 : a=2 3 1 : for i = 1 to N do [i=1] 4 1 : if ( (i++) %2 == 1) then [i=1] 5 1 : a=a+1 [a=3] 3 2 : for i=1 to N do [i=2] 4 2 : if ( i%2 == 1) then [i=2] 6 1 : b=a*2 [b=6] 7 1 : z=a+b [z=9] 8 1 : print(z) [z=9] Dynamic Backward Slicing Approch1:

Dynamic Backward Slicing Approach2 Using DDG:  A dynamic program slice is identified from a DDG as follows: for a variable V at node N, identify all reaching definitions of V. find all nodes in the DDG which are reachable from those nodes. The visited nodes in the traversal process constitute the desired slice.  Consider the program in the slide 7 and variable Y at S10. Therefore, with respect to variable Y at S10, the dynamic slice will contain only {S1, S2 and S3}. So: For −1 as the values of X, if the value of Y is incorrect at S10, one can infer that either erroneous at S3 or the “if” condition at S2 is incorrect.