ESEC/FSE-99 1 Data-Flow Analysis of Program Fragments Atanas Rountev 1 Barbara G. Ryder 1 William Landi 2 1 Department of Computer Science, Rutgers University.

Slides:



Advertisements
Similar presentations
ASSUMPTION HIERARCHY FOR A CHA CALL GRAPH CONSTRUCTION ALGORITHM JASON SAWIN & ATANAS ROUNTEV.
Advertisements

Data Flow Analysis. Goal: make assertions about the data usage in a program Use these assertions to determine if and when optimizations are legal Local:
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
Pointer Analysis – Part I Mayur Naik Intel Research, Berkeley CS294 Lecture March 17, 2009.
Data-Flow Analysis Framework Domain – What kind of solution is the analysis looking for? Ex. Variables have not yet been defined – Algorithm assigns a.
School of EECS, Peking University “Advanced Compiler Techniques” (Fall 2011) Pointer Analysis.
Whole-Program Linear-Constant Analysis with Applications to Link-Time Optimization Ludo Van Put – Dominique Chanet – Koen De Bosschere Ghent University.
(c) 2007 Mauro Pezzè & Michal Young Ch 6, slide 1 Dependence and Data Flow Models.
Code Compaction of an Operating System Kernel Haifeng He, John Trimble, Somu Perianayagam, Saumya Debray, Gregory Andrews Computer Science Department.
1 Practical Object-sensitive Points-to Analysis for Java Ana Milanova Atanas Rountev Barbara Ryder Rutgers University.
Interprocedural analysis © Marcelo d’Amorim 2010.
Static Analysis of Embedded C Code John Regehr University of Utah Joint work with Nathan Cooprider.
Pointer and Shape Analysis Seminar Context-sensitive points-to analysis: is it worth it? Article by Ondřej Lhoták & Laurie Hendren from McGill University.
Next Section: Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis (Wilson & Lam) –Unification.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Advanced Compilers CMPSCI 710.
Speeding Up Dataflow Analysis Using Flow- Insensitive Pointer Analysis Stephen Adams, Tom Ball, Manuvir Das Sorin Lerner, Mark Seigle Westley Weimer Microsoft.
Interprocedural pointer analysis for C We’ll look at Wilson & Lam PLDI 95, and focus on two problems solved by this paper: –how to represent pointer information.
Static Program Analysis Xiangyu Zhang The slides are compiled from Alex Aiken’s Michael D. Ernst’s Sorin Lerner’s.
Scaling CFL-Reachability-Based Points- To Analysis Using Context-Sensitive Must-Not-Alias Analysis Guoqing Xu, Atanas Rountev, Manu Sridharan Ohio State.
Range Analysis. Intraprocedural Points-to Analysis Want to compute may-points-to information Lattice:
Intraprocedural Points-to Analysis Flow functions:
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Advanced Compilers CMPSCI 710.
Swerve: Semester in Review. Topics  Symbolic pointer analysis  Model checking –C programs –Abstract counterexamples  Symbolic simulation and execution.
ESP [Das et al PLDI 2002] Interface usage rules in documentation –Order of operations, data access –Resource management –Incomplete, wordy, not checked.
Comparison Caller precisionCallee precisionCode bloat Inlining context-insensitive interproc Context sensitive interproc Specialization.
Reps Horwitz and Sagiv 95 (RHS) Another approach to context-sensitive interprocedural analysis Express the problem as a graph reachability query Works.
An Efficient Inclusion-Based Points-To Analysis for Strictly-Typed Languages John Whaley Monica S. Lam Computer Systems Laboratory Stanford University.
Prof. Aiken CS 294 Lecture 11 Program Analysis. Prof. Aiken CS 294 Lecture 12 The Purpose of this Course How are the following related? –Program analysis.
Pointer analysis. Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis Andersen and.
Symbolic Path Simulation in Path-Sensitive Dataflow Analysis Hari Hampapuram Jason Yue Yang Manuvir Das Center for Software Excellence (CSE) Microsoft.
Constant Propagation. The constant propagation framework is different from all the data-flow problems discussed so far, in that It has an unbounded set.
Impact Analysis of Database Schema Changes Andy Maule, Wolfgang Emmerich and David S. Rosenblum London Software Systems Dept. of Computer Science, University.
A Conservative Algorithm for Computing the Flow of Permissions in Java Programs Gleb Naumovich Polytechnic University Brooklyn, USA Presented by David.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University STATIC ANALYSES FOR JAVA IN THE PRESENCE OF DISTRIBUTED COMPONENTS AND.
PRESTO Research Group, Ohio State University Interprocedural Dataflow Analysis in the Presence of Large Libraries Atanas (Nasko) Rountev Scott Kagan Ohio.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
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.
Rethinking Soot for Summary-Based Whole- Program Analysis PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Dacong Yan.
Pointer Analysis Lecture 2 G. Ramalingam Microsoft Research, India.
CBSE'051 Component-Level Dataflow Analysis Atanas (Nasko) Rountev Ohio State University.
Adapting Side-Effects Analysis for Modular Program Model Checking M.S. Defense Oksana Tkachuk Major Professor: Matthew Dwyer Support US National Science.
Dataflow Analysis for Concurrent Programs using Datarace Detection Ravi Chugh, Jan W. Voung, Ranjit Jhala, Sorin Lerner LBA Reading Group Michelle Goodstein.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Using Types to Analyze and Optimize Object-Oriented Programs By: Amer Diwan Presented By: Jess Martin, Noah Wallace, and Will von Rosenberg.
Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.
Pointer Analysis Lecture 2 G. Ramalingam Microsoft Research, India & K. V. Raghavan.
Escape Analysis for Java Will von Rosenberg Noah Wallace.
Pointer Analysis – Part I CS Pointer Analysis Answers which pointers can point to which memory locations at run-time Central to many program optimization.
Constructing Accurate Application Call Graphs For Java To Model Library Callbacks Weilei Zhang, Barbara Ryder Department of Computer Science Rutgers University.
5/7/03ICSE Fragment Class Analysis for Testing of Polymorphism in Java Software Atanas (Nasko) Rountev Ohio State University Ana Milanova Barbara.
D A C U C P Speculative Alias Analysis for Executable Code Manel Fernández and Roger Espasa Computer Architecture Department Universitat Politècnica de.
Sept 12ICSM'041 Precise Identification of Side-Effect-Free Methods in Java Atanas (Nasko) Rountev Ohio State University.
1 Iterative Program Analysis Abstract Interpretation Mooly Sagiv Tel Aviv University Textbook:
Points-to Analysis as a System of Linear Equations Rupesh Nasre. Computer Science and Automation Indian Institute of Science Advisor: Prof. R. Govindarajan.
3/6/20161 WHIRL SSA: A New Optimization Infrastructure for Open64 Keqiao Yang, Zhemin Yang Parallel Processing Institute, Fudan University, Shanghai Hui.
Data Flow Analysis II AModel Checking and Abstract Interpretation Feb. 2, 2011.
1PLDI 2000 Off-line Variable Substitution for Scaling Points-to Analysis Atanas (Nasko) Rountev PROLANGS Group Rutgers University Satish Chandra Bell Labs.
Inter-procedural analysis
Credible Compilation With Pointers Martin Rinard and Darko Marinov Laboratory for Computer Science Massachusetts Institute of Technology.
Static Analysis of Object References in RMI-based Java Software
Atanas (Nasko) Rountev Barbara G. Ryder Rutgers University
Points-to Analysis for Java Using Annotated Constraints
Data Flow Testing.
Design-Driven Compilation
Wei Le and Mary Lou Soffa University of Virginia
Demand-Driven Context-Sensitive Alias Analysis for Java
Sudipto Ghosh CS 406 Fall 99 November 16, 1999
Pointer analysis.
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:

