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.
Supplemental Material
- 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 Scholar
Digital Library
- T. Ball and J. R. Larus. Branch prediction for free. In PLDI, pages 300--313, 1993. Google Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- R. Bloem, K. Chatterjee, T. A. Henzinger, and B. Jobstmann. Better quality in synthesis through quantitative objectives. In CAV, pages 140--156, 2009. Google Scholar
Digital Library
- R. Bloem, K. Greimel, T. A. Henzinger, and B. Jobstmann. Synthesizing robust systems. In FMCAD, pages 85--92, 2009.Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- M. S. Boddy. Anytime problem solving using dynamic programming. In AAAI, pages 738--743, 1991. Google Scholar
Digital Library
- U. Boker, K. Chatterjee, T. A. Henzinger, and O. Kupferman. Temporal specifications with accumulative values. In LICS, 2011. Google Scholar
Digital Library
- A. Bouajjani, J. Esparza, and T. Touili. A generic approach to the static analysis of concurrent programs with procedures. In POPL, 2003. Google Scholar
Digital Library
- A. Carroll and G. Heiser. An analysis of power consumption in a smartphone. In USENIX, 2010. Google Scholar
Digital Library
- P. Cerny, T. A. Henzinger, and A. Radhakrishna. Quantitative abstraction refinement. In POPL, pages 115--128, 2013. Google Scholar
Digital Library
- K. Chatterjee, L. Doyen, and T. A. Henzinger. Quantitative languages. ACM Trans. Comput. Log., 11(4), 2010. Google Scholar
Digital Library
- K. Chatterjee and Y. Velner. Mean-payoff pushdown games. In LICS, pages 195--204, 2012. Google Scholar
Digital Library
- T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. TheMITPress, 3rd edition, 2009. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- M. Droste and I. Meinecke. Describing average- and longtimebehavior by weighted MSO logics. In MFCS, pages 537--548, 2010. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- A. Ehrenfeucht and J.Mycielski. Positional strategies for mean payoff games. Int. Journal of Game Theory, 8(2):109--113, 1979.Google Scholar
Cross Ref
- C. Ferdinand, F. Martin, R. Wilhelm, and M. Alt. Cache behavior prediction by abstract interpretation. Sci. Comput. Program., 99. Google Scholar
Digital Library
- J. Filar and K. Vrieze. Competitive Markov Decision Processes. Springer-Verlag, 1997. Google Scholar
Digital Library
- J. L. Hennessy and D. A. Patterson. Computer Architecture, Fourth Edition: A Quantitative Approach. MorganKaufmann, 2006. Google Scholar
Digital Library
- R. Karp. A characterization of the minimum cycle mean in a digraph. Discrete Mathematics, 23:309--311, 1978.Google Scholar
Cross Ref
- A. Lal, T. W. Reps, and G. Balakrishnan. Extended weighted pushdown systems. In CAV, pages 434--448, 2005. Google Scholar
Digital Library
- O. Lhoták and L. J. Hendren. Scaling java points-to analysis using spark. In CC, pages 153--169, 2003. Google Scholar
Digital Library
- T. A. Liggett and S. A. Lippman. Stochastic games with perfect information and time average payoff. Siam Review, 11:604--607, 1969.Google Scholar
Digital Library
- N. Mitchell and G. Sevitsky. The causes of bloat, the limits of health. In OOPSLA, pages 245--260, 2007. Google Scholar
Digital Library
- N. Mitchell, G. Sevitsky, and H. Srinivasan. Modeling runtime behavior in framework-based applications. In ECOOP, 2006. Google Scholar
Digital Library
- M. Müller-Olm and H. Seidl. Precise interprocedural analysis through linear algebra. In POPL, pages 330--341, 2004. Google Scholar
Digital Library
- G. Novark, E. D. Berger, and B. G. Zorn. Efficiently and precisely locating memory leaks and bloat. In PLDI, pages 397--407, 2009. Google Scholar
Digital Library
- T.W. Reps, S. Horwitz, and S. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In POPL, pages 49--61, 1995. Google Scholar
Digital Library
- T. W. Reps, A. Lal, and N. Kidd. Program analysis using weighted pushdown systems. In FSTTCS, pages 23--51, 2007. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- O. Shacham, M. T. Vechev, and E. Yahav. Chameleon: adaptive selection of collections. In PLDI, pages 408--418, 2009. Google Scholar
Digital Library
- A. Shankar, M. Arnold, and R. Bodík. Jolt: lightweight dynamic analysis and removal of object churn. In OOPSLA, 2008. Google Scholar
Digital Library
- M. Sridharan and R. Bodík. Refinement-based context-sensitive points-to analysis for java. In PLDI, pages 387--400, 2006. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- T. A. Wagner, V. Maverick, S. L. Graham, and M. A. Harrison. Accurate static estimators for program optimization. In PLDI, 1994. Google Scholar
Digital Library
- Wikipedia. List of performance analysis tools.Google Scholar
- 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 Scholar
Digital Library
- Y. Wu and J. R. Larus. Static branch frequency and program profile analysis. In MICRO 27, pages 1--11. ACM, 1994. Google Scholar
Digital Library
- 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 Scholar
- G. H. Xu, N. Mitchell, M. Arnold, A. Rountev, E. Schonberg, and G. Sevitsky. Finding low-utility data structures. In PLDI, 2010. Google Scholar
Digital Library
- G. H. Xu and A. Rountev. Detecting inefficiently-used containers to avoid bloat. In PLDI, pages 160--173, 2010. Google Scholar
Digital Library
- U. Zwick and M. Paterson. The complexity of mean payoff games on graphs. Theoretical Computer Science, 158:343--359, 1996. Google Scholar
Digital Library
Index Terms
Quantitative Interprocedural Analysis
Recommendations
On Characterizing the Data Access Complexity of Programs
Technology trends will cause data movement to account for the majority of energy expenditure and execution time on emerging computers. Therefore, computational complexity will no longer be a sufficient metric for comparing algorithms, and a fundamental ...







Comments