## Compilation based on a calculus for explicit type passing (1996)

Venue: | In Proceedings of Fuji International Workshop on Functional and Logic Programming |

Citations: | 8 - 1 self |

### BibTeX

@INPROCEEDINGS{Minamide96compilationbased,

author = {Yasuhiko Minamide},

title = {Compilation based on a calculus for explicit type passing},

booktitle = {In Proceedings of Fuji International Workshop on Functional and Logic Programming},

year = {1996},

pages = {301--320},

publisher = {World Scientific}

}

### OpenURL

### Abstract

We propose several calculi for explicit type passing that enable us to formalize compilation of polymorphic programming languages like MLasphasesoftypepreserving translations. In our calculi various manipulations for type parameters can be expressed without typing problems|this is impossible in the polymorphic-calculi. Furthermore, we develop the translation from an explicit typed source calculus similar to Core-XML to one of the proposed calculi which completely eliminates runtime construction type parameters. We proposeanintermediate language based on this calculus, and discuss an implementation of a compiler for Core Standard ML. 1.

### Citations

1562 | The Definition of Standard ML
- Miller, Tofte, et al.
- 1990
(Show Context)
Citation Context ...ompletely eliminates runtime construction of type parameters. Based on the calculus, we propose an intermediate language and discuss an implementation of an experimental compiler for Core Standard ML =-=[15]-=-. There are many advantages of compilers which are constructed as phases of typepreserving translations. Complete type information can be used for optimization such as instantiating polymorphic equali... |

620 |
Compiling with Continuations
- Appel
- 1992
(Show Context)
Citation Context ...hus, the transfromation depends on which variables should be considered free in a type function. This information is usually determined during closure conversion to avoid closures for known functions =-=[1]-=-. Thus, this lifting transformation and closure conversion must be performed at the same time. That makes the implementation of a compiler based on this transformation compilicated. It is still expens... |

344 | How to make ad-hoc polymorphism less ad hoc
- Wadler, Blott
- 1989
(Show Context)
Citation Context ...ameters. There have been many studies that considered passing some kind of type information to implement various aspects of programming languages such as polymorphic record operations and overloading =-=[27, 18, 11]-=-. For the theoretical basis of these approaches, various typed languages have been proposed. The calculuss) we propose in this paper can be considered as an extension of the implementation calculus fo... |

268 | The essence of compiling with continuations
- Flanagan, Sabry, et al.
- 1993
(Show Context)
Citation Context ...e IL # Optimization IL # Type lifting IL # Record flattening, Uncurrying IL # Closure conversion IL # Translation to C C Figure 4: The organization of the compiler in this paper and on A-normal forms =-=[5, 25]-=-. Sinces8 can be considered as a subset of ) , IL is used not only after type lifting but before type lifting. Then, all the stages except the last translation to C are implemented as type-preserving ... |

267 | A type-theoretic approach to higher-order modules with sharing
- Harper, Lillibridge
- 1994
(Show Context)
Citation Context ...he second order -calculus because t is not equal to s \Theta s in the function repair. One solution of this problem is to use translucent types (or manifest types) proposed for modules of Standard ML =-=[7, 14]-=- and recently used to solve the typing problem of closure conversion of the second order -calculus in [16]. For the program above, we can add the constraint t = s \Theta s at abstraction of t in repai... |

259 | Compiling Polymorphism Using Intensional Type Analysis
- Harper, Morrisett
- 1995
(Show Context)
Citation Context ... reported that the compilers based on this approach improved the performance of executable programs [13, 21]. More aggressive approach is to use type information by passing types as actual parameters =-=[17, 9, 4, 26, 25]-=- as in the second order -calculus. The advantage of this approach is that even for a polymorphic type the actual type is known as an instance at runtime and can be used for several purposes. For examp... |

227 | TIL: A TypeDirected Optimizing Compiler for ML
- Tarditi, Morrisett, et al.
- 1996
(Show Context)
Citation Context ... reported that the compilers based on this approach improved the performance of executable programs [13, 21]. More aggressive approach is to use type information by passing types as actual parameters =-=[17, 9, 4, 26, 25]-=- as in the second order -calculus. The advantage of this approach is that even for a polymorphic type the actual type is known as an instance at runtime and can be used for several purposes. For examp... |

223 | Manifest types, modules, and separate compilation
- Leroy
- 1994
(Show Context)
Citation Context ...he second order -calculus because t is not equal to s \Theta s in the function repair. One solution of this problem is to use translucent types (or manifest types) proposed for modules of Standard ML =-=[7, 14]-=- and recently used to solve the typing problem of closure conversion of the second order -calculus in [16]. For the program above, we can add the constraint t = s \Theta s at abstraction of t in repai... |

