Skip to main content Accessibility help
×
Home
Hostname: page-component-768ffcd9cc-5sfl8 Total loading time: 0.359 Render date: 2022-12-01T17:00:06.387Z Has data issue: true Feature Flags: { "shouldUseShareProductTool": true, "shouldUseHypothesis": true, "isUnsiloEnabled": true, "useRatesEcommerce": false, "displayNetworkTab": true, "displayNetworkMapGraph": false, "useSa": true } hasContentIssue true

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: ianj@ccs.neu.edu)
ILYA SERGEY
Affiliation:
IMDEA Software Institute, Madrid, Spain (e-mail: ilya.sergey@imdea.org)
CHRISTOPHER EARL
Affiliation:
University of Utah, Salt Lake City, UT, USA (e-mail: cwearl@cs.utah.edu)
MATTHEW MIGHT
Affiliation:
University of Utah, Salt Lake City, UT, USA (e-mail: might@cs.utah.edu)
DAVID VAN HORN
Affiliation:
University of Maryland, MD, USA (e-mail: dvanhorn@cs.umd.edu)
Rights & Permissions[Opens in a new window]

Abstract

HTML view is 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle Scholar
Esparza, J., Kucera, A. & Schwoon, S. (2003) Model checking LTL with regular valuations for pushdown systems. Inf. Comput. 186 (2), 355376.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle Scholar
Ginsburg, S., Greibach, S. A. & Harrison, M. A. (1967) One-way stack automata. J. ACM 14 (2), 389418.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle Scholar
Owens, S., Reppy, J. & Turon, A. (2009) Regular-expression derivatives re-examined. J. Funct. Program. 19 (02), 173190.CrossRefGoogle 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.CrossRefGoogle Scholar
Reps, T. (1998, December). Program analysis via graph reachability. Inf. Softw. Technol. 40 (11-12), 701726.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle Scholar
Van Horn, D. & Might, M. (2012) Systematic abstraction of abstract machines. J. Funct. Program. 22(Special Issue 4-5), 705746.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle Scholar
Wright, A. K. & Jagannathan, S. (1998, January) Polymorphic splitting: An effective polyvariant flow analysis. ACM Trans. Program. Lang. Syst. 20 (1), 166207.CrossRefGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.
You have Access
8
Cited by

Save article to Kindle

To save this article to your Kindle, first ensure coreplatform@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 saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved 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
×

Save article to Dropbox

To save 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 used this feature, you will be asked to authorise Cambridge Core to connect with your Dropbox account. Find out more about saving content to Dropbox.

Pushdown flow analysis with abstract garbage collection
Available formats
×

Save article to Google Drive

To save 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 used this feature, you will be asked to authorise Cambridge Core to connect with your Google Drive account. Find out more about saving content to Google Drive.

Pushdown flow analysis with abstract garbage collection
Available formats
×
×

Reply to: Submit a response

Please enter your response.

Your details

Please enter a valid email address.

Conflicting interests

Do you have any conflicting interests? *