Results 1  10
of
15
How to Declare an Imperative
, 1995
"... How can we integrate 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 ..."
Abstract

Cited by 96 (3 self)
 Add to MetaCart
How can we integrate 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 TypeTheoretic Interpretation of Standard ML
 IN PROOF, LANGUAGE AND INTERACTION: ESSAYS IN HONOUR OF ROBIN MILNER
, 2000
"... ..."
MultiStage 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 85 (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 objectprograms. 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 letexpressions and re ..."
Abstract

Cited by 65 (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 letexpressions and requires an additional weakening of the usual subtyping rules. We also present a bidirectional typechecking 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 typechecking 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 FiniteRank 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 51 (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 finiterank 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 MLlike languages
, 1998
"... A HindleyMilner type system such as ML's seems to prohibit typeindexed 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 42 (0 self)
 Add to MetaCart
A HindleyMilner type system such as ML's seems to prohibit typeindexed 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 typeindexed values within a HindleyMilner type system. Our first approach is to interpret an input type as its corresponding value, recursively. This solution is typesafe, 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 typeindexed values that share the same type. To meet this objection, we focus on finding a valueindependent type encoding that can be shared by different functions. We propose and compare two solutions. One requires firstclass and higherorder polymorphism, and, thus, is not implementable in the core language of ML, but it can be programmed using higherorder 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 typeindexed values through examples including typedirected partial evaluation, C printflike 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 overcommitment 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 DOMAINSPECIFIC LANGUAGES
, 1997
"... ..."
Taming Effects with Monadic Typing
, 1999
"... The familiar HindleyMilner 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 typeandeffect ..."
Abstract

Cited by 11 (0 self)
 Add to MetaCart
The familiar HindleyMilner 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 typeandeffects analysis supports type inference. Type soundness and completeness theorems establish the coherence of monadic type inference with the reference semantics of a small MLstyle 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 foreignlanguage 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 MatchCompilation 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 8 (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.