1 Integrating Influence Mechanisms into Impact Analysis for Increased Precision Ben Breech Lori Pollock Mike Tegtmeyer University of Delaware Army Research.

Slides:



Advertisements
Similar presentations
A Survey of Program Slicing Techniques A Survey of Program Slicing Techniques Sections 3.1,3.6 Swathy Shankar
Advertisements

Data-Flow Analysis II CS 671 March 13, CS 671 – Spring Data-Flow Analysis Gather conservative, approximate information about what a program.
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
Object-oriented Software Change Dynamic Impact Analysis Lulu Huang and Yeong-Tae Song Dept. of Computer and Information Sciences Towson University Towson,
Data-Flow Analysis Framework Domain – What kind of solution is the analysis looking for? Ex. Variables have not yet been defined – Algorithm assigns a.
3-Valued Logic Analyzer (TVP) Tal Lev-Ami and Mooly Sagiv.
1 1 Regression Verification for Multi-Threaded Programs Sagar Chaki, SEI-Pittsburgh Arie Gurfinkel, SEI-Pittsburgh Ofer Strichman, Technion-Haifa Originally.
The OWASP Foundation OWASP OWASP Conference 2008 Application Security – The code analysis way Maty Siman CTO Checkmarx.
 Program Slicing Long Li. Program Slicing ? It is an important way to help developers and maintainers to understand and analyze the structure.
