Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/1596638.1596640acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Types are calling conventions

Published: 03 September 2009 Publication History

Abstract

It is common for compilers to derive the calling convention of a function from its type. Doing so is simple and modular but misses many optimisation opportunities, particularly in lazy, higher-order functional languages with extensive use of currying. We restore the lost opportunities by defining Strict Core, a new intermediate language whose type system makes the missing distinctions: laziness is explicit, and functions take multiple arguments and return multiple results.

Supplementary Material

JPG File (typesarecallingconventionsonvimeo.jpg)
MP4 File (typesarecallingconventionsonvimeo.mp4)

References

[1]
A. P. Black, M. Carlsson, M. P. Jones, D. Kieburtz, and J. Nordlander. Timber: a programming language for real-time embedded systems. Technical Report CSE-02-002, Oregon Health&Science University, 2002.
[2]
S. Marlow and S. Peyton Jones. How to make a fast curry: push/enter vs eval/apply. In International Conference on Functional Programming, pages 4--15, September 2004.
[3]
J. Launchbury. A natural semantics for lazy evaluation. In Principles of Programming Languages, pages 144--154. ACM, January 1993.
[4]
S. Peyton Jones, W. D Partain, and A. Santos. Let-floating: moving bindings to give faster programs. In International Conference on Functional Programming, 1996.
[5]
S. Peyton Jones and John Launchbury. Unboxed values as first class citizens in a non-strict functional language. In Functional Programming Languages and Computer Architecture, pages 636--666. Springer, 1991.
[6]
M. Sulzmann, M. Chakravarty, S. Peyton Jones, and K. Donnelly. System F with type equality coercions. In ACM SIGPLAN International Workshop on Types in Language Design and Implementation (TLDI'07). ACM, 2007.
[7]
J. Girard. The system F of variable types, fifteen years later. Theoretical Computer Science, 45(2):159--192, 1986.
[8]
S. Peyton Jones and A. Santos. A transformation--based optimiser for Haskell. Science of Computer Programming, 32(1-3):3--47, September 1998.
[9]
A. Gill and G. Hutton. The worker/wrapper transformation. Journal of Functional Programming, 19(2):227--251, March 2009.
[10]
C. Baker-Finch, K. Glynn, and S. Peyton Jones. Constructed product result analysis for haskell. Journal of Functional Programming, 14(2):211--245, 2004.
[11]
N. Benton, A. Kennedy, and G. Russell. Compiling standard ML to Java bytecodes. In International Conference on Functional Programming, pages 129--140, New York, NY, USA, 1998. ACM.
[12]
M. Serrano and P. Weis. Bigloo: A portable and optimizing compiler for strict functional languages. In International Symposium on Static Analysis, pages 366--381, London, UK, 1995. Springer--Verlag.
[13]
A. Appel. Compiling with Continuations. Cambridge University Press, 1992.
[14]
S. Peyton Jones, M. Shields, J. Launchbury, and A. Tolmach. Bridging the gulf: a common intermediate language for ML and Haskell. In Principles of Programming Languages, pages 49--61, New York, NY, USA, 1998. ACM.
[15]
U. Boquist. Code Optimisation Techniques for Lazy Functional Languages. PhD thesis, Chalmers University of Technology, April 1999.
[16]
K. Faxen. Flow Inference, Code Generation, and Garbage Collection for Lazy Functional Languages. PhD thesis, KTH Royal Institute Of Technology, June 1997.
[17]
B. Rudiak-Gould, A. Mycroft, and S. Peyton Jones. Haskell is not not ML. In European Symposium on Programming, 2006.
[18]
J. Hannan and P. Hicks. Higher-order uncurrying. Higher Order Symbolic Computation, 13(3):179--216, 2000.
[19]
J. Hannan and P. Hicks. Higher-order arity raising. In International Conference on Functional Programming, pages 27--38, New York, NY, USA, 1998. ACM.
[20]
Z. Dargaye and X. Leroy. A verified framework for higher-order uncurrying optimizations. March 2009.
[21]
S. Peyton Jones. Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine. Journal of Functional Programming, 2:127--202, April 1992.
[22]
T. Altenkirch and N. Oury. PiSigma: A core language for dependently typed programming. 2008.
[23]
T. Brus, M. van Eekelen, M. van Leer, and M. Plasmeijer. Clean -- a language for functional graph rewriting. Functional Programming Languages and Computer Architecture, pages 364--384, 1987.

Cited By

View all
  • (2019)Making a faster Curry with extensional typesProceedings of the 12th ACM SIGPLAN International Symposium on Haskell10.1145/3331545.3342594(58-70)Online publication date: 8-Aug-2019
  • (2014)Late data layoutACM SIGPLAN Notices10.1145/2714064.266019749:10(397-416)Online publication date: 15-Oct-2014
  • (2014)Late data layoutProceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications10.1145/2660193.2660197(397-416)Online publication date: 15-Oct-2014
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
Haskell '09: Proceedings of the 2nd ACM SIGPLAN symposium on Haskell
September 2009
148 pages
ISBN:9781605585086
DOI:10.1145/1596638
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: 03 September 2009

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. arity
  2. calling conventions
  3. intermediate language
  4. strictness
  5. unboxing
  6. uncurrying

Qualifiers

  • Research-article

Conference

ICFP '09
Sponsor:

Acceptance Rates

Overall Acceptance Rate 57 of 143 submissions, 40%

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)6
  • Downloads (Last 6 weeks)0
Reflects downloads up to 29 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2019)Making a faster Curry with extensional typesProceedings of the 12th ACM SIGPLAN International Symposium on Haskell10.1145/3331545.3342594(58-70)Online publication date: 8-Aug-2019
  • (2014)Late data layoutACM SIGPLAN Notices10.1145/2714064.266019749:10(397-416)Online publication date: 15-Oct-2014
  • (2014)Late data layoutProceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications10.1145/2660193.2660197(397-416)Online publication date: 15-Oct-2014
  • (2013)The Intel labs Haskell research compilerACM SIGPLAN Notices10.1145/2578854.250377948:12(105-116)Online publication date: 23-Sep-2013
  • (2013)The Intel labs Haskell research compilerProceedings of the 2013 ACM SIGPLAN symposium on Haskell10.1145/2503778.2503779(105-116)Online publication date: 23-Sep-2013
  • (2010)Strictness meets data flowProceedings of the 17th international conference on Static analysis10.5555/1882094.1882121(439-454)Online publication date: 14-Sep-2010
  • (2010)Strictness Meets Data FlowStatic Analysis10.1007/978-3-642-15769-1_27(439-454)Online publication date: 2010
  • (2009)Arity raising in manticoreProceedings of the 21st international conference on Implementation and application of functional languages10.5555/1929087.1929093(90-106)Online publication date: 23-Sep-2009
  • (2009)The architecture of the Utrecht Haskell compilerProceedings of the 2nd ACM SIGPLAN symposium on Haskell10.1145/1596638.1596650(93-104)Online publication date: 3-Sep-2009

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media