skip to main content
research-article
Free Access

Newtonian Program Analysis via Tensor Product

Authors Info & Claims
Published:21 March 2017Publication History
Skip Abstract Section

Abstract

Recently, Esparza et al. generalized Newton’s method—a numerical-analysis algorithm for finding roots of real-valued functions—to a method for finding fixed-points of systems of equations over semirings. Their method provides a new way to solve interprocedural dataflow-analysis problems. As in its real-valued counterpart, each iteration of their method solves a simpler “linearized” problem.

One of the reasons this advance is exciting is that some numerical analysts have claimed that “‘all’ effective and fast iterative [numerical] methods are forms (perhaps very disguised) of Newton’s method.” However, there is an important difference between the dataflow-analysis and numerical-analysis contexts: When Newton’s method is used in numerical-analysis problems, commutativity of multiplication is relied on to rearrange an expression of the form “a * X * b + c * X * d” into “(a*b + c*d)*X.” Equations with such expressions correspond to path problems described by regular languages. In contrast, when Newton’s method is used for interprocedural dataflow analysis, the “multiplication” operation involves function composition and hence is non-commutative: “a*X*b + c*X*d” cannot be rearranged into “(a*b + c*d)*X.” Equations with such expressions correspond to path problems described by linear context-free languages (LCFLs).

In this article, we present an improved technique for solving the LCFL sub-problems produced during successive rounds of Newton’s method. Our method applies to predicate abstraction, on which most of today’s software model checkers rely.

References

  1. T. Ball and S. K. Rajamani. 2000. Bebop: A symbolic model checker for Boolean programs. In Spin Workshop. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Bouajjani, J. Esparza, and T. Touili. 2003. A generic approach to the static analysis of concurrent programs with procedures. In POPL. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. R. E. Bryant. 1986. Graph-based algorithms for Boolean function manipulation. IEEE Trans. Comp. C-35, 6 (Aug. 1986), 677--691. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Cocke. 1970. Global common subexpression elimination. Proceedings of the Symposium on Compiler Optimization (1970). Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. P. Cousot and R. Cousot. 1978. Static determination of dynamic properties of recursive procedures. In Formal Descriptions of Programming Concepts. North-Holland.Google ScholarGoogle Scholar
  6. M. Droste, W. Kuich, and H. Vogler (Eds.). 2009. Handbook of Weighted Automata. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Elder, J. Lim, T. Sharma, T. Andersen, and T. Reps. 2014. Abstract domains of affine relations. Trans. Prog. Lang. Syst. 36, 4 (Jan. 2014). Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Esparza, S. Kiefer, and M. Luttenberger. 2008. Newton’s method for omega-continuous semirings. In ICALP. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. Esparza, S. Kiefer, and M. Luttenberger. 2010. Newtonian program analysis. J. ACM 57, 6 (2010). Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Farzan and Z. Kincaid. 2015. Compositional recurrence analysis. In FMCAD. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. P. Gallagher. 2016. Personal communication. (Oct. 2016).Google ScholarGoogle Scholar
  12. P. Ganty, R. Iosif, and F. Konečný. 2016. Underapproximation of procedure summaries for integer programs. Softw. Tools for Tech. Transfer (2016). Corrected version available as arXiv:1210.4289v3.Google ScholarGoogle Scholar
  13. S. Graf and H. Saïdi. 1997. Construction of abstract state graphs with PVS. In CAV. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. L. Graham and M. Wegman. 1976. A fast and usually linear algorithm for data flow analysis. J. ACM 23, 1 (1976), 172--202. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. N. B. B. Grathwohl, D. Kozen, and K. Mamouras. 2014. KAT + B!. In CSL-LICS. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. B. Kafle and J. P. Gallagher. 2015. Horn clause verification with convex polyhedral abstraction and tree automata-based refinement. Computer Languages, Systems 8 Structures (2015).Google ScholarGoogle Scholar
  17. B. Kafle, J. P. Gallagher, and P. Ganty. 2016. Solving non-linear Horn clauses using a linear Horn clause solver. In Proceedings of the 3rd Workshop on Horn Clauses for Verification and Synthesis.Google ScholarGoogle Scholar
  18. J. B. Kam and J. D. Ullman. 1976. Global data flow analysis and iterative algorithms. J. ACM 23, 1 (1976), 158--171. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. B. Kam and J. D. Ullman. 1977. Monotone data flow analysis frameworks. Acta Inf. 7, 3 (1977), 305--318. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. N. Kidd, A. Lal, and T. Reps. 2007. WALi: The Weighted Automaton Library. Retrieved from www.cs.wisc.edu/wpis/wpds/download.php.Google ScholarGoogle Scholar
  21. G. A. Kildall. 1973. A unified approach to global program optimization. In POPL. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Z. Kincaid, J. Breck, A. Forouhi Boroujeni, and T. Reps. 2016. Compositional Recurrence Analysis Revisited. Tech. Rep. TR-1840. Comp. Sci. Dept., Univ. of Wisconsin—Madison.Google ScholarGoogle Scholar
  23. J. Knoop and B. Steffen. 1992. The interprocedural coincidence theorem. In CC. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. E. Knuth. 1977. A generalization of Dijkstra’s algorithm. Inf. Proc. Let. 6, 1 (1977), 1--5.Google ScholarGoogle ScholarCross RefCross Ref
  25. A. Lal, N. Kidd, T. Reps, and T. Touili. 2007. Abstract error projection. In Static Analysis Symp. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. A. Lal and T. Reps. 2006. Improving pushdown system model checking. In CAV. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. A. Lal and T. Reps. 2009. Reducing concurrent analysis under a context bound to sequential analysis. Formal Methods Syst. Des. 35, 1 (2009), 73--97. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. A. Lal, T. Reps, and G. Balakrishnan. 2005. Extended weighted pushdown systems. In CAV. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. A. Lal, T. Touili, N. Kidd, and T. Reps. 2007. Interprocedural Analysis of Concurrent Programs Under a Context Bound. Tech. Rep. TR-1598. Comp. Sci. Dept., University of Wisconsin—Madison.Google ScholarGoogle Scholar
  30. A. Lal, T. Touili, N. Kidd, and T. Reps. 2008. Interprocedural analysis of concurrent programs under a context bound. In TACAS. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. G. L. Litvinov, A.Ya. Rodionov, S. N. Sergeev, and A. N. Sobolevski. 2013. Universal algorithms for solving the matrix Bellman equations over semirings. Soft Comput. 17, 10 (2013), 1767--1785. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. R. McNaughton and H. Yamada. 1960. Regular expressions and state graphs for automata. IRE Trans. Elec. Comput. 9 (1960), 39--47.Google ScholarGoogle ScholarCross RefCross Ref
  33. U. Möncke and R. Wilhelm. 1991. Grammar flow analysis. In Attribute Grammars, Applications and Systems, (Int. Summer School SAGA). 151--186. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. M. Müller-Olm and H. Seidl. 2004. Precise interprocedural analysis through linear algebra. In POPL. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. M. Müller-Olm and H. Seidl. 2005. Analysis of modular arithmetic. In ESOP.Google ScholarGoogle Scholar
  36. G. Ramalingam. 1996. Bounded Incremental Computation. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. T. Reps, S. Horwitz, and M. Sagiv. 1995. Precise interprocedural dataflow analysis via graph reachability. In POPL. 49--61. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. T. Reps, A. Lal, and N. Kidd. 2007. Program analysis using weighted pushdown systems. In FSTTCS. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. T. Reps, S. Schwoon, S. Jha, and D. Melski. 2005. Weighted pushdown systems and their application to interprocedural dataflow analysis. SCP 58, 1--2 (Oct. 2005), 206--263. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. T. Reps, E. Turetsky, and P. Prabhu. 2016. Newtonian program analysis via tensor product. In POPL. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. M. Schlund. 2016. Algebraic Systems of Fixpoint Equations over Semirings: Theory and Applications. Ph.D. Dissertation. Lehrstuhl für Informatik VII, Technischen Universität München, Munich, Germany.Google ScholarGoogle Scholar
  42. M. Schlund, M. Terepeta, and M. Luttenberger. 2013. Putting Newton into practice: A solver for polynomial equations over semirings. In LPAR.Google ScholarGoogle Scholar
  43. M. Sharir and A. Pnueli. 1981. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Applications. Prentice-Hall.Google ScholarGoogle Scholar
  44. Static Driver Verifier. 2017. Retrieved from msdn.microsoft.com/en-us/library/windows/hardware/ff552808(v=vs.85).aspx.Google ScholarGoogle Scholar
  45. R. A. Tapia. 2008. Inverse, Shifted Inverse, and Rayleigh Quotient Iteration as Newton’s Method. Retrieved from www.frequency.com/video/lecture-series-/18347021.Google ScholarGoogle Scholar
  46. R. E. Tarjan. 1981a. Fast algorithms for solving path problems. J. ACM 28, 3 (1981), 594--614. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. R. E. Tarjan. 1981b. A unified approach to path problems. J. ACM 28, 3 (1981), 577--593. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. J. D. Ullman. 1973. Fast algorithms for the elimination of common subexpressions. Acta Inf. 2 (1973), 191--213. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. J. D. Ullman and A. Van Gelder. 1986. Parallel complexity of logical query programs. In Foundations of Computer Science. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. V. Vyssotsky and P. Wegner. 1963. A graph theoretical Fortran source language analyzer. (1963). Unpublished technical report, Bell Labs, Murray-Hill, NJ (as cited in Aho et al., “Compilers: Principles, Techniques, and Tools,” Addison-Wesley, 1986). Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. M. Yannakakis. 1990. Graph-theoretic methods in database theory. In PODS. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Newtonian Program Analysis via Tensor Product

                      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

                      Full Access

                      • Published in

                        cover image ACM Transactions on Programming Languages and Systems
                        ACM Transactions on Programming Languages and Systems  Volume 39, Issue 2
                        June 2017
                        194 pages
                        ISSN:0164-0925
                        EISSN:1558-4593
                        DOI:10.1145/3062396
                        Issue’s Table of Contents

                        Copyright © 2017 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 ACM 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: 21 March 2017
                        • Accepted: 1 December 2016
                        • Revised: 1 November 2016
                        • Received: 1 February 2016
                        Published in toplas Volume 39, Issue 2

                        Permissions

                        Request permissions about this article.

                        Request Permissions

                        Check for updates

                        Qualifiers

                        • research-article
                        • Research
                        • Refereed

                      PDF Format

                      View or Download as a PDF file.

                      PDF

                      eReader

                      View online with eReader.

                      eReader