Results 1  10
of
706
A Syntactic Approach to Type Soundness
 Information and Computation
, 1992
"... We present a new approach to proving type soundness for Hindley/Milnerstyle polymorphic type systems. The keys to our approach are (1) an adaptation of subject reduction theorems from combinatory logic to programming languages, and (2) the use of rewriting techniques for the specification of the la ..."
Abstract

Cited by 539 (21 self)
 Add to MetaCart
We present a new approach to proving type soundness for Hindley/Milnerstyle polymorphic type systems. The keys to our approach are (1) an adaptation of subject reduction theorems from combinatory logic to programming languages, and (2) the use of rewriting techniques for the specification of the language semantics. The approach easily extends from polymorphic functional languages to imperative languages that provide references, exceptions, continuations, and similar features. We illustrate the technique with a type soundness theorem for the core of Standard ML, which includes the first type soundness proof for polymorphic exceptions and continuations. 1 Type Soundness Static type systems for programming languages attempt to prevent the occurrence of type errors during execution. A definition of type error depends on a specific language and type system, but always includes the use of a function on arguments for which it is not defined, and the attempted application of a nonfunction. ...
Deforestation: Transforming programs to eliminate trees
 Theoretical Computer Science
, 1990
"... An algorithm that transforms programs to eliminate intermediate trees is presented. The algorithm applies to any term containing only functions with definitions in a given syntactic form, and is suitable for incorporation in an optimising compiler. Intermediate listsand, more generally, interm ..."
Abstract

Cited by 400 (5 self)
 Add to MetaCart
An algorithm that transforms programs to eliminate intermediate trees is presented. The algorithm applies to any term containing only functions with definitions in a given syntactic form, and is suitable for incorporation in an optimising compiler. Intermediate listsand, more generally, intermediate treesare both the basis and the bane of a certain style of programming in functional languages. For example, to compute the sum of the squares of the numbers from 1 to n, one could write the following program: sum (map square (upto 1 n)) (1) A key feature of this style is the use of functions (upto, map, sum) to encapsulate common patterns of computation ("consider the numbers from 1 to n ", "apply a function to each element", "sum a collection of elements"). Intermediate lists are the basis of this stylethey are the glue that holds the functions together. In this case, the list [1; 2; : : : ; n] connects upto to map, and the list [1; 4; : : : ; n 2 ] connects map to sum. B...
FlowSensitive Type Qualifiers
, 2002
"... We present a system for extending standard type systems with flowsensitive type qualifiers. Users annotate their programs with type qualifiers, and inference checks that the annotations are correct. In our system only the type qualifiers are modeled flowsensitively  the underlying standard types ..."
Abstract

Cited by 357 (29 self)
 Add to MetaCart
We present a system for extending standard type systems with flowsensitive type qualifiers. Users annotate their programs with type qualifiers, and inference checks that the annotations are correct. In our system only the type qualifiers are modeled flowsensitively  the underlying standard types are unchanged, which allows us to obtain an efficient constraintbased inference algorithm that integrates flowinsensitive alias analysis, effect inference, and ideas from linear type systems to support strong updates. We demonstrate the usefulness of flowsensitive type qualifiers by finding a number of new locking bugs in the Linux kernel.
How to Make AdHoc Polymorphism Less Ad Hoc
, 1988
"... This paper presents type classes, a new approach to adhoc polymorphism. Type classes permit overloading of arithmetic operators such as multiplication, and generalise the "eqtype variables" of Standard ML. Type classes extend the Hindley/Milner polymorphic type system, and provide a new approach to ..."
Abstract

Cited by 345 (3 self)
 Add to MetaCart
This paper presents type classes, a new approach to adhoc polymorphism. Type classes permit overloading of arithmetic operators such as multiplication, and generalise the "eqtype variables" of Standard ML. Type classes extend the Hindley/Milner polymorphic type system, and provide a new approach to issues that arise in objectoriented programming, bounded type quantification, and abstract data types. This paper provides an informal introduction to type classes, and defines them formally by means of type inference rules. 1 Introduction Strachey chose the adjectives adhoc and parametric to distinguish two varieties of polymorphism [Str67]. Adhoc polymorphism occurs when a function is defined over several different types, acting in a different way for each type. A typical example is overloaded multiplication: the same symbol may be used to denote multiplication of integers (as in 3*3) and multiplication of floating point values (as in 3.14*3.14). Parametric polymorphism occurs wh...
Making the future safe for the past: Adding Genericity to the Java Programming Language
, 1998
"... We present GJ, a design that extends the Java programming language with generic types and methods. These are both explained and implemented by translation into the unextended language. The translation closely mimics the way generics are emulated by programmers: it erases all type parameters, maps ty ..."
Abstract

