skip to main content
10.1145/2676726.2676968acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Quantitative Interprocedural Analysis

Published:14 January 2015Publication History

ABSTRACT

We consider the quantitative analysis problem for interprocedural control-flow graphs (ICFGs). The input consists of an ICFG, a positive weight function that assigns every transition a positive integer-valued number, and a labelling of the transitions (events) as good, bad, and neutral events. The weight function assigns to each transition a numerical value that represents a measure of how good or bad an event is. The quantitative analysis problem asks whether there is a run of the ICFG where the ratio of the sum of the numerical weights of good events versus the sum of weights of bad events in the long-run is at least a given threshold (or equivalently, to compute the maximal ratio among all valid paths in the ICFG). The quantitative analysis problem for ICFGs can be solved in polynomial time, and we present an efficient and practical algorithm for the problem.

We show that several problems relevant for static program analysis, such as estimating the worst-case execution time of a program or the average energy consumption of a mobile application, can be modeled in our framework. We have implemented our algorithm as a tool in the Java Soot framework. We demonstrate the effectiveness of our approach with two case studies. First, we show that our framework provides a sound approach (no false positives) for the analysis of inefficiently-used containers. Second, we show that our approach can also be used for static profiling of programs which reasons about methods that are frequently invoked. Our experimental results show that our tool scales to relatively large benchmarks, and discovers relevant and useful information that can be used to optimize performance of the programs.

Skip Supplemental Material Section

Supplemental Material

p539-sidebyside.mpg

mpg

745.6 MB

