## An Overview of the FLINT/ML Compiler (1997)

Venue: | In Proc. 1997 ACM SIGPLAN Workshop on Types in Compilation |

Citations: | 89 - 17 self |

### BibTeX

@INPROCEEDINGS{Shao97anoverview,

author = {Zhong Shao},

title = {An Overview of the FLINT/ML Compiler},

booktitle = {In Proc. 1997 ACM SIGPLAN Workshop on Types in Compilation},

year = {1997}

}

### Years of Citing Articles

### OpenURL

### Abstract

The FLINT project at Yale aims to build a state-of-the-art systems environment for modern typesafe languages. One important component of the FLINT system is a high-performance type-directed compiler for SML'97 (extended with higher-order modules). The FLINT/ML compiler provides several new capabilities that are not available in other type-based compilers: ffl type-directed compilation is carried over across the higher-order module boundaries; ffl recursive and mutable data objects can use unboxed representations without incurring expensive runtime cost on heavily polymorphic code; ffl parameterized modules (functors) can be selectively specialized, just as normal polymorphic functions; ffl new type representations are used to reduce the cost of type manipulation thus the compilation time. This paper gives an overview of these novel aspects, and a preliminary report on the current status of the implementation. 1 Introduction The FLINT project at Yale aims to build a state-of-the-ar...

### Citations

