Hostname: page-component-586b7cd67f-g8jcs Total loading time: 0 Render date: 2024-11-25T10:32:28.809Z Has data issue: false hasContentIssue false

Pushdown flow analysis with abstract garbage collection

Published online by Cambridge University Press:  21 May 2014

J. IAN JOHNSON
Affiliation:
Northeastern University, Boston, MA, USA (e-mail: [email protected])
ILYA SERGEY
Affiliation:
IMDEA Software Institute, Madrid, Spain (e-mail: [email protected])
CHRISTOPHER EARL
Affiliation:
University of Utah, Salt Lake City, UT, USA (e-mail: [email protected])
MATTHEW MIGHT
Affiliation:
University of Utah, Salt Lake City, UT, USA (e-mail: [email protected])
DAVID VAN HORN
Affiliation:
University of Maryland, MD, USA (e-mail: [email protected])
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

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.

Type
Articles
Copyright
Copyright © Cambridge University Press 2014 

References

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.Google Scholar
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.Google Scholar
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.Google Scholar
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.Google Scholar
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.Google Scholar
Esparza, J., Kucera, A. & Schwoon, S. (2003) Model checking LTL with regular valuations for pushdown systems. Inf. Comput. 186 (2), 355376.Google Scholar
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.Google Scholar
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.Google Scholar
Ginsburg, S., Greibach, S. A. & Harrison, M. A. (1967) One-way stack automata. J. ACM 14 (2), 389418.Google Scholar
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.Google Scholar
Kobayashi, N. (2009, January) Types and higher-order recursion schemes for verification of higher-order programs. SIGPLAN Not. 44 (1), 416428.Google Scholar
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.CrossRefGoogle Scholar
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.Google Scholar
Li, X. & Ogawa, M. (2010) Conditional weighted pushdown systems and applications. In PEPM, Gallagher, J. P. & Voigtländer, J. (eds), ACM, pp. 141150.CrossRefGoogle Scholar
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.Google Scholar
Midtgaard, J. (2007) Transformation, Analysis, and Interpretation of Higher-Order Procedural Programs. PhD thesis, University of Aarhus.Google Scholar
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.CrossRefGoogle Scholar
Might, M. (2007, June). Environment Analysis of Higher-Order Languages. Ph D thesis, Georgia Institute of Technology.Google Scholar
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.Google Scholar
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.CrossRefGoogle Scholar
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.Google Scholar
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.Google Scholar
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.CrossRefGoogle Scholar
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.CrossRefGoogle Scholar
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.Google Scholar
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.Google Scholar
Owens, S., Reppy, J. & Turon, A. (2009) Regular-expression derivatives re-examined. J. Funct. Program. 19 (02), 173190.Google Scholar
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.Google Scholar
Reps, T. (1998, December). Program analysis via graph reachability. Inf. Softw. Technol. 40 (11-12), 701726.Google Scholar
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.Google Scholar
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.Google Scholar
Shivers, O. G. (1991). Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University.Google Scholar
Sipser, M. (2005, February) Introduction to the Theory of Computation, 2nd ed.Cengage Learning.Google Scholar
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.Google Scholar
Van Horn, D. & Might, M. (2012) Systematic abstraction of abstract machines. J. Funct. Program. 22(Special Issue 4-5), 705746.Google Scholar
Vardoulakis, D. (2012) CFA2: Pushdown Flow Analysis for Higher-Order Languages. PhD thesis, Northeastern University.Google Scholar
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.Google Scholar
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.Google Scholar
Wright, A. K. & Jagannathan, S. (1998, January) Polymorphic splitting: An effective polyvariant flow analysis. ACM Trans. Program. Lang. Syst. 20 (1), 166207.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.