Introduction to Program Slicing Presenter: M. Amin Alipour Software Design Laboratory

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].
Overview Structural Testing Introduction – General Concepts
A Survey of Program Slicing Techniques A Survey of Program Slicing Techniques Sections 3.1,3.6 Swathy Shankar
Program Slicing – Based Techniques
Course Outline Traditional Static Program Analysis –Theory Compiler Optimizations; Control Flow Graphs Data-flow Analysis – today’s class –Classic analyses.
P3 / 2004 Register Allocation. Kostis Sagonas 2 Spring 2004 Outline What is register allocation Webs Interference Graphs Graph coloring Spilling Live-Range.
Course Outline Traditional Static Program Analysis –Theory Compiler Optimizations; Control Flow Graphs Data-flow Analysis – today’s class –Classic analyses.
Data-Flow Analysis Framework Domain – What kind of solution is the analysis looking for? Ex. Variables have not yet been defined – Algorithm assigns a.
Chair of Software Engineering From Program slicing to Abstract Interpretation Dr. Manuel Oriol.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
 Program Slicing Long Li. Program Slicing ? It is an important way to help developers and maintainers to understand and analyze the structure.
Program Slicing; Andreas Linder eXtreme Programming lab course 2004.
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
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.
© SERG Dependable Software Systems (Slicing) Dependable Software Systems Topics in Program Slicing Material drawn from [Weiser84,Gallagher91,DeMillo96]
1 Program Slicing Purvi Patel. 2 Contents Introduction What is program slicing? Principle of dependences Variants of program slicing Slicing classifications.
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,
Interprocedural Slicing using Dependence Graphs Susan Horwitz, Thomas Reps, and David Binkley University of Wisconsin-Madison.
Csci 565 Spring  Originally proposed by [Weiser 88]and [Gallagher 91] in software maintenance  Useful for  Software Debugging  Software Maintenance.
SwE 455 Program Slicing. Our Goals Debug your thousands lines of code easily by reducing the complexity of the program Write a robust program before testing.
Parameterized Object Sensitivity for Points-to Analysis for Java Presented By: - Anand Bahety Dan Bucatanschi.
Program Representations Xiangyu Zhang. CS590F Software Reliability Why Program Representations  Initial representations Source code (across languages).
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Program Slicing for Refactoring Advanced SW Tools Seminar Jan 2005Yossi Peery.
Program Representations Xiangyu Zhang. CS590Z Software Defect Analysis Program Representations  Static program representations Abstract syntax tree;
Improving code generation. Better code generation requires greater context Over expressions: optimal ordering of subtrees Over basic blocks: Common subexpression.
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Survey of program slicing techniques
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 5 Data Flow Testing
Technical University of Valencia Computer Science Department SOFSEM’07 (22/01/2007) A Program Slicing Based Method to Filter XML/DTD documents.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
Data-Flow Analysis. Approaches Static Analysis Inspections Dependence analysis Symbolic execution Software Verification Data flow analysis Concurrency.
Presented By Dr. Shazzad Hosain Asst. Prof., EECS, NSU
Software (Program) Analysis. Automated Static Analysis Static analyzers are software tools for source text processing They parse the program text and.
Formal Methods Program Slicing & Dataflow Analysis February 2015.
KEVIN COOGAN, GEN LU, SAUMYA DEBRAY DEPARTMENT OF COMUPUTER SCIENCE UNIVERSITY OF ARIZONA 報告者:張逸文 Deobfuscation of Virtualization- Obfuscated Software.
Software Engineering Research Group, Graduate School of Engineering Science, Osaka University Analysis and Implementation Method of Program to Detect Inappropriate.
Bug Localization with Machine Learning Techniques Wujie Zheng
Introduction to Software Testing Chapter 8.1 Building Testing Tools –Instrumentation Paul Ammann & Jeff Offutt
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Design and Implementation.
 Program Slicing : Analysis technique of extracting parts of a given program, relevant to the aspects being analyzed (the slicing criterion). E.g. slicing.
