Evaluating the Precision of Static Reference Analysis Using Profiling Maikel Pennings, Donglin Liang, Mary Jean Harrold Georgia Institute of Technology.

Slides:



Advertisements
Similar presentations
Runtime Techniques for Efficient and Reliable Program Execution Harry Xu CS 295 Winter 2012.
Advertisements

Distributed Approximate Spectral Clustering for Large- Scale Datasets FEI GAO, WAEL ABD-ALMAGEED, MOHAMED HEFEEDA PRESENTED BY : BITA KAZEMI ZAHRANI 1.
Program Slicing Mark Weiser and Precise Dynamic Slicing Algorithms Xiangyu Zhang, Rajiv Gupta & Youtao Zhang Presented by Harini Ramaprasad.
Presented By: Krishna Balasubramanian
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,
Incremental Algorithms for Dispatching in Dynamically Typed Languages Yoav Zibin Technion—Israel Institute of Technology Joint work with: Yossi (Joseph)
1 Practical Object-sensitive Points-to Analysis for Java Ana Milanova Atanas Rountev Barbara Ryder Rutgers University.
OpenFOAM on a GPU-based Heterogeneous Cluster
Faculty of Computer Science LCPC 2007 Using ZBDDs in Points-to Analysis Stephen Curial Jose Nelson Amaral Department of Computing Science University of.
Parameterized Object Sensitivity for Points-to Analysis for Java Presented By: - Anand Bahety Dan Bucatanschi.
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.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Advanced Compilers CMPSCI 710.
Mayur Naik Alex Aiken John Whaley Stanford University Effective Static Race Detection for Java.
CS 312 Spring 2004 Lecture 18 Environment Model. Substitution Model Represents computation as doing substitutions for bound variables at reduction of.
Monday, 12/9/02, Slide #1 CS 106 Intro to CS 1 Monday, 12/9/02  QUESTIONS??  On HW #5 (Due 5 pm today)  Today:  Recursive functions  Reading: Chapter.
CS 312 Spring 2002 Lecture 16 The Environment Model.
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:
1 Refinement-Based Context-Sensitive Points-To Analysis for Java Manu Sridharan, Rastislav Bodík UC Berkeley PLDI 2006.
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.
Grid Load Balancing Scheduling Algorithm Based on Statistics Thinking The 9th International Conference for Young Computer Scientists Bin Lu, Hongbin Zhang.
Comparison Caller precisionCallee precisionCode bloat Inlining context-insensitive interproc Context sensitive interproc Specialization.
An Efficient Inclusion-Based Points-To Analysis for Strictly-Typed Languages John Whaley Monica S. Lam Computer Systems Laboratory Stanford University.
Pointer analysis. Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis Andersen and.
Fibonacci numbers Fibonacci numbers:Fibonacci numbers 0, 1, 1, 2, 3, 5, 8, 13, 21, 34,... where each number is the sum of the preceding two. Recursive.
Impact Analysis of Database Schema Changes Andy Maule, Wolfgang Emmerich and David S. Rosenblum London Software Systems Dept. of Computer Science, University.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University STATIC ANALYSES FOR JAVA IN THE PRESENCE OF DISTRIBUTED COMPONENTS AND.
1 Chapter 24 Developing Efficient Algorithms. 2 Executing Time Suppose two algorithms perform the same task such as search (linear search vs. binary search)
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Design and Implementation.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Type Systems CS Definitions Program analysis Discovering facts about programs. Dynamic analysis Program analysis by using program executions.
Pointer Analysis Lecture 2 G. Ramalingam Microsoft Research, India.
Mark Marron 1, Deepak Kapur 2, Manuel Hermenegildo 1 1 Imdea-Software (Spain) 2 University of New Mexico 1.
Static Detection of Loop-Invariant Data Structures Harry Xu, Tony Yan, and Nasko Rountev University of California, Irvine Ohio State University 1.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Efficient Checkpointing of Java Software using Context-Sensitive Capture.
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.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.
Aspect Mining Jin Huang Huazhong University of Science & Technology, China
Pointer Analysis for Multithreaded Programs Radu Rugina and Martin Rinard M I T Laboratory for Computer Science.
Points-To Analysis in Almost Linear Time Josh Bauman Jason Bartkowiak CSCI 3294 OCTOBER 9, 2001.
Rounding scheme if r * j  1 then r j := 1  When the number of processors assigned in the continuous solution is between 0 and 1 for each task, the speed.
Model-based learning: Theory and an application to sequence learning P.O. Box 49, 1525, Budapest, Hungary Zoltán Somogyvári.
Recurrence Relations Analyzing the performance of recursive algorithms.
CS 343 presentation Concrete Type Inference Department of Computer Science Stanford University.
Pointer Analysis – Part I CS Pointer Analysis Answers which pointers can point to which memory locations at run-time Central to many program optimization.
Rigid Body Dynamics: A Graphical Simulation Eugene Paik
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.
ReIm & ReImInfer: Checking and Inference of Reference Immutability and Method Purity Wei Huang 1, Ana Milanova 1, Werner Dietl 2, Michael D. Ernst 2 1.
COP INTERMEDIATE JAVA Recursion. The term “recursion” refers to the fact that the same computation recurs, or occurs repeatedly, as a problem is.
1 Iterative Program Analysis Mooly Sagiv Tel Aviv University Textbook: Principles of Program.
Object Naming Analysis for Reverse- Engineered Sequence Diagrams Atanas (Nasko) Rountev Beth Harkness Connell Ohio State University.
Load Balancing : The Goal Given a collection of tasks comprising a computation and a set of computers on which these tasks may be executed, find the mapping.
Pick Your Contexts Well: Understanding Object-Sensitivity The Making of a Precise and Scalable Pointer Analysis Yannis Smaragdakis University of Massachusetts,
Inter-procedural analysis
INFORMATION-FLOW ANALYSIS OF ANDROID APPLICATIONS IN DROIDSAFE JARED YOUNG.
Making k-Object-Sensitive Pointer Analysis More Precise with Still k-Limiting Tian Tan, Yue Li and Jingling Xue SAS 2016 September,
Functions.
WEISS Planning Support System
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.
Points-to Analysis for Java Using Annotated Constraints
A Survey of Program Slicing Techniques: Section 4
Evaluation Objective vs. subjective Matching representation to:

