Results 1 - 10
of
15
How to Declare an Imperative
, 1995
"... How canweintegrate interaction into a purely declarative language? This tutorial describes a solution to this problem based on a monad. The solution has been implemented in the functional language Haskell and the declarative language Escher. Comparisons are given to other approaches to interaction b ..."
Abstract
-
Cited by 94 (3 self)
- Add to MetaCart
How canweintegrate interaction into a purely declarative language? This tutorial describes a solution to this problem based on a monad. The solution has been implemented in the functional language Haskell and the declarative language Escher. Comparisons are given to other approaches to interaction based on synchronous streams, continuations, linear logic, and side effects.
A Type-Theoretic Interpretation of Standard ML
- IN PROOF, LANGUAGE AND INTERACTION: ESSAYS IN HONOUR OF ROBIN MILNER
, 2000
"... ..."
Multi-Stage Programming: Its Theory and Applications
, 1999
"... MetaML is a statically typed functional programming language with special support for program generation. In addition to providing the standard features of contemporary programming languages such as Standard ML, MetaML provides three staging annotations. These staging annotations allow the construct ..."
Abstract
-
Cited by 79 (18 self)
- Add to MetaCart
MetaML is a statically typed functional programming language with special support for program generation. In addition to providing the standard features of contemporary programming languages such as Standard ML, MetaML provides three staging annotations. These staging annotations allow the construction, combination, and execution of object-programs. Our thesis is that MetaML's three staging annotations provide a useful, theoretically sound basis for building program generators. This dissertation reports on our study of MetaML's staging constructs, their use, their implementation, and their formal semantics. Our results include an extended example of where MetaML allows us to produce efficient programs, an explanation of why implementing these constructs in traditional ways can be challenging, two formulations of MetaML's semantics, a type system for MetaML, and a proposal for extending ...
Intersection Types and Computational Effects
, 2000
"... We show that standard formulations of intersection type systems are unsound in the presence of computational effects, and propose a solution similar to the value restriction for polymorphism adopted in the revised definition of Standard ML. It differs in that it is not tied to let-expressions and re ..."
Abstract
-
Cited by 58 (6 self)
- Add to MetaCart
We show that standard formulations of intersection type systems are unsound in the presence of computational effects, and propose a solution similar to the value restriction for polymorphism adopted in the revised definition of Standard ML. It differs in that it is not tied to let-expressions and requires an additional weakening of the usual subtyping rules. We also present a bi-directional type-checking algorithm for the resulting language that does not require an excessive amount of type annotations and illustrate it through some examples. We further show that the type assignment system can be extended to incorporate parametric polymorphism. Taken together, we see our system and associated type-checking algorithm as a significant step towards the introduction of intersection types into realistic programming languages. The added expressive power would allow many more properties of programs to be stated by the programmer and statically verified by a compiler.
Principality and Decidable Type Inference for Finite-Rank Intersection Types
- In Conf. Rec. POPL ’99: 26th ACM Symp. Princ. of Prog. Langs
, 1999
"... Principality of typings is the property that for each typable term, there is a typing from which all other typings are obtained via some set of operations. Type inference is the problem of finding a typing for a given term, if possible. We define an intersection type system which has principal typin ..."
Abstract
-
Cited by 50 (17 self)
- Add to MetaCart
Principality of typings is the property that for each typable term, there is a typing from which all other typings are obtained via some set of operations. Type inference is the problem of finding a typing for a given term, if possible. We define an intersection type system which has principal typings and types exactly the strongly normalizable -terms. More interestingly, every finite-rank restriction of this system (using Leivant's first notion of rank) has principal typings and also has decidable type inference. This is in contrast to System F where the finite rank restriction for every finite rank at 3 and above has neither principal typings nor decidable type inference. This is also in contrast to earlier presentations of intersection types where the status (decidable or undecidable) of these properties is unknown for the finiterank restrictions at 3 and above. Furthermore, the notion of principal typings for our system involves only one operation, substitution, rather than severa...
Encoding types in ML-like languages
, 1998
"... A Hindley-Milner type system such as ML's seems to prohibit type-indexed values, i.e., functions that map a family of types to a family of values. Such functions generally perform case analysis on the input types and return values of possibly different types. The goal of our work is to demonstrate h ..."
Abstract
-
Cited by 38 (0 self)
- Add to MetaCart
A Hindley-Milner type system such as ML's seems to prohibit type-indexed values, i.e., functions that map a family of types to a family of values. Such functions generally perform case analysis on the input types and return values of possibly different types. The goal of our work is to demonstrate how to program with type-indexed values within a Hindley-Milner type system. Our first approach is to interpret an input type as its corresponding value, recursively. This solution is type-safe, in the sense that the ML type system statically prevents any mismatch between the input type and function arguments that depend on this type. Such specific type interpretations, however, prevent us from combining different type-indexed values that share the same type. To meet this objection, we focus on finding a value-independent type encoding that can be shared by different functions. We propose and compare two solutions. One requires first-class and higher-order polymorphism, and, thus, is not implementable in the core language of ML, but it can be programmed using higher-order functors in Standard ML of New Jersey. Its usage, however, is clumsy. The other approach uses embedding/projection functions. It appears to be more practical. We demonstrate the usefulness of type-indexed values through examples including type-directed partial evaluation, C printf-like formatting, and subtype coercions. Finally, we discuss the tradeoffs between our approach and some other solutions based on more expressive typing disciplines.
An Interpretation of Standard ML in Type Theory
, 1997
"... We define an interpretation of Standard ML into type theory. The interpretation takes the form of a set of elaboration rules reminiscent of the static semantics given in The Definition of StandardML. In particular, the elaboration rules are given in a relational style, exploiting indeterminacy to av ..."
Abstract
-
Cited by 37 (3 self)
- Add to MetaCart
We define an interpretation of Standard ML into type theory. The interpretation takes the form of a set of elaboration rules reminiscent of the static semantics given in The Definition of StandardML. In particular, the elaboration rules are given in a relational style, exploiting indeterminacy to avoid over-commitment to specific implementation techniques. Elaboration consists of identifier scope resolution, type checking and type inference, expansion of derived forms, pattern compilation, overloading resolution, equality compilation, and the coercive aspects of signature matching.
Typed Common Intermediate Format
- 1997 USENIX CONFERENCE ON DOMAIN-SPECIFIC LANGUAGES
, 1997
"... ..."
Taming Effects with Monadic Typing
, 1999
"... The familiar Hindley-Milner type system of the ML language family is extended with monad annotations to account for possible side effects of expression evaluation. This also allows effects to be effectively encapsulated by lexical scopes, with enforcement provided by type checking. A type-and-effect ..."
Abstract
-
Cited by 10 (0 self)
- Add to MetaCart
The familiar Hindley-Milner type system of the ML language family is extended with monad annotations to account for possible side effects of expression evaluation. This also allows effects to be effectively encapsulated by lexical scopes, with enforcement provided by type checking. A type-and-effects analysis supports type inference. Type soundness and completeness theorems establish the coherence of monadic type inference with the reference semantics of a small ML-style language. 1 Introduction Modern functional languages such as Haskell, Standard ML, CAML and Clean have evolved into wide spectrum programming languages through the addition of imperative features and foreign-language interfaces to a purely functional core. This evolution has been necessary to make these languages practical vehicles for the design and implementation of software systems but it has impaired our ability to reason about and formally manipulate programs. When evaluation of an expression may produce a side ...
When Do Match-Compilation Heuristics Matter?
, 2000
"... Modern, statically typed, functional languages define functions by pattern matching. Although pattern matching is defined in terms of sequential checking of a value against one pattern after another, real implementations translate patterns into automata that can test a value against many pattern ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
Modern, statically typed, functional languages define functions by pattern matching. Although pattern matching is defined in terms of sequential checking of a value against one pattern after another, real implementations translate patterns into automata that can test a value against many patterns at once. Decision trees are popular automata.