213 |
Intensional Interpretations of Functionals of Finite Type
- Tait
- 1967
(Show Context)
Citation Context ...ting polymorphic equality to monomorphic equality and choosing efficient representation of data types. It is also useful to prove correctness of compilation through such a method as logical relations =-=[24, 6, 20, 22, 23]-=-. Furthermore, constructing compilers as phases of type-preserving translations has a practical advantage for development of compilers as mentioned in [16, 25]. When we debug a compiler itself, a code... |

170 | Unboxed objects and polymorphic typing
- Leroy
- 1992
(Show Context)
Citation Context ... inference. In order to overcome this problem two approaches to utilizing type information for compilation have been proposed recently. The first approach is representation analysis proposed by Leroy =-=[13]-=-, which is based on coercions between monomorphic and polymorphic types. Although the polymorphic parts of a program must use uniform representation, the monomorphic parts can be compiled efficiently ... |

154 | Typed closure conversion
- Minamide, Morrisett, et al.
- 1996
(Show Context)
Citation Context ...a method as logical relations [24, 6, 20, 22, 23]. Furthermore, constructing compilers as phases of type-preserving translations has a practical advantage for development of compilers as mentioned in =-=[16, 25]-=-. When we debug a compiler itself, a code of an intermediate language can be type-checked. This has greatly helped to find bugs in our compiler. Type parameter passing is sometimes considered expensiv... |

138 | A type-based compiler for standard ML
- Shao, Appel
- 1995
(Show Context)
Citation Context ... representation, the monomorphic parts can be compiled efficiently by using type information. It was reported that the compilers based on this approach improved the performance of executable programs =-=[13, 21]-=-. More aggressive approach is to use type information by passing types as actual parameters [17, 9, 4, 26, 25] as in the second order -calculus. The advantage of this approach is that even for a polym... |

102 | On the type structure of Standard ML
- Harper, Mitchell
- 1993
(Show Context)
Citation Context ... the compiler is based on the second order -calculus and intensional type analysis. 2. Explicit Type Parameters There are no explicit type abstractions and applications in ML. However, as proposed in =-=[8]-=-, ML programs can be translated to the language with explicit type abstractions and applications like the second order -calculus. Milner's type inference algorithm finds a typing derivation for a well... |

93 |
The De nition of Standard ML
- Milner, Tofte, et al.
- 1990
(Show Context)
Citation Context ...ompletely eliminates runtime construction of type parameters. Based on the calculus, we propose an intermediate language and discuss an implementation of an experimental compiler for Core Standard ML =-=[15]-=-. There are many advantages of compilers which are constructed as phases of typepreserving translations. Complete type information can be used for optimization such as instantiating polymorphic equali... |

89 | A theory of qualified types
- Jones
- 1992
(Show Context)
Citation Context ...ameters. There have been many studies that considered passing some kind of type information to implement various aspects of programming languages such as polymorphic record operations and overloading =-=[27, 18, 11]-=-. For the theoretical basis of these approaches, various typed languages have been proposed. The calculuss) we propose in this paper can be considered as an extension of the implementation calculus fo... |

72 | A polymorphic record calculus and its compilation
- Ohori
- 1995
(Show Context)
Citation Context ...s, various typed languages have been proposed. The calculuss) we propose in this paper can be considered as an extension of the implementation calculus for compilation of polymorphic records of Ohori =-=[18, 19]-=- and qualified types of Jones [12, 11]. Runtime type parameters are distinguished from the usual types and new abstraction and application for runtime type parameters are introduced. In our calculus, ... |

67 | Tag-Free Garbage Collection Using Explicit Type Parameters
- Tolmach
- 1994
(Show Context)
Citation Context ... reported that the compilers based on this approach improved the performance of executable programs [13, 21]. More aggressive approach is to use type information by passing types as actual parameters =-=[17, 9, 4, 26, 25]-=- as in the second order -calculus. The advantage of this approach is that even for a polymorphic type the actual type is known as an instance at runtime and can be used for several purposes. For examp... |

58 |
Lambda-definability in the full type hierarchy
- Plotkin
- 1980
(Show Context)
Citation Context ...ting polymorphic equality to monomorphic equality and choosing efficient representation of data types. It is also useful to prove correctness of compilation through such a method as logical relations =-=[24, 6, 20, 22, 23]-=-. Furthermore, constructing compilers as phases of type-preserving translations has a practical advantage for development of compilers as mentioned in [16, 25]. When we debug a compiler itself, a code... |

57 | A compilation method for ml-style polymorphic record calculi
- Ohori
- 1992
(Show Context)
Citation Context ...ameters. There have been many studies that considered passing some kind of type information to implement various aspects of programming languages such as polymorphic record operations and overloading =-=[27, 18, 11]-=-. For the theoretical basis of these approaches, various typed languages have been proposed. The calculuss) we propose in this paper can be considered as an extension of the implementation calculus fo... |

