Rethinking Soot for Summary-Based Whole-Program Analysis

312 views
256 views

Published on

Rethinking Soot for Summary-Based Whole-Program Analysis, SOAP'2012

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
312
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Rethinking Soot for Summary-Based Whole-Program Analysis

  1. 1. Rethinking Soot for Summary-Based Whole- Program Analysis Dacong Yan1, Guoqing Xu2, Atanas Rountev1 1 Ohio State University 2 University of California, Irvine PRESTO: Program Analyses and Software Tools Research Group, Ohio State University
  2. 2. Overview • Programs are built with reusable components – Standard libraries in Java, C++, C# – Domain-specific libraries and frameworks • Whole-program analysis – Analysis of both application and library code – Methods are analyzed under different contexts • Summary-based analysis – Pre-analysis of library code (summary generation) – Reuse result of pre-analysis (summary application) • Challenges – Carefully designed abstractions and algorithms2 – Infrastructure for summary generation and application
  3. 3. Case Study: An Alias Analysis [ISSTA’11] m(a) { c = new …; // o1 a.f = c; return c.g; } d = new …; // o2 b = m(d); // call m3
  4. 4. Case Study: An Alias Analysis [ISSTA’11] m(a) { f a sa o1 c c = new …; // o1 g a.f = c; entrym ret sf return c.g; exitm } o2 d d = new …; // o2 b sm b = m(d); // call m4
  5. 5. Case Study: An Alias Analysis [ISSTA’11] m(a) { f a sa o1 c c = new …; // o1 g a.f = c; entrym ret sf return c.g; exitm } o2 d d = new …; // o2 b sm b = m(d); // call m b alias? d5
  6. 6. Case Study: An Alias Analysis [ISSTA’11] m(a) { f a sa o1 c c = new …; // o1 g a.f = c; entrym ret sf return c.g; exitm } o2 d d = new …; // o2 b sm b = m(d); // call m b alias? d6
  7. 7. Case Study: An Alias Analysis [ISSTA’11] m(a) { f a sa o1 c c = new …; // o1 g a.f = c; entrym ret sf return c.g; exitm } o2 d d = new …; // o2 b sm b = m(d); // call m7
  8. 8. Case Study: An Alias Analysis [ISSTA’11] m(a) { f a sa o1 c c = new …; // o1 g a.f = c; entrym ret sf return c.g; exitm } o2 d d = new …; // o2 b sm b = m(d); // call m f, g summary(m): sa sg8
  9. 9. Experimental Evaluation • 19 Java programs – For all programs, more than 50% of nodes in the call graph are methods in the Java standard library – For most programs, the percentage exceeds 80% • Two experiments – Summary-based construction of program representation – Summary-based computation of graph reachability • Results – Significant potential savings in analysis running time – Additional savings limited by infrastructure9
  10. 10. Discussion • Goal: support summary-based analysis in Soot • Problems with ad-hoc extensions – Difficulty in code maintenance – Difficulty in comparing analyses – Limited benefits in summarization • Issues to consider – Configuration mechanisms – Management of summary information – Verification of summary information10
  11. 11. Discussion • Configuration mechanisms – Customization to allow summary-based analysis – Dependence between analyses • Management of summary information – Unified summary APIs – Techniques of data structure persistence – Mapping back to program entities • Verification of summary information – Consistency between summary and Jimple – Code changes11
  12. 12. Conclusion • Case study on an alias analysis • Potential savings in analysis running time with summarization • Discussion on supporting summary-based analysis – Configuration mechanisms – Management of summary information – Verification of summary information12
  13. 13. Thank you13

×