ESEC/FSE-99 1 Data-Flow Analysis of Program Fragments Atanas Rountev 1 Barbara G. Ryder 1 William Landi 2 1 Department of Computer Science, Rutgers University 2 Siemens Corporate Research Funded by NSF grants CCR , CCR and Siemens Corporate Research

ESEC/FSE-99 2 Overview Motivation Theoretical model Application for pointer alias analysis Experimental results

ESEC/FSE-99 3 Data-Flow Analysis Information about program behavior Defines: –Graph for the control-flow structure –Lattice L of data-flow values –Transfer functions f i : L  L Flow sensitivity: propagate data-flow values by respecting execution order of statements

ESEC/FSE-99 4 Limitations of Whole-Program Analysis Traditionally designed as whole-program analysis Precise analyses do not scale for large programs Incomplete programs cannot be analyzed: e.g., programs with libraries Information may be needed only for a small part of a large program

ESEC/FSE-99 5 Fragment Data-Flow Analysis Idea: analyze a program fragment instead of a whole program Use summary information about the rest of the program Advantages: –Analyze fragments of large programs –Analyze incomplete programs –Analyze only the “interesting part” of the program

ESEC/FSE-99 6 Questions What is the analysis structure? What is the relationship to whole-program analysis? How to define and ensure safety? What factors affect analysis cost and precision?

