skip to main content
10.1145/1291151.1291189acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

A generic usage analysis with subeffect qualifiers

Published: 01 October 2007 Publication History

Abstract

Sharing analysis and uniqueness typing are static analyses that aim at determining which of a program's objects are to be used at most once. There are many commonalities between these two forms of usage analysis. We make their connection precise by developing an expressive generic analysis that can be instantiated to both sharing analysis and uniqueness typing. The resulting system, which combines parametric polymorphism with effect subsumption, is specified within the general framework of qualified types, so that readily available tools and techniques can be used for the development of implementations and metatheory.

References

[1]
Erik Barendsen and Sjaak Smetsers. Conventional and uniqueness typing in graph rewrite systems. In R. K. Shyamasundar, editor, Foundations of Software Technology and Theoretical Computer Science, 13th Conference, Bombay, India, December 15-17, 1993, Proceedings, volume 761 of Lecture Notes in Computer Science, pages 41--51. Springer-Verlag, 1993.
[2]
Erik Barendsen and Sjaak Smetsers. Uniqueness type inference. In Manuel V. Hermenegildo and S. Doaitse Swierstra, editors, Programming Languages: Implementation, Logics and Programs, 7th International Symposium, PLILP'95, Utrecht, The Netherlands, September 20-22, 1995, Proceedings, volume 982 of Lecture Notes in Computer Science, pages 189--206. Springer-Verlag, 1995.
[3]
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.
[4]
Edsko de Vries, Rinus Plasmeijer, and David Abrahamson. Uniqueness typing redefined. In Zoltán Horváth, Viktória Zsók, and Andrew Butterfield, editors, Implementation and Application of Functional Languages, 18th International Workshop, IFL 2006, Budapest, Hungary, September 4-6, 2006, Revised Selected Papers, volume 4449 of Lecture Notes in Computer Science, pages 181--198. Springer-Verlag, 2007.
[5]
Tobias Gedell, Jörgen Gustavsson, and Josef Svenningsson. Polymorphism, subtyping, whole program analysis and accurate data types in usage analysis. In Naoki Kobayashi, editor, Programming Languages and Systems, 4th Asian Symposium, APLAS 2006, Sydney, Australia, November 8-10, 2006, Proceedings, volume 4279 of Lecture Notes in Computer Science, pages 200--216. Springer-Verlag, 1999.
[6]
John M. Gifford, David K. Lucassen. Integrating functional and imperative programming. In Proceedings of the 1986 ACM Conference on LISP and Functional Programming, August 4-6, 1986, Cambridge, Massachusetts, USA, pages 28--38. ACM Press, 1986.
[7]
Jean-Yves Girard. Interprétation fonctionelle et élimination des coupures de l'arithmétique d'ordre supérieur. PhD thesis, Université Paris VII, 1972.
[8]
Benjamin Goldberg. Detecting sharing of partial applications in functional programs. In Gilles Kahn, editor, Functional Programming Languages and Computer Architecture, Portland, Oregon, USA, September 14-16, 1987, Proceedings, volume 274 of Lecture Notes in Computer Science, pages 408--425. Springer-Verlag, 1987.
[9]
Jörgen Gustavsson. Space-Safe Transformation and Usage Analysis for Call-by-Need Languages. PhD thesis, Göteborg University, 2001.
[10]
Jörgen Gustavsson. A type based sharing analysis for update avoidance and optimisation. In Proceedings of the third ACM SIGPLAN International Conference on Functional Programming (ICFP '98), Baltimore, Maryland, USA, September 27-29, 1998, pages 39--50. ACM Press, 1999.
[11]
Jörgen Gustavsson and David Sands. A foundation for space-safe transformations of call-by-need programs. Electronic Notes in Theoretical Computer Science, 26:69--86, 1999.
[12]
Jörgen Gustavsson and Josef Svenningsson. A usage analysis with bounded usage polymorphism and subtyping. In Markus Mohnen and Pieter W. M. Koopman, editors, Implementation of Functional Languages, 12th International Workshop, IFL 2000, Aachen, Germany, September 4-7, 2000, Selected Papers, volume 2011 of Lecture Notes in Computer Science, pages 140--157. Springer-Verlag, 2001.
[13]
Bastiaan Heeren. Top Quality Type Error Messages. PhD thesis, Utrecht University, 2005.
[14]
J. Roger Hindley. The principal type-scheme of an object in combinatory logic. Transactions of the Americal Mathematical Society, 146:29--60, 1969.
[15]
Mark P. Jones. Qualified Types: Theory and Practice. Cambridge University Press, Cambridge, 1994.
[16]
Mark P. Jones. Simplifying and improving qualified types. 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 160--169. ACM Press, 1995.
[17]
Stefan Kaes. Parametric overloading in polymorphic programming languages. In Harald Ganzinger, editor, ESOP '88, 2nd European Symposium on Programming, Nancy, France, March 21-24, 1988, Proceedings, volume 300 of Lecture Notes in Computer Science, pages 131--144. Springer-Verlag, 1988.
[18]
Naoki Kobayashi. Quasi-linear 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 29--42. ACM Press, 1999.
[19]
John Launchbury, Andy Gill, John Hughes, Simon Marlow, Simon Peyton Jones, and Philip Wadler. Avoiding unnecessary updates. In John Launchbury and Patrick M. Sansom, editors, Functional Programming, Glasgow 1992, Proceedings of the 1992 Glasgow Workshop on Functional Programming, Ayr, Scotland, 6-8 July 1992, Workshops in Computing, pages 144--153. Springer-Verlag, 1992.
[20]
Jeffrey R. Lewis, John Launchbury, Erik Meijer, and Mark Shields. Implicit parameters: Dynamic scoping with static types. In POPL 2000, Proceedings of the 27th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, January 19-21, 2000, Boston, Massachusetts, pages 108--118. ACM Press, 2000.
[21]
Simon Marlow. Update avoidance analysis by abstract interpretation. In Kevin Hammond and John T. O'Donnell, editors, 1993 Glasgow Workshop on Functional Programming, Ayr, pages 170--184. Springer-Verlag, 1994.
[22]
Robin Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17(3):348--375, 1978.
[23]
Torben Æ. Mogensen. Types for 0, 1 or many uses. In Chris Clack, Kevin Hammond, and Anthony J. T. Davie, editors, Implementation of Functional Languages, 9th International Workshop, IFL'97, St. Andrews, Scotland, UK, September 10-12, 1997, Selected Papers, volume 1467 of Lectures Notes in Computer Science, pages 112--122. Springer-Verlag, 1998.
[24]
Flemming Nielson and Hanne Riis Nielson. Type and effect systems. In Enst-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.
[25]
Simon Peyton Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, Cambridge, 2003.
[26]
Rinus Plasmeijer and Marco van Eekelen. Concurrent Clean language report-version 1.3. Technical Report CSI-R9816, University of Nijmegen, 1998.
[27]
John C. Reynolds. Towards a theory of type structure. In Bernard Robinet, editor, Programming Symposium, Proceedings Colloque sur la Programmation, Paris, France, April 9-11, 1974, volume 19 of Lecture Notes in Computer Science, pages 408--423. Springer-Verlag, 1974.
[28]
Peter Sestoft. Deriving a lazy abstract machine. Journal of Functional Programming, 7:231--264, 1997.
[29]
Jean-Pierre Talpin and Pierre Jouvelot. A type and effect discipline. Information and Computation, 111(2):245--296, 1994.
[30]
David N. Turner, Philip Wadler, and Christian 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.
[31]
Philip Wadler and Stephen Blott. How to make ad-hoc polymorphism less ad-hoc. In Conference Record of the Sixteenth Annual ACM Symposium on Principles of Programming Languages, Austin, Texas, January 1989, pages 60--76. ACM Press, 1989.
[32]
Keith Wansbrough. Simple Polymorphic Usage Analysis. PhD thesis, University of Cambridge, 2002.
[33]
Keith Wansbrough and Simon Peyton Jones. Simple usage polymorphism. In Preliminary Proceedings of the Third Workshop on Types in Compilation (TIC 2000), 2000. The proceedings of the workshop have been published as a technical report (CMU-CS-00-161) at Carnegie Mellon University.
[34]
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--18. ACM Press, 1999.

Cited By

View all
  • (2017)The Sky is the LimitProceedings of the 29th Symposium on the Implementation and Application of Functional Programming Languages10.1145/3205368.3205376(1-12)Online publication date: 30-Aug-2017
  • (2017)Predicting resource consumption of higher-order workflowsProceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation10.1145/3018882.3018885(99-110)Online publication date: 2-Jan-2017
  • (2017)Modular, higher order cardinality analysis in theory and practiceJournal of Functional Programming10.1017/S095679681700001627Online publication date: 16-Feb-2017
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '07: Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
October 2007
346 pages
ISBN:9781595938152
DOI:10.1145/1291151
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 42, Issue 9
    Proceedings of the ICFP '07 conference
    September 2007
    331 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1291220
    Issue’s Table of Contents
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

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 October 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. qualified types
  2. sharing analysis
  3. type and effect systems
  4. uniqueness typing

Qualifiers

  • Article

Conference

ICFP07
Sponsor:

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

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

Other Metrics

Citations

Cited By

View all
  • (2017)The Sky is the LimitProceedings of the 29th Symposium on the Implementation and Application of Functional Programming Languages10.1145/3205368.3205376(1-12)Online publication date: 30-Aug-2017
  • (2017)Predicting resource consumption of higher-order workflowsProceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation10.1145/3018882.3018885(99-110)Online publication date: 2-Jan-2017
  • (2017)Modular, higher order cardinality analysis in theory and practiceJournal of Functional Programming10.1017/S095679681700001627Online publication date: 16-Feb-2017
  • (2016)The best of both worlds: linear functional programming without compromiseACM SIGPLAN Notices10.1145/3022670.295192551:9(448-461)Online publication date: 4-Sep-2016
  • (2016)The best of both worlds: linear functional programming without compromiseProceedings of the 21st ACM SIGPLAN International Conference on Functional Programming10.1145/2951913.2951925(448-461)Online publication date: 4-Sep-2016
  • (2014)Modular, higher-order cardinality analysis in theory and practiceACM SIGPLAN Notices10.1145/2578855.253586149:1(335-347)Online publication date: 8-Jan-2014
  • (2014)Modular, higher-order cardinality analysis in theory and practiceProceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2535838.2535861(335-347)Online publication date: 11-Jan-2014
  • (2014)Security type error diagnosis for higher-order, polymorphic languagesScience of Computer Programming10.1016/j.scico.2014.03.01195:P2(200-218)Online publication date: 1-Dec-2014
  • (2013)Modelling Unique and Affine Typing Using PolymorphismEssays Dedicated to Rinus Plasmeijer on the Occasion of His 61st Birthday on The Beauty of Functional Code - Volume 810610.1007/978-3-642-40355-2_13(181-192)Online publication date: 1-Jun-2013
  • (2011)Challenges for a trace-based just-in-time compiler for haskellProceedings of the 23rd international conference on Implementation and Application of Functional Languages10.1007/978-3-642-34407-7_4(51-68)Online publication date: 3-Oct-2011
  • Show More Cited By

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