Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/207110.207123acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free access

A type-based compiler for standard ML

Published: 01 June 1995 Publication History
  • Get Citation Alerts
  • Abstract

    Compile-time type information should be valuable in efficient compilation of statically typed functional languages such as Standard ML. But how should type-directed compilation work in real compilers, and how much performance gain will type-based optimizations yield? In order to support more efficient data representations and gain more experience about type-directed compilation, we have implemented a new type-based middle end and back end for the Standard ML of New Jersey compiler. We describe the basic design of the new compiler, identify a number of practical issues, and then compare the performance of our new compiler with the old non-type-based compiler. Our measurement shows that a combination of several simple type-based optimizations reduces heap allocation by 36%; and improves the already-efficient code generated by the old non-type-based compiler by about 19% on a DECstation 500.

    References

    [1]
    William E. Aitken and John H. Reppy. Abstract value constructors: Symbolic constants for Standard ML. Technical Report TR 92-1290, Department of Computer Science, Cotnell University, June 1992. A shorter version appears in the proceedings of the "ACM SIGPLAN Workshop on ML and its Applications," 1992.
    [2]
    Andrew W. Appel. A runtlme system. Lisp and Symbolic Computation, 3(4):343-80, 1990.
    [3]
    Andrew W. Appel. Compiling with Continuations. Cambridge University Press, 1992.
    [4]
    Andrew W. Appel and Trevor Jim. Continuation-passing, closure-passing style. In Sixteenth A CM Syrup. on Principles of Programming Languages, pages 293-302, New York, 1989. ACM Press.
    [5]
    Andrew W. Appel and David B. MacQueen. Standard ML of New Jersey. In Martin Wirsing, editor, Third Int'I Syrup. on Prog. Lang. Implementation and Logic Programming, pages 1-13, New York, August 1991. Springer-Verlag.
    [6]
    Andrew W. Appel and Zhong Shao. Callee-save registers in continuation-passing style. Lisp and Symbolic Cornputatton, 5:189-219, September 1992.
    [7]
    Nikolaj S. Bjorner. Minimial typing derivations. In A CM SIGPLAN Workshop on ML and its Applications, pages 120- 126, June 1994.
    [8]
    Craig Chambers. The Design and bnplementation of the SELF Compiler, an Optimizbzg Compiler for Object-Orielzted Programming Languages. PhD thesis, Stanford University, Stanford,California, March 1992. Tech Report STAN-CS- 92-1420.
    [9]
    Craig Chambers and David Ungar. Customization: Optimizing compiler technology for SELF, a dynamically-typed object-oriented programming language. In Proc. ACM SIG- PLAN '89 Conf. on Prog. Lang. Design and hnplementati~n' pages I46-160, New York, July 1989. ACM Press.
    [10]
    Luis Damas and Robin Milner. Principal type-schemes for functional programs. In Ninth A CM Symposium on Principles of Programming Languages, pages 207-12, New York, 1982. ACM Press.
    [11]
    Robert Harper and Mark Lillibridge. A type-theoretic approach to higher-order modules with sharing. In %t'enn' First AnnltalACM S3,mp. on Principles of Prog. Langttages, pages 123-137, New York, Jan 1994. ACM Press.
    [12]
    Robert Harper and Greg Morrisett. Compiling polymorphlsm using intenslonal type analysis. In T~ventv-second Annlta{ A CM &'mp. on Prtnciples of Prog. La,~lguages, pages 130- 141, New York, Jan 1995. ACM Press.
    [13]
    Fritz Henglein and Jesper Jorgensen. Formally optimal boxing. In Proc. 21st Annual A CM SIGPLAN-SIGA CT &'rap. on Principles of Programming Languages, pages 213-226. ACM Press, 1994.
    [14]
    David Kranz. ORBIT.' An opttmtzing compiler for Scheme. PhD thesis, Yale University, New Haw~n, CT, I987.
    [15]
    Xavier Leroy. Unboxed objects and polymorphic typing. In Nineteenth Annual A CM ~'rap. on Prit,lciples of Prog. Languages, pages 177-188, New York, January I992. ACM Press.
    [16]
    Xavier Leroy. Manifest types, modules, and separate compilation. In TweJzt~' First Annual A CM Syrup. ot~ Principles of Prog. Languages, pages 109-122, New York, Jan 1994. ACM Press.
    [17]
    Dawd B. MacQueen and Mads Tofte. A semantics for higher-order functors. In Proc. Ettropea~'z Symposium on Programmhlg (ESOP'94), pages 409-423, April 1994.
    [18]
    Robin Milner and Mads Torte. Commentary on Standard ML. MIT Press, Cambridge, Massachusetts, 1991.
    [19]
    Robin Milner, Mads Tofte, and Robert Harper. The Definition of Standard ML. MIT Press, Cambridge, MA, 1990.
    [20]
    Simon L. Peyton Jones and John Launchbury. Unboxed values as first class cit;zens in a non-strict functional language. In The Fifth International Conference on Functional Programming Languages and Computer A~vhitecture, pages 636-666, New York, August 1991. ACM Press.
    [21]
    Eigil Poulsen, Representation analysis for efficient implementation of polymorph~sm. Master's thes~s, DiKU, University of Copenhagen, 1993.
    [22]
    Zhong Shao. Compiling Standard ML for Efficient Execution on Modern Machines. PhD thesis, Princeton University, Princeton, NJ, November 1994. Tech Report CS-TR-475-94.
    [23]
    Zhong Shao and Andrew W. Appel. Space-efficient closure representations. In Proc. 1994 A CM Conf on Lisp and Ftmctional Programming, pages 150-16 I. ACM Press, 1994.
    [24]
    Guy L. Steele. Rabbit: a compiler for Scheme. Technical Report AI-TR-474, MIT, Cambridge. MA, 1978.
    [25]
    Mads Torte. Prlnc~pal signatures t br higher-order program modules. In Nineteenth Annual A CM &vmp. on Principles of Prog. Languages, pages 189-199, New York, Jan 1992. ACM Press.
    [26]
    David M. Ungar. The Design and Evaluation of a High Performance Smatttalk System. MIT Press., Cambridge, MA, 1986.

    Cited By

    View all

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    PLDI '95: Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation
    June 1995
    335 pages
    ISBN:0897916972
    DOI:10.1145/207110
    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 June 1995

    Permissions

    Request permissions for this article.

    Check for updates

    Qualifiers

    • Article

    Conference

    PLDI95
    Sponsor:

    Acceptance Rates

    PLDI '95 Paper Acceptance Rate 28 of 105 submissions, 27%;
    Overall Acceptance Rate 406 of 2,067 submissions, 20%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)81
    • Downloads (Last 6 weeks)16
    Reflects downloads up to 11 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2020)The history of Standard MLProceedings of the ACM on Programming Languages10.1145/33863364:HOPL(1-100)Online publication date: 12-Jun-2020
    • (2019)A Survey of DevOps Concepts and ChallengesACM Computing Surveys10.1145/335998152:6(1-35)Online publication date: 14-Nov-2019
    • (2017)Privacy-Enhanced Television Audience MeasurementsACM Transactions on Internet Technology10.1145/300996917:1(1-29)Online publication date: 25-Feb-2017
    • (2016)On the Relative Expressiveness of Higher-Order Session ProcessesProceedings of the 25th European Symposium on Programming Languages and Systems - Volume 963210.1007/978-3-662-49498-1_18(446-475)Online publication date: 2-Apr-2016
    • (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
    • (2014)Structure-Preserving CompilationProceedings of the 16th International Symposium on Principles and Practice of Declarative Programming10.1145/2643135.2643157(187-198)Online publication date: 8-Sep-2014
    • (2012)Optimization coachingACM SIGPLAN Notices10.1145/2398857.238462947:10(163-178)Online publication date: 19-Oct-2012
    • (2012)Optimization coachingProceedings of the ACM international conference on Object oriented programming systems languages and applications10.1145/2384616.2384629(163-178)Online publication date: 19-Oct-2012
    • (2011)An equivalence-preserving CPS translation via multi-language semanticsProceedings of the 16th ACM SIGPLAN international conference on Functional programming10.1145/2034773.2034830(431-444)Online publication date: 19-Sep-2011
    • Show More Cited By

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media