Results 1 -
8 of
8
Compiling polymorphism using intensional type analysis
- In Symposium on Principles of Programming Languages
, 1995
"... The views and conclusions contained in this document are those of the authors and should not be interpreted as ..."
Abstract
-
Cited by 252 (18 self)
- Add to MetaCart
The views and conclusions contained in this document are those of the authors and should not be interpreted as
Safe polymorphic type inference for a Dynamically Typed Language: Translating Scheme to ML
- In Proceedings of the Conference on Functional Programming Languages and Computer Architecture (FPCA
, 1995
"... We describe a new method for polymorphic type inference for the dynamically typed language Scheme. The method infers both types and explicit run-time type operations (coercions) for a given program. It can be used to statically debug Scheme programs and to give a high-level translation to ML, in es ..."
Abstract
-
Cited by 26 (0 self)
- Add to MetaCart
We describe a new method for polymorphic type inference for the dynamically typed language Scheme. The method infers both types and explicit run-time type operations (coercions) for a given program. It can be used to statically debug Scheme programs and to give a high-level translation to ML, in essence providing an "embedding" of Scheme into ML. Our method combines the following desirable properties: ffl It is liberal in that no legal Scheme programs are "rejected " outright by the type inferencer. ffl It is modular in that definitions can be analyzed independent of the context of their use. The inferred type scheme for a definition is safe for all contexts. This is accomplished by admitting type coercion parameters, resulting in a form of polymorphic qualified type system. ffl It infers both types and run-time type operations and places the latter opportunistically at any suitable program point, not only at data creation and destruction points. ffl It is very efficient. Its mo...
Dynamic Typing for Distributed Programming in Polymorphic Languages
- ACM Transactions on Programming Languages and Systems
, 1996
"... While static typing is widely accepted as being necessary for secure program execution, dynamic typing is also viewed as being essential in some applications. Dynamics have been proposed as a way of introducing dynamic typing into statically typed languages, with particular application to programmin ..."
Abstract
-
Cited by 21 (5 self)
- Add to MetaCart
While static typing is widely accepted as being necessary for secure program execution, dynamic typing is also viewed as being essential in some applications. Dynamics have been proposed as a way of introducing dynamic typing into statically typed languages, with particular application to programming in distributed environments. However proposals for incorporating dynamics into languages with parametric polymorphism, such as ML, have serious shortcomings. A new approach is presented to extending ML-like languages with dynamic typing. This approach has particular usefulness for programming in distributed environments, where many of the practical applications of dynamic typing arise. At the heart of the approach is the use of type-based computation, where polymorphic functions may analyse the structure of their type arguments. This approach solves several open problems with the use of traditional dynamics in polymorphic languages. Type-based computation is also the basis for programmer-d...
Full Lifting of Type Parameters
- in the proceedings of Second Fuji International Workshop on Functional and Logic Programming
, 1997
"... Recently explicit type parameter passing has been studied as an attractive approach to utilizing type information in ML. An important issue in this approach is to develop an efficient method of type parameter passing. Tolmach proposed a method based on lazy substitution on types and demonstrated the ..."
Abstract
-
Cited by 10 (0 self)
- Add to MetaCart
Recently explicit type parameter passing has been studied as an attractive approach to utilizing type information in ML. An important issue in this approach is to develop an efficient method of type parameter passing. Tolmach proposed a method based on lazy substitution on types and demonstrated the feasibility of his method in his implementation of tag-free garbage collection. However, there are still some significant costs associated with runtime construction of type parameters in his method. In this paper we propose a refinement of his method based on the transformation which completely eliminates runtime construction of type parameters. The transformation lifts type parameters that cause runtime construction so that they can be constructed statically. We present our transformation as a type preserving translation and prove the correctness of the translation. Furthermore, we describe an implementation of a compiler for Core Standard ML based on our method and compare our method to T...
Compilation based on a calculus for explicit type passing
- In Proceedings of Fuji International Workshop on Functional and Logic Programming
, 1996
"... 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 ..."
Abstract
-
Cited by 8 (1 self)
- Add to MetaCart
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.
Exploring the Design Space for Type-based Implicit Parameterization
- Proceedings of Supercomputing '97
, 1999
"... A common task in programming is to arrange for data to be passed from the point where it first becomes available to the places where it is needed, which may be much further down the call hierarchy. One approach is to store the data in a global variable. Another alternative is to add extra parame ..."
Abstract
-
Cited by 8 (1 self)
- Add to MetaCart
A common task in programming is to arrange for data to be passed from the point where it first becomes available to the places where it is needed, which may be much further down the call hierarchy. One approach is to store the data in a global variable. Another alternative is to add extra parameters at each level to thread it from the point of supply to the point of use. Neither of these is particularly attractive: The former is inflexible, while the latter requires modification of the program text, adding auxiliary parameters to each function definition and call. This paper explores the design space for a third alternative, using types to direct the introduction and use of implicit parameters and so carry data from supply to use. This gives the flexibility of parameterization without the burden of adding parameters by hand. The most general point in the design space uses relations on types to support sophisticated forms of overloading, and includes several known systems ...
Type-directed specialization of polymorphism
- in Proc. International Conference on Theoretical Aspects of Computer Software, Springer LNCS 1281
, 1999
"... Flexibility of programming and efficiency of program execution are two important features of a programming language. Unfortunately, however, these two features conflict each other in design and implementation of a modern statically typed programming language. Flexibility is model of computation, whi ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
Flexibility of programming and efficiency of program execution are two important features of a programming language. Unfortunately, however, these two features conflict each other in design and implementation of a modern statically typed programming language. Flexibility is model of computation, while efficiency requires optimal use of low-level primitives specialized to individual data structures. The motivation of this work is to reconcile these two features by developing a mechanism for specializing polymorphic primitives based on static type information. We analyze the existing methods for compiling a record calculus and an unboxed calculus, extract their common structure, and develop a framework for type-directed specialization of polymorphism. 1
Type system for specializing polymorphism
- Lecture Notes in Computer Science
, 1997
"... Abstract. Flexibility of programming and efficiency of program execution are two important features of a programming language. Unfortunately, however, there is an inherent conflict between these features in design and implementation of a modern statically typed programming language. Flexibility is a ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Abstract. Flexibility of programming and efficiency of program execution are two important features of a programming language. Unfortunately, however, there is an inherent conflict between these features in design and implementation of a modern statically typed programming language. Flexibility is achieved by high-degree of polymorphism, which is based on generic primitives in an abstract model of computation, while efficiency requires optimal use of low-level primitives specialized to individual data structures. The motivation of this work is to reconcile these two features by developing a mechanism for specializing polymorphic primitives based on static type information. We first present a method for coherent transformation of an ML style polymorphic language into an explicitly typed calculus. We then analyze the existing methods for compiling record calculus and unboxed calculus, extract their common structure, and develop a framework for type based specialization of polymorphism. 1

