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.
Supplemental Material
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Cross Ref
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}John B. Kam and Jeffrey D. Ullman. Monotone data flow analysis frameworks. Acta Informaticae, 7: 305--317, 1977.Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}Christian Mossin. Exact flow analysis. Mathematical Structures in Computer Science, 13 (1): 125--156, 2003. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}Peter Sestoft. Analysis and Efficient Implementation of Functional Languages. PhD thesis, University of Copenhagen, 1991.Google Scholar
- }}Olin Shivers. Control-flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University, 1991. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
Index Terms
Polyvariant flow analysis with higher-ranked polymorphic types and higher-order effect operators
Recommendations
Polyvariant flow analysis with higher-ranked polymorphic types and higher-order effect operators
ICFP '10: Proceedings of the 15th ACM SIGPLAN international conference on Functional programmingWe 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-...
Type checking higher-order polymorphic multi-methods
POPL '97: Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languagesWe present a new predicative and decidable type system, called ML≤, suitable for languages that integrate functional programming and parametric polymorphism in the tradition of ML [21, 28], and class-based object-oriented programming and higher-order ...
Type checking and inference for polymorphic and existential types
CATS '09: Proceedings of the Fifteenth Australasian Symposium on Computing: The Australasian Theory - Volume 94This paper proves undecidability of type checking and type inference problems in some variants of typed lambda calculi with polymorphic and existential types. First, type inference in the domain-free polymorphic lambda calculus is proved to be ...







Comments