56 |
Equality between functionals
- Friedman
- 1975
(Show Context)
Citation Context ...ting polymorphic equality to monomorphic equality and choosing efficient representation of data types. It is also useful to prove correctness of compilation through such a method as logical relations =-=[24, 6, 20, 22, 23]-=-. Furthermore, constructing compilers as phases of type-preserving translations has a practical advantage for development of compilers as mentioned in [16, 25]. When we debug a compiler itself, a code... |

47 | An ad hoc approach to the implementation of polymorphism
- Morrison, Dearle, et al.
- 1991
(Show Context)
Citation Context |

38 |
Formally optimal boxing
- Henglein, J0rgensen
- 1994
(Show Context)
Citation Context ...lication as ef��g. For this calculus, we consider the standard type system and call-by-value operational semantics. As source programs of compilation, we consider only the type normalized expressi=-=ons [10]-=- that satisfy the following two conditions. Type abstractions occur only as the bound expression of let-expressions; i.e., let x:oe = t 1 ; : : : ; t n :e 1 in e 2 . Type applications are only allowed... |

37 |
Extensional polymorphism
- Dubois, Rouaix, et al.
- 1995
(Show Context)
Citation Context |

31 |
Logical Relations and the Typed -Calculus
- Statman
- 1985
(Show Context)
Citation Context |

29 | Polymorphism for imperative languages without imperative types
- Wright
- 1993
(Show Context)
Citation Context ... end in f fintg 3; f frealg 3.14 end However, in order to preserve the operational behavior of a program we have to restrict generalization of types in let for values. Such restriction was studied in =-=[28]-=- to avoid imperative types and reported to work well in practice. Thus, as the source language of compilation of ML we consider the restricted polymorphic -calculus similar to the Core-XML [8] that ca... |

14 |
Intensional interpretation of functionals of nite type I
- Tait
- 1967
(Show Context)
Citation Context ...iating polymorphic equality to monomorphic equality and choosing e cient representation of data types. It is also useful to prove correctness of compilation through such a method as logical relations =-=[24, 6, 20, 22, 23]-=-. Furthermore, constructing compilers as phases of type-preserving translations has a practical advantage for development of compilers as mentioned in [16, 25]. When we debug a compiler itself, a code... |

11 |
Completeness, invariance and lambda-definability
- Statman
- 1982
(Show Context)
Citation Context |

10 | ML typing, explicit polymorphism and qualified types
- Jones
- 1994
(Show Context)
Citation Context ...roposed. The calculuss) we propose in this paper can be considered as an extension of the implementation calculus for compilation of polymorphic records of Ohori [18, 19] and qualified types of Jones =-=[12, 11]-=-. Runtime type parameters are distinguished from the usual types and new abstraction and application for runtime type parameters are introduced. In our calculus, various manipulations of types are mor... |

8 |
Coherence for quali ed types
- Jones
- 1993
(Show Context)
Citation Context ...ameters. There have been many studies that considered passing some kind of type information to implement various aspects of programming languages such as polymorphic record operations and overloading =-=[27, 18, 11]-=-. For the theoretical basis of these approaches, various typed languages have been proposed. The calculus ) we propose in this paper can be considered as an extension of the implementation calculus fo... |

4 |
Completeness, invariance and lambda-de nability
- Statman
- 1982
(Show Context)
Citation Context ...iating polymorphic equality to monomorphic equality and choosing e cient representation of data types. It is also useful to prove correctness of compilation through such a method as logical relations =-=[24, 6, 20, 22, 23]-=-. Furthermore, constructing compilers as phases of type-preserving translations has a practical advantage for development of compilers as mentioned in [16, 25]. When we debug a compiler itself, a code... |

3 |
Atype-theoretic approach to higher-order modules with sharing
- Harper, Lillibridge
- 1994
(Show Context)
Citation Context ...ed in the second order -calculus because t is not equal to s s in the function repair. One solution of this problem is to use translucent types (or manifest types) proposed for modules of Standard ML =-=[7, 14]-=- and recently used to solve the typing problem of closure conversion of the second order -calculus in [16]. For the program above, we can add the constraint t = s s at abstraction of t in repair and s... |

3 |
Lambda-de nability in the full type hierarchy
- Plotkin
- 1980
(Show Context)
Citation Context ...iating polymorphic equality to monomorphic equality and choosing e cient representation of data types. It is also useful to prove correctness of compilation through such a method as logical relations =-=[24, 6, 20, 22, 23]-=-. Furthermore, constructing compilers as phases of type-preserving translations has a practical advantage for development of compilers as mentioned in [16, 25]. When we debug a compiler itself, a code... |

1 |
ML typing, explicit polymorphism and quali ed types
- Jones
- 1994
(Show Context)
Citation Context ...proposed. The calculus ) we propose in this paper can be considered as an extension of the implementation calculus for compilation of polymorphic records of Ohori [18, 19] and quali ed types of Jones =-=[12, 11]-=-. Runtime type parameters are distinguished from the usual types and new abstraction and application for runtime type parameters are introduced. In our calculus, various manipulations of types are mor... |