1 Program Slicing Amir Saeidi PhD Student UTRECHT UNIVERSITY.
IDENTIFYING SEMANTIC DIFFERENCES IN ASPECTJ PROGRAMS Martin Görg and Jianjun Zhao Computer Science Department, Shanghai Jiao Tong University.
Slicing AspectJ Woven Code Luca Cavallaro Mattia Monga Antonio Castaldo D'Ursi Davide Balzarotti Politecnico di Milano.
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’’,
CASE/Re-factoring and program slicing
Lecture Notes - Copyright © S. C. Kothari, All rights reserved.1 Efficient Debugging CPRE 556 Lecture 19.
Software Engineering Research Group, Graduate School of Engineering Science, Osaka University A Slicing Method for Object-Oriented Programs Using Lightweight.
CEN 4072 Software Testing PPT7: Deducing errors.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Program Slicing Techniques CSE 6329 Spring 2013 Parikksit Bhisay
1 Software Testing & Quality Assurance Lecture 13 Created by: Paulo Alencar Modified by: Frank Xu.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
CS223: Software Engineering Lecture 26: Software Testing.
Phoenix Based Dynamic Slicing Debugging Tool Eric Cheng Lin Xu Matt Gruskin Ravi Ramaseshan Microsoft Phoenix Intern Team (Summer '06)
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
CS223: Software Engineering
Software Testing.
SwE 455 Program Slicing.
Mark Weiser University of Maryland, College Park IEEE CHI, 1981
A Survey of Program Slicing Techniques: Section 4
Program Slicing Baishakhi Ray University of Virginia
Chapter 10 Data Flow Testing Slice Testing
S. Ramesh Mangala Gowri Nanda Slicing Concurrent Programs
CPRE 416-Software Evolution and Maintenance-Lecture 11
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:

Introduction to Program Slicing Presenter: M. Amin Alipour Software Design Laboratory

Outline What is program slicing Classifications Basic Concepts Basic Algorithms Challenges Applications

History Programs Slicing was introduced by Mark Weiser as his PhD thesis. He argued that a programmer intuitively tries to slice a program to debug it.

Mark D. Weiser (July 23, 1952 – April 27, 1999) He was a chief scientist at Xerox PARC. Weiser is widely considered to be the father of ubiquitous computing, a term he coined in 1988.

What is program slicing? Informal: “which statements affect value v in statement s” Formal: – ”For statement s and variable v, the slice of program P with respect to the slicing criterion includes only those statements of P needed to capture the behavior of v at s.”

Example Read(n) I = 1 Sum = 0 Product = 1 While I<=n do sum = sum + I product = product + I I = I + 1 Endwhile Write(sum) Write(product) Source Code Read(n) I = 1 Product = 1 While I<=n do product = product + I I = I + 1 Endwhile Write(product) Slice for “product” at last statement

Basic Concepts Control flow graph – A graph which each node is associated with a statement and the edges represent the flow of control. – Each node n is associated with two sets REF(n) and DEF(n)

Example

Example Contd.

Basic Concepts-contd Program Dependence Graph (PDG) – The vertices of the PDG corresponds to the statements and control predicates, – The edges corresponds to data and control dependencies. – It has several variants.

PDG Example

Classifications Static Slicing vs. Dynamic Slicing vs. Amorphous Executable vs. Closure Forward vs. Backward vs. Chopping

Basic Algorithms Data Flow Equations Information flow relations Dependence graph approaches

Data Flow Equations Statement-minimal slices: – Slices which no other slices for the same criterion contains fewer statements. Problem of finding minimal slices is undecidable. Uses equations alliteratively until it stablizes.

Example of Equations

Example: Relevant Sets for

Information-flow relations are computed in a syntax-directed, bottom- up manner. For a statement (or sequence of statements) S, a variable v, and an expression (i.e., a control predicate or the right-hand side of an assignment) e that occurs in S, the relations, λ, ρ and μ are defined.

Information-Flow Relation

Information-Flow Relation- contd

PDG Example

Challenges Unstructured programs – It changes the control flow of program. Interprocedural Slicing – Side-effects on global data and Call by references Arrays and Pointers – How can determine if a variable is defined or referenced by a pointer – Having A[f(i)] and A[f(j)], Can f(i)=f(j)?

Concurrency – It introduces three more dependencies: interference dependence parallel dependence synchronization dependence. Size – In almost all applications of program slicing, the smaller the slice the better.

Applications Debuging – Finding set of statements that changes a variable of concern. Software Maintenance – Slicing helps in understanding of existing software and making changes without having a negative impact. Testing – Helps in regression test.

Applications- Cont’d Differencing – To capture semantic differences between two programs...

Some Slicing Tools Wisconsin Program Slicer (CodeSurfer) – It can perform forwards and backwards slicing and chopping of C programs. Unravel – It perform static backward slicing of C programs. Kaveri – It performs static forward and backward slicing and chopping of Java programs.

References David Binkley, Keith Brian Gallagher: Program Slicing. Advances in Computers 43: 1-50 (1996) K. Gallagher and D. Binkley. Program Slicing. Frontiers of Software Maintenance, Beijing, China, October 1-4, Tip, F A Survey of Program Slicing Techniques.. Technical Report. UMI Order Number: CS-R9438., CWI (Centre for Mathematics and Computer Science).