References

  1. G. M. Amdahl. Validity of the single processor approach to achieving large scale computing capabilities. In Proceedings of the April 18--20, 1967, spring joint computer conference, pages 483--485. ACM, 1967. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. T. Ball and J. R. Larus. Branch prediction for free. In PLDI, pages 300--313, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. H. Bjorklund, S. Sandberg, and S. Vorobyov. A combinatorial strongly subexponential strategy improvement algorithm for mean payoff games. In MFCS'04, pages 673--685, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  4. S. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The dacapo benchmarks: java benchmarking development and analysis. SIGPLAN Not., 41(10):169--190, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. R. Bloem, K. Chatterjee, T. A. Henzinger, and B. Jobstmann. Better quality in synthesis through quantitative objectives. In CAV, pages 140--156, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. R. Bloem, K. Greimel, T. A. Henzinger, and B. Jobstmann. Synthesizing robust systems. In FMCAD, pages 85--92, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  7. E. Bodden, A. Sewe, J. Sinschek, M. Mezini, and H. Oueslati. Taming reflection: Aiding static analysis in the presence of reflection and custom class loaders. In ICSE '11, pages 241--250. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. S. Boddy. Anytime problem solving using dynamic programming. In AAAI, pages 738--743, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. U. Boker, K. Chatterjee, T. A. Henzinger, and O. Kupferman. Temporal specifications with accumulative values. In LICS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Bouajjani, J. Esparza, and T. Touili. A generic approach to the static analysis of concurrent programs with procedures. In POPL, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Carroll and G. Heiser. An analysis of power consumption in a smartphone. In USENIX, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Cerny, T. A. Henzinger, and A. Radhakrishna. Quantitative abstraction refinement. In POPL, pages 115--128, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. K. Chatterjee, L. Doyen, and T. A. Henzinger. Quantitative languages. ACM Trans. Comput. Log., 11(4), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. K. Chatterjee and Y. Velner. Mean-payoff pushdown games. In LICS, pages 195--204, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. TheMITPress, 3rd edition, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In POPL, pages 238--252, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Droste and I. Meinecke. Describing average- and longtimebehavior by weighted MSO logics. In MFCS, pages 537--548, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. B. Dufour, B. G. Ryder, and G. Sevitsky. A scalable technique for characterizing the usage of temporaries in framework-intensive java applications. In SIGSOFT FSE, pages 59--70, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. Ehrenfeucht and J.Mycielski. Positional strategies for mean payoff games. Int. Journal of Game Theory, 8(2):109--113, 1979.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Ferdinand, F. Martin, R. Wilhelm, and M. Alt. Cache behavior prediction by abstract interpretation. Sci. Comput. Program., 99. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Filar and K. Vrieze. Competitive Markov Decision Processes. Springer-Verlag, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. L. Hennessy and D. A. Patterson. Computer Architecture, Fourth Edition: A Quantitative Approach. MorganKaufmann, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. Karp. A characterization of the minimum cycle mean in a digraph. Discrete Mathematics, 23:309--311, 1978.Google ScholarGoogle ScholarCross RefCross Ref
  24. A. Lal, T. W. Reps, and G. Balakrishnan. Extended weighted pushdown systems. In CAV, pages 434--448, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. O. Lhoták and L. J. Hendren. Scaling java points-to analysis using spark. In CC, pages 153--169, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. T. A. Liggett and S. A. Lippman. Stochastic games with perfect information and time average payoff. Siam Review, 11:604--607, 1969.Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. N. Mitchell and G. Sevitsky. The causes of bloat, the limits of health. In OOPSLA, pages 245--260, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. N. Mitchell, G. Sevitsky, and H. Srinivasan. Modeling runtime behavior in framework-based applications. In ECOOP, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. Müller-Olm and H. Seidl. Precise interprocedural analysis through linear algebra. In POPL, pages 330--341, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. G. Novark, E. D. Berger, and B. G. Zorn. Efficiently and precisely locating memory leaks and bloat. In PLDI, pages 397--407, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. T.W. Reps, S. Horwitz, and S. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In POPL, pages 49--61, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. T. W. Reps, A. Lal, and N. Kidd. Program analysis using weighted pushdown systems. In FSTTCS, pages 23--51, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. T. W. Reps, S. Schwoon, S. Jha, and D. Melski. Weighted pushdown systems and their application to interprocedural dataflow analysis. Sci. Comput. Program., 58(1--2):206--263, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. O. Shacham, M. T. Vechev, and E. Yahav. Chameleon: adaptive selection of collections. In PLDI, pages 408--418, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. A. Shankar, M. Arnold, and R. Bodík. Jolt: lightweight dynamic analysis and removal of object churn. In OOPSLA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. M. Sridharan and R. Bodík. Refinement-based context-sensitive points-to analysis for java. In PLDI, pages 387--400, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. V. Tiwari, S. Malik, and A. Wolfe. Power analysis of embedded software: a first step towards software power minimization. IEEE Trans. VLSI Syst., 2(4):437--445, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. R. Vallée-Rai, P. Co, E. Gagnon, L. Hendren, P. Lam, and V. Sundaresan. Soot - a java bytecode optimization framework. In CASCON'99.Google ScholarGoogle Scholar
  39. T. A. Wagner, V. Maverick, S. L. Graham, and M. A. Harrison. Accurate static estimators for program optimization. In PLDI, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Wikipedia. List of performance analysis tools.Google ScholarGoogle Scholar
  41. R. Wilhelm, J. Engblom, A. Ermedahl, N. Holsti, S. Thesing, D. B. Whalley, G. Bernat, C. Ferdinand, R. Heckmann, T. Mitra, F. Mueller, I. Puaut, P. P. Puschner, J. Staschulat, and P. Stenström. The worst-case execution-time problem - overview of methods and survey of tools. ACM Trans. Embedded Comput. Syst., 7(3), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Y. Wu and J. R. Larus. Static branch frequency and program profile analysis. In MICRO 27, pages 1--11. ACM, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Y. Xie, M. Naik, B. Hackett, and A. Aiken. Soundness and its role in bug detection systems. In Proc. of the Workshop on the Evaluation of Software Defect Detection Tools, 2005.Google ScholarGoogle Scholar
  44. G. H. Xu, N. Mitchell, M. Arnold, A. Rountev, E. Schonberg, and G. Sevitsky. Finding low-utility data structures. In PLDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. G. H. Xu and A. Rountev. Detecting inefficiently-used containers to avoid bloat. In PLDI, pages 160--173, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. U. Zwick and M. Paterson. The complexity of mean payoff games on graphs. Theoretical Computer Science, 158:343--359, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Quantitative Interprocedural Analysis

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          POPL '15: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
          January 2015
          716 pages
          ISBN:9781450333009
          DOI:10.1145/2676726
          • cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 50, Issue 1
            POPL '15
            January 2015
            682 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2775051
            • Editor:
            • Andy Gill
            Issue’s Table of Contents

          Copyright © 2015 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 14 January 2015

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          POPL '15 Paper Acceptance Rate52of227submissions,23%Overall Acceptance Rate824of4,130submissions,20%

          Upcoming Conference

          POPL '25

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader