Skip to main content Accessibility help
×
×
Home

Pushdown flow analysis with abstract garbage collection

  • J. IAN JOHNSON (a1), ILYA SERGEY (a2), CHRISTOPHER EARL (a3), MATTHEW MIGHT (a4) and DAVID VAN HORN (a5)...
Abstract

In the static analysis of functional programs, pushdown flow analysis and abstract garbage collection push the boundaries of what we can learn about programs statically. This work illuminates and poses solutions to theoretical and practical challenges that stand in the way of combining the power of these techniques. Pushdown flow analysis grants unbounded yet computable polyvariance to the analysis of return-flow in higher-order programs. Abstract garbage collection grants unbounded polyvariance to abstract addresses which become unreachable between invocations of the abstract contexts in which they were created. Pushdown analysis solves the problem of precisely analyzing recursion in higher-order languages; abstract garbage collection is essential in solving the “stickiness” problem. Alone, our benchmarks demonstrate that each method can reduce analysis times and boost precision by orders of magnitude. We combine these methods. The challenge in marrying these techniques is not subtle: computing the reachable control states of a pushdown system relies on limiting access during transition to the top of the stack; abstract garbage collection, on the other hand, needs full access to the entire stack to compute a root set, just as concrete collection does. Conditional pushdown systems were developed for just such a conundrum, but existing methods are ill-suited for the dynamic nature of garbage collection. We show fully precise and approximate solutions to the feasible paths problem for pushdown garbage-collecting control-flow analysis. Experiments reveal synergistic interplay between garbage collection and pushdown techniques, and the fusion demonstrates “better-than-both-worlds” precision.

    • Send article to Kindle

      To send this article to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about sending to your Kindle. Find out more about sending to your Kindle.

      Note you can select to send to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be sent to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

      Find out more about the Kindle Personal Document Service.

      Pushdown flow analysis with abstract garbage collection
      Available formats
      ×
      Send article to Dropbox

      To send this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Dropbox.

      Pushdown flow analysis with abstract garbage collection
      Available formats
      ×
      Send article to Google Drive

      To send this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Google Drive.

      Pushdown flow analysis with abstract garbage collection
      Available formats
      ×