ESEC/FSE-99 7 Model of Whole-Program Analysis Consider only flow-sensitive analysis Interprocedural control-flow graph: Lattice L of data-flow values Node transfer functions f i : L  L Solutions and safety Call Return Exit Entry Return Call Procedure

ESEC/FSE-99 8 Fragment Analysis Structure Input: fragment + whole-program information Graph, lattice, node transfer functions Boundary nodes: entry, call, return Boundary entry: summary value from Boundary call: summary function CallExit Entry Return CallEntryCall Fragment

ESEC/FSE-99 9 Fragment Analysis Safety All possible containing programs: p  Progs Abstraction relation If, then safely abstracts x A safe solution safely abstracts the most precise whole-program solution for every p Sufficient requirements for analysis safety: transfer functions, boundary summaries

ESEC/FSE An Application Initial whole-program flow-insensitive analysis Fragment analysis input –Flow-insensitive solution –Call graph Use flow-insensitive solution at the boundary Two fragment pointer alias analyses

ESEC/FSE Pointer Alias Analysis Aliases refer to the same memory location Example: p = &x; (*p,x) Whole-program flow- and context-sensitive analysis [Landi-Ryder] Fixed and non-fixed locations: x, s.f, *p, p  g Resolution of through-deref assignments Example: *p = 0;

ESEC/FSE Fragment Alias Analyses Input: whole-program flow-insensitive solution –Flow-insensitive analysis: almost linear time [Steensgaard, Zhang-Ryder-Landi] Basic analysis: assumptions at boundary Extended analysis: include called procedures; no boundary calls

ESEC/FSE Experiments Sun Sparc-20, 75 MHz, 352 MB 6 data programs: 8K - 25K LOC 12 fragments: –Cohesive subsets of procedures implementing certain functionality –Size: 2%-22% of program size, median 7% Resolved through-deref assignments –Metric: average number of modified fixed locations

ESEC/FSE Analysis Precision

ESEC/FSE Analysis Time Flow-insensitive analysis –Range: 2-9 s –Median: 7 s Basic analysis –Range: s –Median: 52 s Extended analysis –Range: s –Median: 85 s

ESEC/FSE Summary Fragment analysis as an alternative to whole- program analysis Theoretical issues of safety and feasibility Application using inexpensive whole-program analysis Initial experiments –Extended analysis: significant precision increase at a practical cost Ongoing work: scalability, incomplete programs

ESEC/FSE The New Lattice What is the set of names? Number of names should not depend on the size of the whole program Each whole-program name is: –preserved –ignored –represented by a placeholder One placeholder name per equivalence class

ESEC/FSE Fragment Sizes