MetaCart Sign in to MyCiteSeerX

Include Citations | Advanced Search | Help

Disambiguated Search | Include Citations | Advanced Search | Help

Unboxed values as first class citizens in a non-strict functional language (1991) [86 citations — 6 self]

by Simon L Peyton Jones ,  John Launchbury
Proceedings of the 5th ACM conference on Functional programming languages and computer architecture
Add To MetaCart

Abstract:

The code compiled from a non-strict functional program usually manipulates heap-allocated boxed numbers. Compilers for such languages often go to considerable trouble to optimise operations on boxed numbers into simpler operations on their unboxed forms. These optimisations are usually handled in an ad hoc manner in the code generator, because earlier phases of the compiler have no way to talk about unboxed values. We present a new approach, which makes unboxed values into (nearly) first-class citizens. The language, including its type system, is extended to handle unboxed values. The optimisation of boxing and unboxing operations can now be reinterpreted as a set of correctness-preserving program transformations. Indeed the particular transformations required are ones which a compiler would want to implement anyway. The compiler becomes both simpler and more modular. Two other benefits accrue. Firstly, the results of strictness analysis can be exploited within the same uniform transformational framework. Secondly, new algebraic data types with unboxed components can be declared. Values of these types can be manipulated much more efficiently than the corresponding boxed versions. Both a static and a dynamic semantics are given for the augmented language. The denotational dynamic semantics is notable for its use of unpointed domains.

Citations

479 The Implementation of Functional Programming Languages – Jones - 1987
345 Computational lambda-calculus and monads – Moggi - 1989
270 Denotational semantics: A Methodology for Language Development – Schmidt - 1986
114 Report on the Functional Programming Language Haskell: a non{strict, purely functional language. Sigplan Notices – Hudak, Peyton-Jones, et al. - 1992
101 Continuation-passing, closure-passing style – Appel, Jim - 1989
69 Realistic compilation by program transformation – Kelsey, Hudak - 1989
14 Efficient data representation in polymorphic languages – Leroy - 1990
13 Untagged data in tagged environments: choosing optimal representations at compile time – Peterson - 1989
12 ORBIT - an optimising compiler for Scheme – Kranz - 1988
4 1978], "Rabbit: a compiler for Scheme," AI-TR-474 – Steele
1 1988], "Runtime tags aren't necessary – Appel
1 R Milner [1982], "Principal type schemes for functional programs – Damas
1 D Le Metayer [1990], "Compilation of functional languages by program transformation – Fradet
1 D Le Metayer[June 1988], "Compilation of lambda-calculus into functional machine code," INRIA – Fradet
1 Jones [Feb 1991], "The Spineless Tagless G-machine: a second attempt – Peyton
1 GD Plotkin [Nov 1982], "The category-theoretic solution of recursive domain equations – Smyth