skip to main content
10.1145/1868281.1868283acmotherconferencesArticle/Chapter ViewAbstractPublication PagesldtaConference Proceedingsconference-collections
research-article

On the rôle of minimal typing derivations in type-driven program transformation

Published: 28 March 2010 Publication History

Abstract

Standard inference algorithms for type systems involving ML-style polymorphism aim at reconstructing most general types for all let-bound identifiers. Using such algorithms to implement modular program optimisations by means of type-driven transformation techniques generally yields suboptimal results. We demonstrate how this defect can be made up for by using algorithms that target at obtaining so-called minimal typing derivations instead. The resulting approach retains modularity and is applicable to a large class of polyvariant program transformations.

References

[1]
}}A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, & Tools. Pearson Education, Boston, Massachusetts, 2nd edition, 2006.
[2]
}}T. Amtoft. Minimal thunkification. In P. Cousot, M. Falaschi, G. Filé, and A. Rauzy, editors, Static Analysis, Third International Workshop, WSA '93, Padova, Italy, September 22--24, 1993, Proceedings, volume 724 of Lecture Notes of Computer Science, pages 218--229. Springer-Verlag, 1993.
[3]
}}A. Banerjee. A modular, polyvariant, and type-based closure analysis. In Proceedings of the 1997 ACM SIGPLAN International Conference on Functional Programming (ICFP '97), Amsterdam, The Netherlands, June 9--11, 1997, pages 1--10. ACM Press, 1997.
[4]
}}A. Banerjee and T. P. Jensen. Modular control-flow analysis with rank 2 intersection types. Mathemathical Structures in Computer Science, 13(1):87--124, 2003.
[5]
}}S. Berardi, M. Coppo, F. Damiani, and P. Giannini. Type-based useless-code elimination for functional programs. In W. Taha, editor, Semantics, Applications, and Implementation of Program Generation, International Workshop SAIG 2000, Montreal, Canada, September 20, 2000, Proceedings, volume 1924 of Lecture Notes in Computer Science, pages 172--189. Springer-Verlag, 2000.
[6]
}}N. Bjørner. Minimal typing derivations. In Record of the 1994 ACM SIGPLAN Workshop on ML and its Applications, Orlando, Florida (USA), June 25--26, 1994, pages 120--126, 1994. The proceedings of the workshop have been published as a technical report (2265) at the Institute National Recherche en Informatique et Automatique.
[7]
}}L. Damas and R. 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.
[8]
}}F. Damiani. A conjunctive type system for useless-code elimination. Mathematical Structures in Computer Science, 13(1):157--197, 2003.
[9]
}}F. Damiani and P. Giannini. Automatic useless-code elimination for HOT functional programs. Journal of Functional Programming, 10(6):509--559, 2000.
[10]
}}F. Damiani and F. Prost. Detecting and removing dead-code using rank 2 intersection. In E. Giménez and C. Paulin-Mohring, editors, Types for Proofs and Programs, International Workshop, TYPES 1996, Aussois, France, December 15--19, 1996, Selected Papers, volume 1512 of Lecture Notes in Computer Science, pages 66--87. Springer-Verlag, 1998.
[11]
}}J. R. Hindley. The principal type-scheme of an object in combinatory logic. Transactions of the Americal Mathematical Society, 146:29--60, 1969.
[12]
}}G. Hogen, A. Kindler, and R. Loogen. Automatic parallelization of lazy functional programs. In B. Krieg-Brückner, editor, ESOP '92, 4th European Symposium on Programming, Rennes, France, February 26--28, 1992, Proceedings, volume 582 of Lecture Notes in Computer Science, pages 254--268. Springer-Verlag, 1992.
[13]
}}T. P. Jensen. Inference of polymorphic and conditional strictness properties. In POPL '98, Proceedings of the 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, January 19--21, 1998, San Diego, CA, USA, pages 209--221. ACM Press, 1998.
[14]
}}T. 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 Symposium, St. Petersburg Beach, Florida, 21--24 January 1996, pages 42--53. ACM Press, 1996.
[15]
}}A. J. Kfoury, H. G. Mairson, F. A. Turbak, and J. B. Wells. Relating typabililty and expressiveness in finte-rank intersection type systems (Extended abstract). In Proceedings of the Fourth ACM SIGPLAN International Conference on Functional Programming (ICFP '99), Paris, France, September 27--29, 1999, pages 90--101. ACM Press, 1999.
[16]
}}A. J. Kfoury and J. 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.
[17]
}}N. Kobayashi. Type-based useless variable elimination. In Proceedings of the 2000 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM '00), Boston, Massachusetts, USA, January 22--23, 2000, pages 84--93, 2000.
[18]
}}R. Milner, M. Tofte, R. Harper, and D. B. MacQueen. The Definition of Standard ML (Revised). The MIT Press, Cambridge, Massachusetts, 1997.
[19]
}}C. Paulin-Mohring. Extracting Fω's programs from proofs in the Calculus of Constructions. In Conference Record of the Sixteenth Annual ACM Symposium on Principles of Programming Langauges, Austin, Texas, January 1989, pages 89--104. ACM Press, 1989.
[20]
}}S. Peyton Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, Cambridge, 2003.
[21]
}}D. N. Turner, P. Wadler, and C. Mossin. Once upon a type. In Conference Record of FPCA '95 SIGPLAN-SIGARCH-WG2.8 Conference on Functional Programming Languages and Computer Architecture. La Jolla, CA, USA, 25--28 June 1995, pages 1--11. ACM Press, 1995.
[22]
}}K. Wansbrough. Simple Polymorphic Usage Analysis. PhD thesis, University of Cambridge, 2002.
[23]
}}K. Wansbrough and S. 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.

Cited By

View all
  • (2010)Polyvariant flow analysis with higher-ranked polymorphic types and higher-order effect operatorsACM SIGPLAN Notices10.1145/1932681.186355445:9(63-74)Online publication date: 27-Sep-2010
  • (2010)Polyvariant flow analysis with higher-ranked polymorphic types and higher-order effect operatorsProceedings of the 15th ACM SIGPLAN international conference on Functional programming10.1145/1863543.1863554(63-74)Online publication date: 27-Sep-2010

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
LDTA '10: Proceedings of the Tenth Workshop on Language Descriptions, Tools and Applications
March 2010
93 pages
ISBN:9781450300636
DOI:10.1145/1868281
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

  • University of Minnesota Software Engineering Center

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 28 March 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. annotated type systems
  2. minimal typing derivations
  3. type-driven program transformation

Qualifiers

  • Research-article

Conference

LDTA '10
Sponsor:

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 08 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2010)Polyvariant flow analysis with higher-ranked polymorphic types and higher-order effect operatorsACM SIGPLAN Notices10.1145/1932681.186355445:9(63-74)Online publication date: 27-Sep-2010
  • (2010)Polyvariant flow analysis with higher-ranked polymorphic types and higher-order effect operatorsProceedings of the 15th ACM SIGPLAN international conference on Functional programming10.1145/1863543.1863554(63-74)Online publication date: 27-Sep-2010

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media