A Regression Test Selection Technique for Aspect- Oriented Programs Guoqing Xu The Ohio State University
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,
A Comparison of Online and Dynamic Impact Analysis Algorithms Ben Breech Mike Tegtmeyer Lori Pollock University of Delaware.
RUGRAT: Runtime Test Case Generation using Dynamic Compilers Ben Breech NASA Goddard Space Flight Center Lori Pollock John Cavazos University of Delaware.
Design of a Framework for Testing Security Mechanisms for Program-Based Attacks Ben “Security” Breech and Lori Pollock University of Delaware.
Interprocedural analysis © Marcelo d’Amorim 2010.
Recap from last time We were trying to do Common Subexpression Elimination Compute expressions that are available at each program point.
Next Section: Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis (Wilson & Lam) –Unification.
Control Flow Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Administrative info Subscribe to the class mailing list –instructions are on the class web page, which is accessible from my home page, which is accessible.
Speeding Up Dataflow Analysis Using Flow- Insensitive Pointer Analysis Stephen Adams, Tom Ball, Manuvir Das Sorin Lerner, Mark Seigle Westley Weimer Microsoft.
From last time: reaching definitions For each use of a variable, determine what assignments could have set the value being read from the variable Information.
1 Control Flow Analysis Mooly Sagiv Tel Aviv University Textbook Chapter 3
Another example p := &x; *p := 5 y := x + 1;. Another example p := &x; *p := 5 y := x + 1; x := 5; *p := 3 y := x + 1; ???
Synthesis of Interface Specifications for Java Classes Rajeev Alur University of Pennsylvania Joint work with P. Cerny, G. Gupta, P. Madhusudan, W. Nam,
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Regression Test Selection for AspectJ Software Guoqing Xu and Atanas.
Michael Ernst, page 1 Improving Test Suites via Operational Abstraction Michael Ernst MIT Lab for Computer Science Joint.
Projects. Dataflow analysis Dataflow analysis: what is it? A common framework for expressing algorithms that compute information about a program Why.
From last time: reaching definitions For each use of a variable, determine what assignments could have set the value being read from the variable Information.
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 5 Data Flow Testing
Impact Analysis of Database Schema Changes Andy Maule, Wolfgang Emmerich and David S. Rosenblum London Software Systems Dept. of Computer Science, University.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
Modular Programming Chapter Value and Reference Parameters t Function declaration: void computesumave(float num1, float num2, float& sum, float&
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Class Specification Implementation Graph By: Njume Njinimbam Chi-Chang Sun.
Change Impact Analysis for AspectJ Programs Sai Zhang, Zhongxian Gu, Yu Lin and Jianjun Zhao Shanghai Jiao Tong University.
1 A Static Analysis Approach for Automatically Generating Test Cases for Web Applications Presented by: Beverly Leung Fahim Rahman.
Bug Localization with Machine Learning Techniques Wujie Zheng
Introduction to Software Testing Chapter 8.1 Building Testing Tools –Instrumentation Paul Ammann & Jeff Offutt
Which Configuration Option Should I Change? Sai Zhang, Michael D. Ernst University of Washington Presented by: Kıvanç Muşlu.
CSC3315 (Spring 2008)1 CSC 3315 Subprograms Hamid Harroud School of Science and Engineering, Akhawayn University
Chapter 11: Pointers Copyright © 2008 W. W. Norton & Company. All rights reserved. 1 Chapter 11 Pointers.
1 Program Slicing Amir Saeidi PhD Student UTRECHT UNIVERSITY.
Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,
The Fail-Safe C to Java translator Yuhki Kamijima (Tohoku Univ.)
Convergence of Model Checking & Program Analysis Philippe Giabbanelli CMPT 894 – Spring 2008.
Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,
Reducing Combinatorics in Testing Product Lines Chang Hwan Peter Kim, Don Batory, and Sarfraz Khurshid University of Texas at Austin.
Using Dynamic Compilers for Software Testing Ben Breech Lori Pollock John Cavazos.
Control Flow Graphs : The if Statement 1 if (x < y) { y = 0; x = x + 1; } else { x = y; } x >= yx < y x = y y = 0 x = x + 1 if (x < y) { y = 0;
Enabling Control over Adaptive Program Transformation for Dynamically Evolving Mobile Software Validation Mike Jochen, Anteneh Anteneh, Lori Pollock University.
Paradyn Project Paradyn / Dyninst Week Madison, Wisconsin April 12-14, 2010 Paradyn Project Safe and Efficient Instrumentation Andrew Bernat.
Precisely Selecting Regression Test for Aspect-Oriented Programs Guoqing Xu The Ohio State University
Phoenix Based Dynamic Slicing Debugging Tool Eric Cheng Lin Xu Matt Gruskin Ravi Ramaseshan Microsoft Phoenix Intern Team (Summer '06)
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.
Dataflow analysis.
Ch. 4 – Semantic Analysis Errors can arise in syntax, static semantics, dynamic semantics Some PL features are impossible or infeasible to specify in grammar.
Program Slicing Baishakhi Ray University of Virginia
Stack Memory 2 (also called Call Stack)
Dataflow analysis.
Reference Parameters.
Why did the programmer quit his job?
C. M. Overstreet Old Dominion University Spring 2006
C. M. Overstreet Old Dominion University Fall 2005
C. M. Overstreet Old Dominion University Fall 2007
SOFTWARE ENGINEERING INSTITUTE
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:

1 Integrating Influence Mechanisms into Impact Analysis for Increased Precision Ben Breech Lori Pollock Mike Tegtmeyer University of Delaware Army Research Lab

2 Background: Impact Analysis If I change function C, what other functions could be affected (impacted)? Uses Regression testing Planning changes A main B C D E GH F C

3 Background: Challenges Conservative -- impacts shouldn’t be missed Precision -- impacts should be close as possible to “true” results Efficiency -- analysis should be quick

4 Background: Impact Analysis Kinds

5 Source Code Static Analyzer Impacts Obtain conservative results + Accounts for all possible inputs and behaviors - Can give very large impact sets Bohner, Arnold 1996, Ryder and Tip, 2001, Turver and Munro, 1994

6 Background: Impact Analysis Kinds Execute Instrumented Program Post Exec Analysis Dynamic Information Impacts Input - Not conservative -- results depend on input + Give impacts related to program use Orso et al. 2003, Law and Rothermel, 2003, Breech et al. 2005, Apiwattanapong et al. 2005

7 Background: Impact Analysis Kinds Method A Method B stmt a1 stmt a2 … stmt b1 stmt b2 … Statement Level Expensive Precise Slicing

8 Background: Impact Analysis Kinds Method A Method B Method Level Less expensive Less precise Call graph traversals

9 Our Approach Augment method level analysis with some statement level information Use influence graph to capture how changes propagate Both static and dynamic analysis Goal: better results w/out large overhead

10 Example of Dynamic Impact Analysis PathImpact, Law and Rothermel, ICSE 03 A main B C D E GH F A C D F E Find Impact of G: Trace: Main G r A C F C r r D r E r D r r r x G (call graph only for demonstration)

11 Can we improve results? PathImpact is “safe” Doesn’t miss impacts among exec’d methods Purely method level What can statement level info add?

12 How do changes propagate? int G (void) { int x, y; …. if (x == 0) y = 10; else y = -10; return y; } int G (void) { int x, y; …. if (x != 0) y = 10; else y = -10; return y; } int G (void) { int x, y; …. if (x == 0) y = 10; else y = -10; return y; }

13 Insight: Propagation of Changes Change propagates through variables Change propagates into methods by parameters/return values Global variables can propagate change

14 Example Revisited A main B C D E GH F A C D F E Find Impact of G: Trace: Main G r A C F C r r D r E r D r r r x G Assume: No Global Variables in program C has no parameters/return vals

15 Basis of Approach: Influence Graph Formalize ideas in influence graph Nodes are methods Edge p  q change can propagate from p to q 3 Types of edges Parameters/returns by value Parameters/returns by reference Global variables

16 Influence Graph Example A main B C D E G H F A C G int G (void) v int H (int x) H v void A (struct_type &x) r void C (void) r v, r r r r: ref. edge v: val. edge (none): call edge (demo only)

17 Conservative Assumptions Building influence graph Ignore const Ref. Parameters always modified Function pointers  edges to all functions with address taken

18 Dynamic Impact Analysis with the Influence Graph Generate influence graph statically Perform impact analysis for function of interest Intuition: Check influence graph at each call/return to see if change can propagate Global variables require more book keeping (details in paper)

19 Example A main B C D E G H F EC D v v r r v, r r r Trace: Main G r A C F C r r D r E r D r r r x Find Impact of C: r: ref. edge v: val. edge

20 Research Questions Is the impact analysis cost reasonable? Does the dynamic analysis give more precision than current techniques?

21 Methodology Analyzed 8 medium sized C programs (5, ,000 LoC) Created gcc passes to build influence graph (little overhead) Generated traces 8KB - 9 GB

22 Timing Results Influence Graph - little overhead to build Impact Analysis on 9 GB trace ~ 7 mins PathImpact ~ 5mins Reasonable time for analysis

23 Precision Results avgminmax 008.espresso5.8 (3.8%) go1.0 (0.3%) li4.9 (4.6%) ijpeg0 (0%) vortex2.7 (1%) gzip1.0 (2%) twolf1.6 (2%)03 Space4.3 (18%)135 Always subset of PathImpact ~ 4% savings

24 Why so little precision gain? Changes propagated due to parameters/returns (esp. reference) Conservatively assumed all reference vars were modified Large percentage of functions with ref. vars Performed basic analysis to build infl. graph

25 Better Results? (new work!) More static program analysis  better influence graph  better precision Danger: more static analysis, more expensive build influence graph Analyzed small program by hand Got 10% gain when using def-use pairs

26 Summary and Future Work Can improve method level impact analysis by using some statement level information Reasonable impact analysis time Reasonable to spend time building better influence graph?