1562 | The Definition of Standard ML
- Miller, Tofte, et al.
- 1990
(Show Context)
Citation Context ... to build a state-of-the-art systems environment for modern type-safe languages. One important component of the FLINT system is a high-performance type-directed compiler for Standard ML 1997 (SML'97) =-=[21]-=- extended with higher-order modules [20]. The FLINT/ML compiler provides several new capabilities that are not available in other existing type-based compilers (i.e., Gallium [16], SML/NJ [29], and TI... |

620 |
Compiling with Continuations
- Appel
- 1992
(Show Context)
Citation Context ...the FLINT code. The back-end compiles FLINT into machine code through usual phases such as representation analysis [26], conventional and loop optimizations [1], CPS-based contractions and reductions =-=[3]-=-, closure conversion [28], and machine-code generation [8]. All these compilation stages are made independent of each other so that they can also be used as compiler infrastructure for other programmi... |

364 |
Towards a theory of type structure
- Reynolds
- 1974
(Show Context)
Citation Context ...e selectively specialized just as normal polymorphic functions. FLINT/ML can compile both functors and polymorphic functions into a predicative variant of the Girard-Reynolds polymorphic calculus, F! =-=[9, 25]-=-, so functor specialization is just type application in F! . This is not supported in any of the other three compilers. ffl Fourth, FLINT/ML uses several techniques such as hash consing, memoization, ... |

267 | A type-theoretic approach to higher-order modules with sharing
- Harper, Lillibridge
- 1994
(Show Context)
Citation Context ...ore-FLINT is on how to deal with functors and higherorder functors [20]. Recent research on ML modules have focused on giving type-theoretic semantics using dependent types [19, 11], translucent sums =-=[10]-=-, or manifest types [17, 18], none of these map ML modules directly into Core-FLINT-like calculus. We have developed an algorithm that translates ML modules (including even higher-order ones) into the... |

259 | Compiling Polymorphism Using Intensional Type Analysis
- Harper, Morrisett
- 1995
(Show Context)
Citation Context ... object of type fisfl into type ff would involve first unboxing the fi and fl fields, and then pairing them up based on the actual types fi and fl have at runtime. Unlike in the type-passing approach =-=[30, 13]-=-, all polymorphic values in our flexible scheme are indeed always boxed. This dramatically simplifies the implementation of polymorphism, because all polymophic objects can be manipulated just as a si... |

238 |
Interprétation fonctionnelle et elimination des coupures de l’arithmétique d’ordre supérieur. Thèse d’état, Université de Paris 7
- Girard
- 1972
(Show Context)
Citation Context ...e selectively specialized just as normal polymorphic functions. FLINT/ML can compile both functors and polymorphic functions into a predicative variant of the Girard-Reynolds polymorphic calculus, F! =-=[9, 25]-=-, so functor specialization is just type application in F! . This is not supported in any of the other three compilers. ffl Fourth, FLINT/ML uses several techniques such as hash consing, memoization, ... |

227 | TIL: A TypeDirected Optimizing Compiler for ML
- Tarditi, Morrisett, et al.
- 1996
(Show Context)
Citation Context ... object of type fisfl into type ff would involve first unboxing the fi and fl fields, and then pairing them up based on the actual types fi and fl have at runtime. Unlike in the type-passing approach =-=[30, 13]-=-, all polymorphic values in our flexible scheme are indeed always boxed. This dramatically simplifies the implementation of polymorphism, because all polymophic objects can be manipulated just as a si... |

223 | Manifest types, modules, and separate compilation
- Leroy
- 1994
(Show Context)
Citation Context ...eal with functors and higherorder functors [20]. Recent research on ML modules have focused on giving type-theoretic semantics using dependent types [19, 11], translucent sums [10], or manifest types =-=[17, 18]-=-, none of these map ML modules directly into Core-FLINT-like calculus. We have developed an algorithm that translates ML modules (including even higher-order ones) into the Core-FLINT calculus. We mak... |

195 | Standard ml of new jersey
- Appel, MacQueen
- 1991
(Show Context)
Citation Context ...sentations. This scheme also solves the nasty datatype representation problem raised by Appel [4]. In the previous example, applying functor H to structure T is not allowed in the old SML/NJ compiler =-=[29, 5]-=- because data representation for S.foo is inconsistent with that for T.foo; this is no longer a problem in FLINT/ML. Furthermore, unlike other solutions for this problem [2], under our scheme, the imp... |

170 | Unboxed objects and polymorphic typing
- Leroy
- 1992
(Show Context)
Citation Context ...ard ML 1997 (SML'97) [21] extended with higher-order modules [20]. The FLINT/ML compiler provides several new capabilities that are not available in other existing type-based compilers (i.e., Gallium =-=[16]-=-, SML/NJ [29], and TIL [30]): ffl First, type-directed compilation is carried over to the ML module system including even extensions such as higher-order functors [20]. Neither Gallium [16] nor TIL [3... |

138 | A type-based compiler for standard ML
- Shao, Appel
- 1995
(Show Context)
Citation Context ...SML'97) [21] extended with higher-order modules [20]. The FLINT/ML compiler provides several new capabilities that are not available in other existing type-based compilers (i.e., Gallium [16], SML/NJ =-=[29]-=-, and TIL [30]): ffl First, type-directed compilation is carried over to the ML module system including even extensions such as higher-order functors [20]. Neither Gallium [16] nor TIL [30] provides f... |

134 | Higher-order modules and the phase distinction
- Harper, Mitchell, et al.
- 1990
(Show Context)
Citation Context ...t will be translated into TCABS(real) in FLINT; the value B:x will be a packed version of the real constant 3:5. To translate a functor declaration into Core-FLINT, we use a phase-splitting algorithm =-=[27, 12]. Each ML functor, s-=-uch as F in Figure 2, often plays a double role: on the "typing" aspect, it is a constructor function that maps from X:t to a result constructor X:t ! int ; on the "value" aspect, ... |

125 | Using dependent types to express modular structure
- MacQueen
- 1986
(Show Context)
Citation Context ...anslating ML modules into Core-FLINT is on how to deal with functors and higherorder functors [20]. Recent research on ML modules have focused on giving type-theoretic semantics using dependent types =-=[19, 11]-=-, translucent sums [10], or manifest types [17, 18], none of these map ML modules directly into Core-FLINT-like calculus. We have developed an algorithm that translates ML modules (including even high... |

106 | Applicative functors and fully transparent higher-order modules
- Leroy
- 1995
(Show Context)
Citation Context ...eal with functors and higherorder functors [20]. Recent research on ML modules have focused on giving type-theoretic semantics using dependent types [19, 11], translucent sums [10], or manifest types =-=[17, 18]-=-, none of these map ML modules directly into Core-FLINT-like calculus. We have developed an algorithm that translates ML modules (including even higher-order ones) into the Core-FLINT calculus. We mak... |

102 | On the type structure of Standard ML
- Harper, Mitchell
- 1993
(Show Context)
Citation Context ...anslating ML modules into Core-FLINT is on how to deal with functors and higherorder functors [20]. Recent research on ML modules have focused on giving type-theoretic semantics using dependent types =-=[19, 11]-=-, translucent sums [10], or manifest types [17, 18], none of these map ML modules directly into Core-FLINT-like calculus. We have developed an algorithm that translates ML modules (including even high... |

102 | Compiling With Types
- Morrisett
- 1995
(Show Context)
Citation Context ...l these compilation stages are made independent of each other so that they can also be used as compiler infrastructure for other programming languages. Like thesML i calculus used in the TIL compiler =-=[22, 30], th-=-e core of FLINT is simply a predicative variant of the Girard-Reynolds polymorphic calculus F! [9, 25]. Core-FLINT contains four syntactic classes: kinds (), constructors (��), types (oe), and ter... |

94 | A critique of standard ML
- Appel
- 1992
(Show Context)
Citation Context ...es, which will check the runtime value of t to decide whether to use flat record or indirect pointer representations. This scheme also solves the nasty datatype representation problem raised by Appel =-=[4]-=-. In the previous example, applying functor H to structure T is not allowed in the old SML/NJ compiler [29, 5] because data representation for S.foo is inconsistent with that for T.foo; this is no lon... |

90 |
A survey of the project AUTOMATH
- Bruijn
- 1980
(Show Context)
Citation Context ...the representations of kinds, constructors, and types ( see Figure 1 for a fragment of the FLINT definitions, written as ML datatype definitions): ffl We represent type variables as de Bruijn indices =-=[7]-=-. Under de Bruijn notations, all constructors and types have unique representations. ffl We then hash-cons all the kinds, constructors, and types into three separate hash-tables. Each kind (tkind), co... |

67 | Space–efficient closure representations
- Shao, Appel
- 1994
(Show Context)
Citation Context ...-end compiles FLINT into machine code through usual phases such as representation analysis [26], conventional and loop optimizations [1], CPS-based contractions and reductions [3], closure conversion =-=[28]-=-, and machine-code generation [8]. All these compilation stages are made independent of each other so that they can also be used as compiler infrastructure for other programming languages. Like thesML... |

65 | Flexible representation analysis
- Shao
- 1997
(Show Context)
Citation Context ...ed Research Projects Agency or the U.S. Government. ffl Second, recursive and mutable data objects can use unboxed representations without incurring expensive runtime cost on heavily polymorphic code =-=[26]-=-. The coercion-based approach used in Gallium [16] and SML/NJ [29] does not support unboxed representations on recursive and mutable objects. The typepassingsapproach used in TIL [30] does handle all ... |

34 | Typed cross-module compilation
- Shao
- 1998
(Show Context)
Citation Context ...into regular lambda terms in Core-FLINT. In the rest of this section, we summarize several important aspects about our translation; the detailed algorithm can be found in an upcoming technical report =-=[27]-=-. signature SIG = sig type t val x : t end funsig FSIG(X : SIG) = SIG structure A : SIG = struct type t = int val x = 3 end structure B :? SIG = struct type t = real val x = 3.5 end functor F(X : SIG)... |

30 |
A representation of lambda terms suitable for operations on their intensions
- Nadathur, Wilson
- 1990
(Show Context)
Citation Context ...pplication in F! . This is not supported in any of the other three compilers. ffl Fourth, FLINT/ML uses several techniques such as hash consing, memoization, and Nadathur's suspension-based -calculus =-=[23, 24]-=- to optimize the representation of its typed intermediate format. The new representation can reduce the cost of type manipulations thus improving the compilation time. The rest of this paper gives a b... |

24 | A portable and optimizing back end for the SML/NJ compiler
- George, Guillame, et al.
- 1994
(Show Context)
Citation Context ...ode through usual phases such as representation analysis [26], conventional and loop optimizations [1], CPS-based contractions and reductions [3], closure conversion [28], and machine-code generation =-=[8]-=-. All these compilation stages are made independent of each other so that they can also be used as compiler infrastructure for other programming languages. Like thesML i calculus used in the TIL compi... |

18 |
Abstract value constructors
- Aitken, Reppy
- 1992
(Show Context)
Citation Context ...he old SML/NJ compiler [29, 5] because data representation for S.foo is inconsistent with that for T.foo; this is no longer a problem in FLINT/ML. Furthermore, unlike other solutions for this problem =-=[2]-=-, under our scheme, the implementation of formal data constructors remains to be concrete most of the time (e.g., S.D). 4 Compiling FLINT The back-end of the FLINT/ML compiler translates the FLINT int... |

17 |
A semantics for higher order functors
- MacQueen, Tofte
- 1994
(Show Context)
Citation Context ...ironment for modern type-safe languages. One important component of the FLINT system is a high-performance type-directed compiler for Standard ML 1997 (SML'97) [21] extended with higher-order modules =-=[20]-=-. The FLINT/ML compiler provides several new capabilities that are not available in other existing type-based compilers (i.e., Gallium [16], SML/NJ [29], and TIL [30]): ffl First, type-directed compil... |

12 | A notation for lambda terms II: Refinements and applications
- Nadathur
- 1994
(Show Context)
Citation Context ...pplication in F! . This is not supported in any of the other three compilers. ffl Fourth, FLINT/ML uses several techniques such as hash consing, memoization, and Nadathur's suspension-based -calculus =-=[23, 24]-=- to optimize the representation of its typed intermediate format. The new representation can reduce the cost of type manipulations thus improving the compilation time. The rest of this paper gives a b... |

11 | A Type-Theoretic Account of Standard ml 1996 (version 2
- Harper, Stone
- 1996
(Show Context)
Citation Context ... higher-order modules [20]) into the FLINT intermediate language. The translation on the SML core language is quite similar to Harper and Stone's recent work on the type theoretic semantics of SML'97 =-=[15]-=-; the translation on the module language is, however, rather different. Unlike Harper and Stone's Internal Language (IL) [15], the FLINT intermediate language does not contain a separate module calcul... |

7 |
A compilation manager for SML/NJ. as part of SML/NJ User's Guide
- Blume
- 1995
(Show Context)
Citation Context ...n a by-need basis, and once it is done, the result will be memoized for future use. Our preliminary measurements have shown that on heavily functorized applications such as SML/NJ Compilation Manager =-=[6]-=-, our optimized implementation is an order-of-magnitude faster than naive implementations. 3 Translation into FLINT The front-end of the FLINT/ML compiler translates the entire SML'97 [21] plus higher... |