Copyright
References
Hide All
Bouajjani, A., Esparza, J. & Maler, O. (1997) Reachability analysis of pushdown automata: Application to Model-Checking. In Proceedings of the 8th International Conference on Concurrency Theory (CONCUR '97). Springer-Verlag, pp. 135150.
Cousot, P. (1999) The calculational design of a generic abstract interpreter. In Calculational System Design, Broy, M. & Steinbrüggen, R. (eds). Available at: http://www.di.ens.fr/~cousot/COUSOTpapers/Marktoberdorf98.shtml.
Cousot, P. & Cousot, R. (1977) Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the Fourth ACM Symposium on Principles of Programming Languages. ACM Press, pp. 238252.
Earl, C., Might, M. & Van Horn, D. (2010) Pushdown control-flow analysis of Higher-Order programs. In Workshop on Scheme and Functional Programming. Montreal, Canada, pp. 2436.
Earl, C., Sergey, I., Might, M. & Van Horn, D. (2012) Introspective pushdown analysis of higher-order programs. In Proceedings of the 17th ACM SIGPLAN International Conference on Functional Programming (ICFP 2012), ICFP '12. ACM, pp. 177188.
Esparza, J., Kucera, A. & Schwoon, S. (2003) Model checking LTL with regular valuations for pushdown systems. Inf. Comput. 186 (2), 355376.
Felleisen, M. & Friedman, D. P. (1987) A calculus for assignments in higher-order languages. In Proceedings of the 14th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL '87), ACM, pp. 314.
Flanagan, C., Sabry, A., Duba, B. F. & Felleisen, M. (1993, June) The essence of compiling with continuations. In Proceedings of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation (PLDI '93). ACM, pp. 237247.
Ginsburg, S., Greibach, S. A. & Harrison, M. A. (1967) One-way stack automata. J. ACM 14 (2), 389418.
Johnson, J. I. & Van Horn, D. (2013) Concrete semantics for pushdown analysis: The essence of summarization. In Workshop on Higher-Order Program Analysis (HOPA'13), pp. 10–20.
Kobayashi, N. (2009, January) Types and higher-order recursion schemes for verification of higher-order programs. SIGPLAN Not. 44 (1), 416428.
Kodumal, J. & Aiken, A. (2004, June) The set constraint/CFL reachability connection in practice. In Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation (PLDI '04), pp. 207–218.
Lal, A. & Reps, T. W. (2006) Improving pushdown system model checking. In CAV, Ball, T. and Jones, R. B. (eds), Lecture Notes in Computer Science, vol. 4144. Springer, pp. 343357.
Li, X. & Ogawa, M. (2010) Conditional weighted pushdown systems and applications. In PEPM, Gallagher, J. P. & Voigtländer, J. (eds), ACM, pp. 141150.
Melski, D. & Reps, T. W. (2000, October). Interconvertibility of a class of set constraints and context-free-language reachability. Theor. Comput. Sci. 248 (1-2), 2998.
Midtgaard, J. (2007) Transformation, Analysis, and Interpretation of Higher-Order Procedural Programs. PhD thesis, University of Aarhus.
Midtgaard, J. & Jensen, T. P. (2009) Control-flow analysis of function calls and returns by abstract interpretation. In Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming (ICFP '09), pp. 287–298.
Might, M. (2007, June). Environment Analysis of Higher-Order Languages. Ph D thesis, Georgia Institute of Technology.
Might, M., Chambers, B. & Shivers, O. (2007, January) Model checking via Gamma-CFA. In Verification, Model Checking, and Abstract Interpretation, Cook, B. & Podelski, A. (eds), Springer-Verlag, LNCS, pp. 5973.
Might, M., Darais, D. & Spiewak, D. (2011) Parsing with derivatives: a functional pearl. In Proceeding of the 16th ACM SIGPLAN international conference on Functional Programming (ICFP '11). ACM, pp. 189195.
Might, M. & Manolios, P. (2009) A posteriori soundness for non-deterministic abstract interpretations. In Proceedings of the 10th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI '09). Springer-Verlag, pp. 260274.
Might, M. & Prabhu, T. (2009) Interprocedural dependence analysis of higher-order programs via stack reachability. In Proceedings of the 2009 Workshop on Scheme and Functional Programming, pp. 10–22.
Might, M. & Shivers, O. (2006a) Environment analysis via Delta-CFA. In Conference Record of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2006). ACM, pp. 127140.
Might, M. & Shivers, O. (2006b) Improving flow analyses via Gamma-CFA: Abstract garbage collection and counting. In Proceedings of the 11th ACM SIGPLAN International Conference on Functional Programming (ICFP 2006). ACM, pp. 1325.
Might, M., Smaragdakis, Y. & Van Horn, D. (2010) Resolving and exploiting the k-CFA paradox: Illuminating functional vs. object-oriented program analysis. In Proceedings of the 2010 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '10). ACM Press, pp. 305315.
Ong, C. H. L. (2006) On Model-Checking trees generated by Higher-Order recursion schemes. In 21st Annual IEEE Symposium on Logic in Computer Science (LICS'06), pp. 81–90.
Owens, S., Reppy, J. & Turon, A. (2009) Regular-expression derivatives re-examined. J. Funct. Program. 19 (02), 173190.
Rehof, J. & Fähndrich, M. (2001) Type-based flow analysis: From polymorphic subtyping to CFL-reachability. In Proceedings of the 28th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '01). ACM, pp. 5466.
Reps, T. (1998, December). Program analysis via graph reachability. Inf. Softw. Technol. 40 (11-12), 701726.
Reps, T., Schwoon, S., Jha, S. & Melski, D. (2005, October) Weighted pushdown systems and their application to interprocedural dataflow analysis. Sci. Comput. Program. 58 (1-2), 206263.
Rounds, W. C. (1973) Complexity of recognition in intermediate level languages. In IEEE Conference Record of 14th Annual Symposium on Switching and Automata Theory, 1973 (SWAT '08), pp. 145–158.
Shivers, O. G. (1991). Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University.
Sipser, M. (2005, February) Introduction to the Theory of Computation, 2nd ed.Cengage Learning.
Van Horn, D. and Mairson, H. G. (2008). Deciding kCFA is complete for EXPTIME. In Proceeding of the 13th ACM SIGPLAN International Conference on Functional Programming (ICFP '08), pp. 275–282.
Van Horn, D. & Might, M. (2012) Systematic abstraction of abstract machines. J. Funct. Program. 22(Special Issue 4-5), 705746.
Vardoulakis, D. (2012) CFA2: Pushdown Flow Analysis for Higher-Order Languages. PhD thesis, Northeastern University.
Vardoulakis, D. & Shivers, O. (2010). CFA2: A Context-Free approach to Control-Flow analysis. In Programming Languages and Systems, Gordon, A. D. (ed), Lecture Notes in Computer Science, vol. 6012. Chapter 30. Berlin Heidelberg: Springer, pp. 570589.
Vardoulakis, D. & Shivers, O. (2011) Pushdown flow analysis of first-class control. In Proceedings of the 16th ACM SIGPLAN International Conference on Functional Programming (ICFP '11), pp. 69–80.
Wright, A. K. & Jagannathan, S. (1998, January) Polymorphic splitting: An effective polyvariant flow analysis. ACM Trans. Program. Lang. Syst. 20 (1), 166207.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×

Metrics

Altmetric attention score

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed

Pushdown flow analysis with abstract garbage collection

  • J. IAN JOHNSON (a1), ILYA SERGEY (a2), CHRISTOPHER EARL (a3), MATTHEW MIGHT (a4) and DAVID VAN HORN (a5)...
Submit a response

Discussions

No Discussions have been published for this article.

×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *