Programming in MODULA-2 (3rd corrected ed.)
Programming in MODULA-2 (3rd corrected ed.)
Logic for problem-solving
A Machine-Oriented Logic Based on the Resolution Principle
Journal of the ACM (JACM)
Functional Programming
Anatomy of LISP
HOPE: An experimental applicative language
LFP '80 Proceedings of the 1980 ACM conference on LISP and functional programming
ACM '77 Proceedings of the 1977 annual conference
Rabbit: A Compiler for Scheme
Principles of Compiler Design (Addison-Wesley series in computer science and information processing)
Principles of Compiler Design (Addison-Wesley series in computer science and information processing)
SIGPLAN '86 Proceedings of the 1986 SIGPLAN symposium on Compiler construction
A foundation for programming environments
SDE 2 Proceedings of the second ACM SIGSOFT/SIGPLAN software engineering symposium on Practical software development environments
A RISC architecture for symbolic computation
ASPLOS II Proceedings of the second international conference on Architectual support for programming languages and operating systems
Real-time concurrent collection on stock multiprocessors
PLDI '88 Proceedings of the ACM SIGPLAN 1988 conference on Programming Language design and Implementation
A piggy-back compiler for Prolog
PLDI '88 Proceedings of the ACM SIGPLAN 1988 conference on Programming Language design and Implementation
Comparing Two Functional Programming Systems
IEEE Transactions on Software Engineering
From operational semantics to abstract machines: preliminary results
LFP '90 Proceedings of the 1990 ACM conference on LISP and functional programming
POPL '90 Proceedings of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Compilation of functional languages by program transformation
ACM Transactions on Programming Languages and Systems (TOPLAS)
Comparison of priority rules in pattern matching and term rewriting
Journal of Symbolic Computation
A rewrite-based type discipline for a subset of computer algebra
Journal of Symbolic Computation
Space-efficient closure representations
LFP '94 Proceedings of the 1994 ACM conference on LISP and functional programming
Quasi-static scoping: sharing variable bindings across multiple lexical scopes
POPL '93 Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
LFP '94 Proceedings of the 1994 ACM conference on LISP and functional programming
Functional back-ends within the lambda-sigma calculus
Proceedings of the first ACM SIGPLAN international conference on Functional programming
Sharing code through first-class environments
Proceedings of the first ACM SIGPLAN international conference on Functional programming
ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
Within ARM's reach: compilation of left-linear rewrite systems via minimal rewrite systems
ACM Transactions on Programming Languages and Systems (TOPLAS)
Exact real arithmetic: a case study in higher order programming
LFP '86 Proceedings of the 1986 ACM conference on LISP and functional programming
Semantics directed compiling for functional languages
LFP '86 Proceedings of the 1986 ACM conference on LISP and functional programming
Implementing functional languages in the Categorical Abstract Machine
LFP '86 Proceedings of the 1986 ACM conference on LISP and functional programming
Efficient and safe-for-space closure conversion
ACM Transactions on Programming Languages and Systems (TOPLAS)
SIGPLAN '84 Proceedings of the 1984 SIGPLAN symposium on Compiler construction
Proceedings of the sixth ACM SIGPLAN international conference on Functional programming
A brief history of just-in-time
ACM Computing Surveys (CSUR)
From ML to Ada: Strongly-typed language interoperability via source translation
Journal of Functional Programming
Functional runtime systems within the lambda-sigma calculus
Journal of Functional Programming
Real-time concurrent collection on stock multiprocessors
ACM SIGPLAN Notices - Best of PLDI 1979-1999
The development of Chez Scheme
Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
Unrestricted pure call-by-value recursion
Proceedings of the 2008 ACM SIGPLAN workshop on ML
Inter-deriving Semantic Artifacts for Object-Oriented Programming
WoLLIC '08 Proceedings of the 15th international workshop on Logic, Language, Information and Computation
Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A parallel virtual machine for bulk synchronous parallel ML
ICCS'03 Proceedings of the 1st international conference on Computational science: PartI
PLDI '10 Proceedings of the 2010 ACM SIGPLAN conference on Programming language design and implementation
Closure generation based on viewing lambda as epsilon plus compile
Computer Languages
Open and efficient type switch for C++
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Proceedings of the 12th international conference on Generative programming: concepts & experiences
Hi-index | 0.00 |
This paper summarizes my experience in implementing a compiler for a functional language. The language is ML(1) [Milner 84] and the compiler was first implemented in 1980 as a personal project when I was a postgraduate student at the University of Edinburgh(2). At the time, I was familiar with programming language semantics but knew very little about compiler technology; interpreters had been my main programming concern. Major influences in the design of this compiler have been [Steele 77] [Steele 78] and the implementation folklore for statically and dynamically scoped dialects of Lisp [Allen 78]. As a result, the internal structure of the compiler is fairly unorthodox, if compared for example with [Aho 78]. Anyway, a compiler for a language like ML has to be different. ML is interactive, statically scoped, strongly typed, polymorphic, and has first class higher-order functions, type inference and dynamic allocation. These features preclude many well-known implementation styles, particularly the ones used for Lisp (because of static scoping), the Algol family (because of functional values) and C (because of nested scoping and strong typing). The interaction of these features is what gives ML its “character”, and makes compilation challenging. The compiler has been recently partially converted to the new ML standard. The major points of interest which are discussed in this paper are: (a) the interactive interpreter-like usage; (b) the polymorphic type inference algorithm; (c) the compilation of pattern matching; (d) the optimization of the representation of user defined data types; (e) the compilation of functional closures, function application and variable access; (f) the intermediate abstract machine and its formal operational semantics; (g) modules and type-safe separate compilation.