ABSTRACT
This paper presents a technique for compiling Standard ML Modules into typed intermediate language fragments, which may be compiled separately and linked using traditional linking technology to form executable code. The technique is called static interpretation and allows compile-time implementation details to propagate across module boundaries. Static interpretation eliminates all module-level code at compile time.The technique scales to full Standard ML and is used in the ML Kit with Regions compiler. A framework for smart recompilation makes the technique useful for compiling large programs.
- 1.Laxs Birkedal, Mads Tofte, and Magnus Vejlstrup. From region inference to yon Neurnann machines via region representation inference. In ~13rd ACM Symposium on Principles of Programming Languages, January 1996. , Google ScholarDigital Library
- 2.Luis Dumas and Robin Milner. Principal type schemes for functional programs. In 9th A CM Symposium on Principles of Programming Languages, January 1982. Google ScholarDigital Library
- 3.Martin Elsman. Program Modules, Separate Compilation, and Intermodule Optimisation. P hD thesis, Department of Computer Science, University of Copenhagen, January 1999.Google Scholar
- 4.The Berkeley ANalysis Engine Group. The BANE de-functorizer. Available via the URL http: / /www. cs. berkeley, edu/Research / Aiken / bane. html.Google Scholar
- 5.Robert Harper and Mark LiUibridge. A type-theoretic approach to higher-order modules with sharing. In 21st A CM Symposium on Principles of Programming Languages, January 1994. Google ScholarDigital Library
- 6.Robert Harper and Chris Stone. An interpretation of Standard ML in type theory. Technical report, Carnegie Mellon University, June 1997. CMU-CS-97-147.Google Scholar
- 7.Stefan Kahrs. Mistakes and ambiguities in the definition of Standard ML. Technical report, University of Edinburgh, Laboratory for Foundations of Computer Science, April 1993. There is an Addenda for this paper, written June 94.Google Scholar
- 8.Xavier Leroy. Polymorphic Typing of an Algorithmic Language. PhD thesis, INRIA, October 1992.Google Scholar
- 9.Xavier Leroy. Manifest types, modules, and separate compilation. In 21st A CM Symposium on Principles of Programming Languages, pages 109-122, 1994. Google ScholarDigital Library
- 10.Robin Milner. A theory of type polymorphism in programming languages. Journal of Computer and System Sciences, 17:348-375, 1978.Google ScholarCross Ref
- 11.Robin Milner, Muds Torte, Robert Harper, and David MacQueen. The Definition of Standard ML (Revised). MIT Press, 1997. Google ScholarDigital Library
- 12.Claudio V. Russo. Types for Modules. PhD thesis, University of Edinburgh, Department of Computer Science, june 1998.Google Scholar
- 13.Zhong Shao. Typed cross-module compilation. Technical report, Department of Computer Science, Yale University, July 1997. YALEU/DCS/TR-1126.Google Scholar
- 14.Mads Torte. Operational Semantics and Polymorphic Type Inference. PhD thesis, University of Edinburgh, Department of Computer Science, May 1988.Google Scholar
- 15.Marls Torte and Lars Birkedal. A region inference algorithm. 2~cansactions on Programming Languages and Systems (TOPLAS), 20(4):734-767, 1998. Google ScholarDigital Library
- 16.Mads Torte, Lars Birkedal, Martin Elsman, Niels Hallenberg, Tommy Hojfeld Olesen~ Peter Sestoft~ and Peter Bertelsen. Programming with regions in the ML Kit (for version 3). Technical report, Department of Computer Science, University of Copenhagen, December 1998.Google Scholar
- 17.Mads Tofte and Jean-Pierre Talpin. Implementation of the typed call-by-value A-calculus using a stack of regions. In 21st A CM Symposium on Principles of Programming Languages, january 1994. Google ScholarDigital Library
- 18.Mads Torte and jean-Pierre Talpin. Region-based memory management. Information and Computation, 132(2):109-176, 1997. Google ScholarDigital Library
- 19.Stephen Weeks. stoic user's guide. A whole-program Standard ML compiler, August 1998.Google Scholar
Index Terms
- Static interpretation of modules
Recommendations
Static interpretation of higher-order modules in Futhark: functional GPU programming in the large
We present a higher-order module system for the purely functional data-parallel array language Futhark. The module language has the property that it is completely eliminated at compile time, yet it serves as a powerful tool for organizing libraries and ...
Static interpretation of modules
This paper presents a technique for compiling Standard ML Modules into typed intermediate language fragments, which may be compiled separately and linked using traditional linking technology to form executable code. The technique is called static ...
Optimiizing Static Scope Lisp by Repetitive Interpretation of Recursive Function Calls
This paper presents some recent results in interpreter optimization. The techniques of shallow binding and repetitive interpretation of tail recursive functions are adapted to Lisp with static scoping as the binding method for-all identifiers. Then a ...
Comments