skip to main content
research-article

Polyvariant flow analysis with higher-ranked polymorphic types and higher-order effect operators

Published:27 September 2010Publication History
Skip Abstract Section

Abstract

We present a type and effect system for flow analysis that makes essential use of higher-ranked polymorphism. We show that, for higher-order functions, the expressiveness of higher-ranked types enables us to improve on the precision of conventional let-polymorphic analyses. Modularity and decidability of the analysis are guaranteed by making the analysis of each program parametric in the analyses of its inputs; in particular, we have that higher-order functions give rise to higher-order operations on effects. As flow typing is archetypical to a whole class of type and effect systems, our approach can be used to boost the precision of a wide range of type-based program analyses for higher-order languages.

Skip Supplemental Material Section

Supplemental Material

icfp-mon-1420-hage.mov

References

  1. }}Anindya Banerjee and Thomas P. Jensen. Modular control-flow analysis with rank 2 intersection types. Mathemathical Structures in Computer Science, 13 (1): 87--124, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. }}Luís Damas and Robin Milner. Principal type-schemes for functional programs. In Conference Record of the Ninth Annual ACM Symposium on Principles of Programming Languages, Albuquerque, New Mexico, January 1982, pages 207--212. ACM Press, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}Dirk Dussart, Fritz Henglein, and Christian Mossin. Polymorphic recursion and subtype qualifications: Polymorphic binding-time analysis in polynominal time. In Alan Mycroft, editor, Static Analysis, Second International Symposium, SAS'95, Glasgow, UK, September 27, 1995, Proceedings, volume 983 of Lecture Notes in Computer Science, pages 118--135. Springer-Verlag, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}Manuel Fähndrich and Jakob Rehof. Type-based flow analysis and context-free language reachability. Mathematical Structures in Computer Science, 18 (5): 823--894, 2008.Google ScholarGoogle ScholarCross RefCross Ref
  5. }}Karl-Filip Faxén. Polyvariance, polymorphism and flow analysis. In Mads Dam, editor, Analysis and Verification of Multiple-Agent Languages, 5th LOMAPS Workshop, Stockholm, Sweden, June 24-26, 1996, Selected Papers, volume 1192 of Lecture Notes in Computer Science, pages 260--278. Springer-Verlag, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}Jörgen Gustavsson and Josef Svenningsson. Constraint abstractions. In Olivier Danvy and Andrzej Filinski, editors, Programs as Data Objects, Second Symposium, PADO 2001, Aarhus, Denmark, May 21-23, 2001, Proceedings, volume 2053 of Lecture Notes in Computer Science, pages 63--83. Springer-Verlag, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}Nevin Heintze. Set-based analysis of ML programs. In Proceedings of the 1994 ACM Conference on LISP and Functional Programming, Orlando, Florida, USA, 27-29 June 1994, pages 306--317. ACM Press, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. }}Fritz Henglein and Christian Mossin. Polymorphic binding-time analysis. In Donald Sannella, editor, Programming Languages and Systems, ESOP'94, 5th European Symposium on Programming, Edinburgh, U.K., April 11-13, 1994, Proceedings, volume 788 of Lecture Notes in Computer Science, pages 287--301. Springer-Verlag, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}Stefan Holdermans and Jurriaan Hage. On the rôle of minimal typing derivations in type-driven program transformation, 2010. To appear in the proceedings of the 10th Workshop on Language Descriptions, Tools, and Applications (LDTA 2010), Paphos, Cyprus, 27--28 March 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}Trevor Jim. What are principal typings and what are they good for? In Conference Record of POPL'96: The 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Language, Papers Presented at the Symposium, St. Petersburg Beach, Florida, 21-24 January 1996, pages 42--53. ACM Press, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}John B. Kam and Jeffrey D. Ullman. Monotone data flow analysis frameworks. Acta Informaticae, 7: 305--317, 1977.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}Assaf J. Kfoury and Jerzy Tiuryn. Type reconstruction in finite rank fragments of the second-order λ-calculus. Information and Computation, 98 (2): 228--257, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}Assaf J. Kfoury and Joe B. Wells. Principality and decidable type inference for finte-rank intersection types. In POPL '99, Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, January 20-22, 1999, San Antonio, TX, pages 161--174. ACM Press, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}Christian Mossin. Exact flow analysis. Mathematical Structures in Computer Science, 13 (1): 125--156, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. }}Alan Mycroft. Polymorphic type schemes and recursive definitions. In Manfred Paul and Bernard Robinet, editors, International Symposium on Programming, 6th Colloquium, Toulouse, April 17-19, 1984, Proceedings, volume 167 of Lecture Notes in Computer Science, pages 217--228. Springer-Verlag, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}Flemming Nielson and Hanne Riis Nielson. Type and effect systems. In Ernst-Rüdiger Olderog and Bernhard Steffen, editors, Correct System Design, Recent Insight and Advances, (to Hans Langmaack on the occasion of his retirement from his professorship at the University of Kiel), volume 1710 of Lecture Notes in Computer Science, pages 114--136. Springer-Verlag, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. }}Hanne Riis Nielson and Flemming Nielson. Infinitary control flow analysis: A collecting semantics for closure analysis. In Conference Record of POPL'97: The 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Papers Presented at the Symposium, Paris, France, 15-17 January 1997, pages 332--345. ACM Press, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}Jens Palsberg. Type-based analysis and applications. In Proceedings of the 2001 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, PASTE'01, Snowbird, Utah, USA, June 18-19, 2001, pages 20--27. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. }}Peter Sestoft. Analysis and Efficient Implementation of Functional Languages. PhD thesis, University of Copenhagen, 1991.Google ScholarGoogle Scholar
  20. }}Olin Shivers. Control-flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}Scott F. Smith and Tiejun Wang. Polyvariant flow analysis with constrained types. In Gert Smolka, editor, Programming Languages and Systems, 9th European Symposium on Programming, ESOP 2000, Held as Part of the European Joint Conferences on the Theory and Practice of Software, ETAPS 2000, Berlin, Germany, March 25-April 2, 2000, Proceedings, volume 1782 of Lecture Notes in Computer Sciences, pages 382--396. Springer-Verlag, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. }}Yan Mei Tang and Pierre Jouvelot. Effect systems with subtyping. In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, La Jolla, California, USA, June 21-23, 1995, pages 45--53. ACM Press, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. }}Mads Tofte and Jean-Pierre Talpin. Implementation of the typed call-by-value λ-calculus using a stack of regions. In Conference Record of POPL'94: 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Portland, Oregon, January 17-21, 1994, pages 188--201. ACM Press, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}Keith Wansbrough and Simon Peyton Jones. Once upon a polymorphic type. In POPL '99, Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, January 20-22, 1999, San Antonio, TX, pages 15--28. ACM Press, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}Joe B. Wells, Allyn Dimock, Robert Muller, and Franklyn A. Turbak. A calculus with polymorphic and polyvariant flow types. Journal of Functional Programming, 12 (3): 183--227, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Polyvariant flow analysis with higher-ranked polymorphic types and higher-order effect operators

            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 SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 45, Issue 9
              ICFP '10
              September 2010
              382 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/1932681
              Issue’s Table of Contents
              • cover image ACM Conferences
                ICFP '10: Proceedings of the 15th ACM SIGPLAN international conference on Functional programming
                September 2010
                398 pages
                ISBN:9781605587943
                DOI:10.1145/1863543

              Copyright © 2010 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 27 September 2010

              Check for updates

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader

            ePub

            View this article in ePub.

            View ePub
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!