Cited by 343 (12 self)
 Add to MetaCart
We present GJ, a design that extends the Java programming language with generic types and methods. These are both explained and implemented by translation into the unextended language. The translation closely mimics the way generics are emulated by programmers: it erases all type parameters, maps type variables to their bounds, and inserts casts where needed. Some subtleties of the translation are caused by the handling of overriding. GJ increases expressiveness and safety: code utilizing generic libraries is no longer buried under a plethora of casts, and the corresponding casts inserted by the translation are guaranteed to not fail. GJ is designed to be fully backwards compatible with the current Java language, which simplifies the transition from nongeneric to generic programming. In particular, one can retrofit existing library classes with generic interfaces without changing their code. An implementation of GJ has been written in GJ, and is freely available on the web.
An Efficient Unification Algorithm
 TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS (TOPLAS)
, 1982
"... The unification problem in firstorder predicate calculus is described in general terms as the solution of a system of equations, and a nondeterministic algorithm is given. A new unification algorithm, characterized by having the acyclicity test efficiently embedded into it, is derived from the nond ..."
Abstract

Cited by 332 (1 self)
 Add to MetaCart
The unification problem in firstorder predicate calculus is described in general terms as the solution of a system of equations, and a nondeterministic algorithm is given. A new unification algorithm, characterized by having the acyclicity test efficiently embedded into it, is derived from the nondeterministic one, and a PASCAL implementation is given. A comparison with other wellknown unification algorithms shows that the algorithm described here performs well in all cases.
Theorems for free!
 FUNCTIONAL PROGRAMMING LANGUAGES AND COMPUTER ARCHITECTURE
, 1989
"... From the type of a polymorphic function we can derive a theorem that it satisfies. Every function of the same type satisfies the same theorem. This provides a free source of useful theorems, courtesy of Reynolds' abstraction theorem for the polymorphic lambda calculus. ..."
Abstract

Cited by 329 (6 self)
 Add to MetaCart
From the type of a polymorphic function we can derive a theorem that it satisfies. Every function of the same type satisfies the same theorem. This provides a free source of useful theorems, courtesy of Reynolds' abstraction theorem for the polymorphic lambda calculus.
RegionBased Memory Management
, 1997
"... This paper describes a memory management discipline for programs that perform dynamic memory allocation and deallocation. At runtime, all values are put into regions. The store consists of a stack of regions. All points of region allocation and deallocation are inferred automatically, using a type ..."
Abstract

Cited by 280 (8 self)
 Add to MetaCart
This paper describes a memory management discipline for programs that perform dynamic memory allocation and deallocation. At runtime, all values are put into regions. The store consists of a stack of regions. All points of region allocation and deallocation are inferred automatically, using a type and effect based program analysis. The scheme does not assume the presence of a garbage collector. The scheme was first presented by Tofte and Talpin (1994); subsequently, it has been tested in The ML Kit with Regions, a regionbased, garbagecollection free implementation of the Standard ML Core language, which includes recursive datatypes, higherorder functions and updatable references (Birkedal et al. 96, Elsman and Hallenberg 95). This paper defines a regionbased dynamic semantics for a skeletal programming language extracted from Standard ML. We present the inference system which specifies where regions can be allocated and deallocated and a detailed proof that the system is sound wi...
Typing and Subtyping for Mobile Processes
 MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE
, 1996
"... The picalculus is a process algebra that supports process mobility by focusing on the communication of channels. Milner's ..."
Abstract

Cited by 241 (16 self)
 Add to MetaCart
The picalculus is a process algebra that supports process mobility by focusing on the communication of channels. Milner's
MetaML and MultiStage Programming with Explicit Annotations
 Theoretical Computer Science
, 1999
"... . We introduce MetaML, a practicallymotivated, staticallytyped multistage programming language. MetaML is a "real" language. We have built an implementation and used it to solve multistage problems. MetaML allows the programmer to construct, combine, and execute code fragments in a typesafe ..."
Abstract

Cited by 237 (30 self)
 Add to MetaCart
. We introduce MetaML, a practicallymotivated, staticallytyped multistage programming language. MetaML is a "real" language. We have built an implementation and used it to solve multistage problems. MetaML allows the programmer to construct, combine, and execute code fragments in a typesafe manner. Code fragments can contain free variables, but they obey the staticscoping principle. MetaML performs typechecking for all stages once and for all before the execution of the first stage. Certain anomalies with our first MetaML implementation led us to formalize an illustrative subset of the MetaML implementation. We present both a bigstep semantics and type system for this subset, and prove the type system's soundness with respect to a bigstep semantics. From a software engineering point of view, this means that generators written in the MetaML subset never generate unsafe programs. A type system and semantics for full MetaML is still ongoing work. We argue that multi...