Market-based Dynamic Task Allocation in Mobile Surveillance Systems
L. Glimcher, R. Jin, G. Agrawal Presented by: Leo Glimcher
Presentation transcript:

Evaluating the Precision of Static Reference Analysis Using Profiling Maikel Pennings, Donglin Liang, Mary Jean Harrold Georgia Institute of Technology Supported by NSF CCR , CCR , EIA , Boeing Aerospace Corp, State of Georgia Yamacraw Misson

Static Reference Analysis Task 1: Identify instances using static names (naming scheme) 1.A createA() { 2. return new A(); 3.} 4. … 5. p = createA(); 6. q = createA(); 1.Use allocation site (level 0) p and q point to a2 2.Use allocation site + N top most call sites (level N) p points to a2-5 q points to a2-6 3.Use allocation site + the allocation site for the receiver of the most recent call site

Static Reference Analysis Task 2: Determine the points-to set for each reference field or reference variable 1.p = new A(); 2.p.m(); 3.p = new A(); Flow-sensitive vs. flow- insensitive Calling-context-sensitive vs. calling-context-insensitive Object-sensitive vs. object- insensitive

Evaluation Framework Subject program JVM Profiler Static reference analysis eventsdynamic information reference information

Evaluation Framework Subject program JVM Profiler Static reference analysis eventsdynamic information reference information Mapping instances to static names reference profile

Comparison of the Information … p.m(); // C1 for (I=0;I<2;I++) { p = new A(); // C2 if (I==0) p.m1(); // C3 else p.m2(); // C4 }

Comparison of the Information C1C1 C2C2 C3C3 C4C4 i1i1 XX i2i2 XX NXXX NXXXX Dynamic information Reference profile Reference information … p.m(); // C1 for (I=0;I<2;I++) { p = new A(); // C2 if (I==0) p.m1(); // C3 else p.m2(); // C4 } Instances are identified using allocation site only

Comparison of the Information C1C1 C2C2 C3C3 C4C4 i1i1 XX i2i2 XX NXXX NXXXX Dynamic information Reference profile Reference information Instances are identified using allocation site only Study 1: Effectiveness Study 2: Precision

Subjects ProgramLocs#Class #Reached methods #Covered methods Java_cup (77%) Jess (78%) Sablecc (86%)

1: Evaluate Naming Schemes Compute a precision reference value PRV[i] for each instance i C1C1 C2C2 C3C3 C4C4 PRV i1i1 XX0.67 i2i2 XX NXXX Dynamic information Reference profile

Distribution of PRVs for Instances Java_cupJessSablecc

Effectiveness at Allocation Sites Compute the average of the PRVs for instances allocated at each allocation site Let I(a) = {instances allocated at allocation site a}  i in I(a) PRV[ i ] I(a) Average PRV for allocation site a

Average PRVs for Allocation Sites (0.0,0.2)[0.2,0.4)[0.4,0.6)[0.6,0.8)[0.8,1.0)1.0 Java_ cup Level Level Level Level Jess Level Level Level Level Sablecc Level Level Level Level

Case Study (0.0,0.2)[0.2,0.4)[0.4,0.6)[0.6,0.8)[0.8,1.0)1.0 Java_ cup Level Level Level Level Java_cup.lalr_item Java_cup.lalr_item_set Java_cup.terminal_set Java.lang.Vector

Comparison of the Information C1C1 C2C2 C3C3 C4C4 i1i1 XX i2i2 XX NXXX NXXXX Dynamic information Reference profile Reference information Instances are identified using allocation site only Study 1: Effectiveness Study 2: Precision

Andersen’s Algorithm Overview Identifies instances using only allocation sites (level-0 naming scheme) Context-insensitive and flow-insensitive. Our implementation Context-sensitive and model-based approach for calls to methods of library classes (e.g., Vector, Map, Set) Avoids analyzing library methods (more efficient) Computes more precise information for programs that use library classes

2: Evaluate Andersen’s Algorithm Compute a precision reference value PRV[A] for each allocation site A C1C1 C2C2 C3C3 C4C4 PRV AXXX0.75 AXXXX Reference profile Reference information

Distribution of PRVs

Case Study Total 74 allocation sites whose precision reference values are in (0,0.1) Jess.Context 3 Jess.Funcall 1 Jess.FuncallValue 6 Jess.IntArrayValue 1 Jess.Value 51 Jess.ValueVector 6 Jess.Variable 6

Conclusion Study 1: Effectiveness of naming schemes Using allocation sites may be effective for instances allocated at many allocation sites Using allocation sites + N most recent call sites may increase the effectiveness The naming schemes may be ineffective for instances used for recursive data structures. Study 2: Precision of Andersen’s algorithm Andersen’s algorithm can be imprecise for many allocation sites, especially when instances are allocated to construct recursive data structures

Future work Perform further empirical and case studies More subjects More test cases Develop more effective naming schemes Use insight to develop better reference analysis techniques

QUESTIONS?