Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.

Slides:



Advertisements
Similar presentations
Dataflow Analysis for Datarace-Free Programs (ESOP 11) Arnab De Joint work with Deepak DSouza and Rupesh Nasre Indian Institute of Science, Bangalore.
Advertisements

R O O T S Field-Sensitive Points-to-Analysis Eda GÜNGÖR
Link-Time Path-Sensitive Memory Redundancy Elimination Manel Fernández and Roger Espasa Computer Architecture Department Universitat.
Scalable Points-to Analysis. Rupesh Nasre. Advisor: Prof. R. Govindarajan. Comprehensive Examination. Jun 22, 2009.
Advanced Compiler Techniques LIU Xianhua School of EECS, Peking University Pointer Analysis.
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
Compilation 2011 Static Analysis Johnni Winther Michael I. Schwartzbach Aarhus University.
Pointer Analysis – Part I Mayur Naik Intel Research, Berkeley CS294 Lecture March 17, 2009.
Demand-driven Alias Analysis Implementation Based on Open64 Xiaomi An
School of EECS, Peking University “Advanced Compiler Techniques” (Fall 2011) Pointer Analysis.
Flow-Insensitive Points-to Analysis with Term and Set Constraints Presentation by Kaleem Travis Patrick.
Program Representations. Representing programs Goals.
Code Compaction of an Operating System Kernel Haifeng He, John Trimble, Somu Perianayagam, Saumya Debray, Gregory Andrews Computer Science Department.
Pointer Analysis Lecture 2 G. Ramalingam Microsoft Research, India.
Parallel Inclusion-based Points-to Analysis Mario Méndez-Lojo Augustine Mathew Keshav Pingali The University of Texas at Austin (USA) 1.
1 Practical Object-sensitive Points-to Analysis for Java Ana Milanova Atanas Rountev Barbara Ryder Rutgers University.
Parameterized Object Sensitivity for Points-to Analysis for Java Presented By: - Anand Bahety Dan Bucatanschi.
The Ant and The Grasshopper Fast and Accurate Pointer Analysis for Millions of Lines of Code Ben Hardekopf and Calvin Lin PLDI 2007 (Best Paper & Best.
Semi-Sparse Flow-Sensitive Pointer Analysis Ben Hardekopf Calvin Lin The University of Texas at Austin POPL ’09 Simplified by Eric Villasenor.
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.
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:
A Context-Sensitive Pointer Analysis Phase in Open64 Compiler Tianwei Sheng, Wenguang Chen, Weimin Zheng Tsinghua University.
Intraprocedural Points-to Analysis Flow functions:
Java Alias Analysis for Online Environments Manu Sridharan 2004 OSQ Retreat Joint work with Rastislav Bodik, Denis Gopan, Jong-Deok Choi.
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.
Recap from last time: live variables x := 5 y := x + 2 x := x + 1 y := x y...
Introduction to Optimization Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved.
Pointer and Shape Analysis Seminar Mooly Sagiv Schriber 317 Office Hours Thursday
Reps Horwitz and Sagiv 95 (RHS) Another approach to context-sensitive interprocedural analysis Express the problem as a graph reachability query Works.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
An Efficient Inclusion-Based Points-To Analysis for Strictly-Typed Languages John Whaley Monica S. Lam Computer Systems Laboratory Stanford University.
Cloning-Based Context-Sensitive Pointer Alias Analysis using BDDs John Whaley Monica Lam Stanford University June 10, 2004.
Pointer analysis. Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis Andersen and.
Distributed Constraint Optimization * some slides courtesy of P. Modi
C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure.
Control Flow Resolution in Dynamic Language Author: Štěpán Šindelář Supervisor: Filip Zavoral, Ph.D.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Fast Points-to Analysis for Languages with Structured Types Michael Jung and Sorin A. Huss Integrated Circuits and Systems Lab. Department of Computer.
Pointer Analysis Lecture 2 G. Ramalingam Microsoft Research, India.
COMPILERS Symbol Tables hussein suleman uct csc3003s 2007.
Mark Marron 1, Deepak Kapur 2, Manuel Hermenegildo 1 1 Imdea-Software (Spain) 2 University of New Mexico 1.
Compiler Principles Fall Compiler Principles Lecture 0: Local Optimizations Roman Manevich Ben-Gurion University.
Mark Marron IMDEA-Software (Madrid, Spain) 1.
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.
11th Nov 2004PLDI Region Inference for an Object-Oriented Language Wei Ngan Chin 1,2 Joint work with Florin Craciun 1, Shengchao Qin 1,2, Martin.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Pointer Analysis Lecture 2 G. Ramalingam Microsoft Research, India & K. V. Raghavan.
Pointer Analysis for Multithreaded Programs Radu Rugina and Martin Rinard M I T Laboratory for Computer Science.
Pointer Analysis – Part II CS Unification vs. Inclusion Earlier scalable pointer analysis was context- insensitive unification-based [Steensgaard.
Points-To Analysis in Almost Linear Time Josh Bauman Jason Bartkowiak CSCI 3294 OCTOBER 9, 2001.
Pointer and Escape Analysis for Multithreaded Programs Alexandru Salcianu Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology.
Pointer Analysis. Rupesh Nasre. Advisor: Prof R Govindarajan. Apr 05, 2008.
Pointer Analysis – Part I CS Pointer Analysis Answers which pointers can point to which memory locations at run-time Central to many program optimization.
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.
Points-to Analysis as a System of Linear Equations Rupesh Nasre. Computer Science and Automation Indian Institute of Science Advisor: Prof. R. Govindarajan.
1PLDI 2000 Off-line Variable Substitution for Scaling Points-to Analysis Atanas (Nasko) Rountev PROLANGS Group Rutgers University Satish Chandra Bell Labs.
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Harry Xu University of California, Irvine & Microsoft Research
Pointer Analysis Lecture 2
CSC D70: Compiler Optimization Pointer Analysis
Pointer Analysis Lecture 2
Pointer analysis.
Pointer Analysis Jeff Da Silva Sept 20, 2004 CARG.
Presentation transcript:

Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.

Outline. ● The problem. ● Background. ● Representative papers. ● Discussion: trends, similarities, differences. ● Directions for research.

The problem. Statically find out the groups of program variables, such that, all variables in a group may point to the same memory block during the program execution.

Background (1 of 7). ● Static analysis. ➢ done on static representation of a program. ➢ does not require program execution. ➢ is conservative by definition. ● Dynamic analysis. ➢ done on traces of program executions. ➢ does not cover all possible behaviors. ➢ precise for a run of the program.

Background (2 of 7). ● Clients. ➢ program transformations that depend on pointer analysis. ➢ for instance, queries related to pointers and compiler optimizations. ➢ typically, query resolution time for clients is inversely proportional to pointer analysis time.

Background (3 of 7). ● Precision. ➢ a measure of correctness for getting the required information from pointer analysis. ➢ for pointer analysis, the required information is: whether two pointers are aliases or non-aliases. ➢ dynamic analysis is precise with respect to that execution.

Background (4 of 7). ● Efficiency. ➢ amount of time taken by an algorithm. ● Scalability. ➢ asymptotic time complexity of an algorithm. An algorithm can be efficient, but not scalable.

Background (5 of 7). ● Flow-sensitivity. ➢ algorithm considers control flow in the program. ● Context-sensitivity. ➢ algorithm considers calling context of a function. ● Field-sensitivity. ➢ algorithm separates individual fields of an aggregate, from each other and from the aggregate itself.

Background (6 of 7). ● Unification-based. ➢ algorithm merges equivalence classes of variables in an assignment. ➢ less storage requirement. ➢ fast. ➢ low precision.

Background (7 of 7). ● Inclusion based (or subset based or constraint based). ➢ algorithm processes assignments directionally and each symbol is represented by a single node. ➢ more storage requirement. ➢ slower. ➢ high precision.

Representative papers (1 of 4). ● Choi et al, Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects, POPL ● Andersen, PhD Thesis, ● Burke et al, Flow-insensitive interprocedural alias analysis in the presence of pointers, LCPC ● Reps et al, Precise interprocedural dataflow analysis via graph reachability, POPL 1995.

Representative papers (2 of 4). ● Steensgaard, Points-to analysis in almost linear time, POPL ● Ghiya et al, Is it a tree, DAG, or a cyclic graph? A shape analysis for heap-directed pointers in C, PLDI ● Hind et al, Which pointer analysis should I use?, ISSTA 2000.

Representative papers (3 of 4). ● Cheng et al, Modular interprocedural pointer analysis using access paths: design, implementation, and evaluation, PLDI ● Liang et al, Evaluating the precision of static reference analysis using profiling, ISSTA ● Whaley et al, Cloning-based context-sensitive pointer alias analysis using binary decision diagrams, PLDI 2004.

Representative papers (4 of 4). ● Raman et al, Recursive data structure profiling, MSP ● Lattner et al, Making context sensitive points-to analysis with heap-cloning practical for the real world, PLDI 2007.

Discussion: similarities, differences. ● Flow-sensitive: Choi93, Ghiya96, Reps95, Whaley04. ● Context-sensitive: Andersen94, Cheng00, Ghiya96, Lattner07, Whaley04. ● Field-sensitive: Cheng00, Lattner07, Whaley04. ● Unification-based: Steensgaard96, Lattner07. ● Inclusion-based: Andersen94, Cheng00, Whaley04.

Discussion: trends (1 of 2). ● Recursion is handled using strongly-connected components. ● A recursive data structure is represented using a single representative node. ● Stack pointers are often treated in a different manner than heap pointers. ● For better precision, inclusion-based analyses are preferred. For better efficiency, unification-based analyses are preferred.

Discussion: trends (2 of 2). ● Flow-sensitivity does not improve precision to a significant extent, for, typically pointers are not reassigned and when they are, they point to the other part of the same data structure represented as a whole using a single node. ● Graph algorithms typically involve three phases: intraprocedural, bottom-up, and top-down. ● Single level of context-sensitivity proves sufficiently precise and efficient.

Discussion. ● Most of the papers differ in the techniques used to solve pointer analysis problem. ● Representation of alias information differs a lot across techniques. ➢ matrices: Ghiya96. ➢ graphs: Das00, Lattner07, Raman05, Reps95, Steensgaard96. ➢ access-paths: Cheng00. ➢ ordered binary decision diagrams: Whaley04.

Directions for research (1 of 4). ● Complex data structures. ➢ most algorithms do not handle them well. ➢ occur when large hash tables, dictionaries, symbol tables form the main data structure of a program. ➢ need to characterize complexity of a data structure. ➢ adaptive algorithm depending on the complexity.

Directions for research (2 of 4). ● Out-of-order execution for multithreaded programs. ➢ some research done for multithreaded programs. ➢ none of the papers talk about the result of out-of-order execution of instructions on aliases in multithreaded programs. ➢ instructions may be reordered by compiler or hardware.

Directions for research (3 of 4). ● Combination of techniques. ➢ no one of the techniques present is best in all aspects. ➢ hybrid approaches are necessary. ➢ one way is to combine static pointer analysis with dynamic profile information. ➢ another way is to use adaptive algorithm which internally uses different sub-algorithms invented.

Directions for research (4 of 4). ● Representation of alias information. ➢ history tells us that difference in the alias information representation often led to new algorithms. ➢ research on finding novel ways to represent aliases can be an interesting area to be explored.

Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.