Abstract
Theories of higher-order must-alias analysis, often under the guise of environment analysis, provide deep behavioral insight. But these theories---in particular those that are most insightful otherwise---can reason about recursion only in limited cases. This weakness is not inherent to the theories but to the frameworks in which they're defined: machine models which thread the heap through evaluation. Since these frameworks allocate each abstract resource in the heap, the constituent theories of environment analysis conflate co-live resources identified in the abstract, such as recursively-created bindings. We present heap fragments as a general technique to allow these theories to reason about recursion in a general and robust way. We instantiate abstract counting in a heap-fragment framework and compare its performance to a precursor entire-heap framework. We also sketch an approach to realizing binding invariants, a more powerful environment analysis, in the heap-fragment framework.
Supplemental Material
- Lars Bergstrom, Matthew Fluet, Matthew Le, John Reppy, and Nora Sandler. 2014. Practical and Effective Higher-Order Optimizations. In Proceedings of the 19th ACM SIGPLAN International Conference on Functional Programming (ICFP ’14). Association for Computing Machinery, New York, NY, USA. 81–93. isbn:9781450328739 https://doi.org/10.1145/2628136.2628153 Google Scholar
Digital Library
- David R. Chase, Mark N. Wegman, and F. Kenneth Zadeck. 1990. Analysis of Pointers and Structures. In Proceedings of the ACM SIGPLAN’90 Conference on Programming Language Design and Implementation (PLDI), White Plains, New York, USA, June 20-22, 1990, Bernard N. Fischer (Ed.). ACM, 296–310. https://doi.org/10.1145/93542.93585 Google Scholar
Digital Library
- David Darais, Nicholas Labich, Phúc C. Nguyen, and David Van Horn. 2017. Abstracting definitional interpreters (functional pearl). Proceedings of the ACM on Programming Languages, 1, ICFP (2017), Article 12, Aug., 25 pages. issn:2475-1421 https://doi.org/10.1145/3110256 Google Scholar
Digital Library
- David Charles Darais. 2017. Mechanizing Abstract Interpretation. Ph.D. Dissertation. University of Maryland. College Park, MD, USA. https://doi.org/10.13016/M2J96097D Google Scholar
Cross Ref
- Christopher Earl, Ilya Sergey, Matthew Might, and David Van Horn. 2012. Introspective pushdown analysis of higher-order programs. In Proceedings of the 17th ACM SIGPLAN International Conference on Functional Programming (ICFP ’12). ACM, New York, NY, USA. 177–188. isbn:978-1-4503-1054-3 https://doi.org/10.1145/2364527.2364576 Google Scholar
Digital Library
- Leandro Facchinetti, Zachary Palmer, and Scott F. Smith. 2017. Relative Store Fragments for Singleton Abstraction. In Static Analysis - 24th International Symposium, SAS 2017, New York, NY, USA, August 30 - September 1, 2017, Proceedings, Francesco Ranzato (Ed.) (Lecture Notes in Computer Science, Vol. 10422). Springer, 106–127. https://doi.org/10.1007/978-3-319-66706-5_6 Google Scholar
Cross Ref
- Cormac Flanagan, Amr Sabry, Bruce F. Duba, and Matthias Felleisen. 1993. The Essence of Compiling with Continuations. In Proceedings of the ACM SIGPLAN’93 Conference on Programming Language Design and Implementation (PLDI), Albuquerque, New Mexico, USA, June 23-25, 1993, Robert Cartwright (Ed.). ACM, 237–247. https://doi.org/10.1145/155090.155113 Google Scholar
Digital Library
- Kimball Germane and Michael D. Adams. 2020. Liberate Abstract Garbage Collection from the Stack by Decomposing the Heap. In Programming Languages and Systems - 29th European Symposium on Programming, ESOP 2020, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2020, Dublin, Ireland, April 25-30, 2020, Proceedings, Peter Müller (Ed.) (Lecture Notes in Computer Science, Vol. 12075). Springer, 197–223. https://doi.org/10.1007/978-3-030-44914-8_8 Google Scholar
Digital Library
- Kimball Germane and Matthew Might. 2017. A Posteriori Environment Analysis with Pushdown Delta CFA. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (POPL 2017). Association for Computing Machinery, New York, NY, USA. 19–31. isbn:9781450346603 https://doi.org/10.1145/3009837.3009899 Google Scholar
Digital Library
- Thomas Gilray, Michael D. Adams, and Matthew Might. 2016. Allocation characterizes polyvariance: a unified methodology for polyvariant control-flow analysis. In Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming, ICFP 2016, Nara, Japan, September 18-22, 2016, Jacques Garrigue, Gabriele Keller, and Eijiro Sumii (Eds.). ACM, 407–420. https://doi.org/10.1145/2951913.2951936 Google Scholar
Digital Library
- Thomas Gilray, Steven Lyde, Michael D. Adams, Matthew Might, and David Van Horn. 2016. Pushdown control-flow analysis for free. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’16). ACM, New York, NY, USA. 691–704. isbn:978-1-4503-3549-2 https://doi.org/10.1145/2837614.2837631 Google Scholar
Digital Library
- Suresh Jagannathan, Peter Thiemann, Stephen Weeks, and Andrew K. Wright. 1998. Single and Loving It: Must-Alias Analysis for Higher-Order Languages. In POPL ’98, Proceedings of the 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Diego, CA, USA, January 19-21, 1998, David B. MacQueen and Luca Cardelli (Eds.). ACM, 329–341. https://doi.org/10.1145/268946.268973 Google Scholar
Digital Library
- James Ian Johnson and David Van Horn. 2014. Abstracting abstract control. In Proceedings of the 10th ACM Symposium on Dynamic Languages (DLS ’14). ACM, New York, NY, USA. 11–22. isbn:978-1-4503-3211-8 https://doi.org/10.1145/2661088.2661098 Google Scholar
Digital Library
- Matthew Might. 2007. Environment analysis of higher-order languages. Ph.D. Dissertation. Georgia Institute of Technology. http://hdl.handle.net/1853/16289Google Scholar
- Matthew Might. 2007. Logic-Flow Analysis of Higher-Order Programs. In Proceedings of the 34th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’07). Association for Computing Machinery, New York, NY, USA. 185–198. isbn:1595935754 https://doi.org/10.1145/1190216.1190247 Google Scholar
Digital Library
- Matthew Might. 2007. Logic-flow analysis of higher-order programs. In Proceedings of the 34th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’07). ACM, New York, NY, USA. 185–198. isbn:1-59593-575-4 https://doi.org/10.1145/1190216.1190247 Google Scholar
Digital Library
- Matthew Might. 2010. Shape Analysis in the Absence of Pointers and Structure. In Verification, Model Checking, and Abstract Interpretation, Gilles Barthe and Manuel Hermenegildo (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 263–278. isbn:978-3-642-11319-2 https://doi.org/10.1007/978-3-642-11319-2_20 Google Scholar
Digital Library
- Matthew Might, Benjamin Chambers, and Olin Shivers. 2007. Model Checking Via GammaCFA. In Verification, Model Checking, and Abstract Interpretation, 8th International Conference, VMCAI 2007, Nice, France, January 14-16, 2007, Proceedings, Byron Cook and Andreas Podelski (Eds.) (Lecture Notes in Computer Science, Vol. 4349). Springer, 59–73. https://doi.org/10.1007/978-3-540-69738-1_4 Google Scholar
Cross Ref
- Matthew Might and Panagiotis Manolios. 2009. A posteriori soundness for non-deterministic abstract interpretations. In Proceedings of the 10th International Conference on Verification, Model Checking and Abstract Interpretation (VMCAI 2009). Savannah, Georgia, USA. https://doi.org/10.1007/978-3-540-93900-9_22 Google Scholar
Digital Library
- Matthew Might and Olin Shivers. 2006. Environment Analysis via Δ CFA. In Conference Record of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’06). Association for Computing Machinery, New York, NY, USA. 127–140. isbn:1595930272 https://doi.org/10.1145/1111037.1111049 Google Scholar
Digital Library
- Matthew Might and Olin Shivers. 2006. Improving flow analyses via Γ CFA: abstract garbage collection and counting. In Proceedings of the Eleventh ACM SIGPLAN International Conference on Functional Programming (ICFP ’06). ACM, New York, NY, USA. 13–25. isbn:1-59593-309-3 https://doi.org/10.1145/1159803.1159807 Google Scholar
Digital Library
- Jens Palsberg. 1995. Closure Analysis in Constraint Form. ACM Trans. Program. Lang. Syst., 17, 1 (1995), Jan., 47–62. issn:0164-0925 https://doi.org/10.1145/200994.201001 Google Scholar
Digital Library
- Amr Sabry and Matthias Felleisen. 1994. Is Continuation-Passing Useful for Data Flow Analysis? In Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation (PLDI ’94). Association for Computing Machinery, New York, NY, USA. 1–12. isbn:089791662X https://doi.org/10.1145/178243.178244 Google Scholar
Digital Library
- Peter Sestoft. 1989. Replacing Function Parameters by Global Variables. In Proceedings of the fourth international conference on Functional programming languages and computer architecture, FPCA 1989, London, UK, September 11-13, 1989, Joseph E. Stoy (Ed.). ACM, 39–53. https://doi.org/10.1145/99370.99374 Google Scholar
Digital Library
- Olin Shivers. 1988. Control-Flow Analysis in Scheme. In Proceedings of the ACM SIGPLAN’88 Conference on Programming Language Design and Implementation (PLDI), Atlanta, Georgia, USA, June 22-24, 1988, Richard L. Wexelblat (Ed.). ACM, 164–174. https://doi.org/10.1145/53990.54007 Google Scholar
Digital Library
- Olin Shivers. 1991. Control-Flow Analysis of Higher-Order Languages. Ph.D. Dissertation. Carnegie Mellon University. Pittsburgh, PA, USA.Google Scholar
Digital Library
- Olin Shivers and Matthew Might. 2006. Continuations and transducer composition. In Proceedings of the ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation, Ottawa, Ontario, Canada, June 11-14, 2006, Michael I. Schwartzbach and Thomas Ball (Eds.). ACM, 295–307. https://doi.org/10.1145/1133981.1134016 Google Scholar
Digital Library
- Paul A. Steckler and Mitchell Wand. 1997. Lightweight Closure Conversion. ACM Trans. Program. Lang. Syst., 19, 1 (1997), Jan., 48–86. issn:0164-0925 https://doi.org/10.1145/239912.239915 Google Scholar
Digital Library
- David Van Horn and Matthew Might. 2010. Abstracting abstract machines. In Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming (ICFP ’10). ACM, New York, NY, USA. 51–62. isbn:978-1-60558-794-3 https://doi.org/10.1145/1863543.1863553 Google Scholar
Digital Library
- Dimitrios Vardoulakis and Olin Shivers. 2010. CFA2: A Context-Free Approach to Control-Flow Analysis. In Programming Languages and Systems, Andrew D. Gordon (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 570–589. isbn:978-3-642-11957-6 https://doi.org/10.2168/LMCS-7(2:3)2011 Google Scholar
Cross Ref
- Dimitrios Vardoulakis and Olin Shivers. 2011. Pushdown flow analysis of first-class control. In Proceeding of the 16th ACM SIGPLAN international conference on Functional Programming, ICFP 2011, Tokyo, Japan, September 19-21, 2011, Manuel M. T. Chakravarty, Zhenjiang Hu, and Olivier Danvy (Eds.). ACM, 69–80. https://doi.org/10.1145/2034773.2034785 Google Scholar
Digital Library
- Guannan Wei, James Decker, and Tiark Rompf. 2018. Refunctionalization of abstract abstract machines: bridging the gap between abstract abstract machines and abstract definitional interpreters (functional pearl). Proceedings of the ACM on Programming Languages, 2, ICFP (2018), Article 105, July, 28 pages. issn:2475-1421 https://doi.org/10.1145/3236800 Google Scholar
Digital Library
Index Terms
Newly-single and loving it: improving higher-order must-alias analysis with heap fragments
Recommendations
Interprocedural pointer alias analysis
We present practical approximation methods for computing and representing interprocedural aliases for a program written in a language that includes pointers, reference parameters, and recursion. We present the following contributions: (1) a framework ...
Pushdown control-flow analysis for free
POPL '16Traditional control-flow analysis (CFA) for higher-order languages introduces spurious connections between callers and callees, and different invocations of a function may pollute each other's return flows. Recently, three distinct approaches have been ...
Scaling CFL-Reachability-Based Points-To Analysis Using Context-Sensitive Must-Not-Alias Analysis
Genoa: Proceedings of the 23rd European Conference on ECOOP 2009 --- Object-Oriented ProgrammingPointer analyses derived from a Context-Free-Language (CFL) reachability formulation achieve very high precision, but they do not scale well to compute the points-to solution for an entire large program. Our goal is to increase significantly the ...






Comments