Results 1  10
of
421
A theory of type polymorphism in programming
 Journal of Computer and System Sciences
, 1978
"... The aim of this work is largely a practical one. A widely employed style of programming, particularly in structureprocessing languages which impose no discipline of types, entails defining procedures which work well on objects of a wide variety. We present a formal type discipline for such polymorp ..."
Abstract

Cited by 1083 (1 self)
 Add to MetaCart
(Show Context)
The aim of this work is largely a practical one. A widely employed style of programming, particularly in structureprocessing languages which impose no discipline of types, entails defining procedures which work well on objects of a wide variety. We present a formal type discipline for such polymorphic procedures in the context of a simple programming language, and a compile time typechecking algorithm w which enforces the discipline. A Semantic Soundness Theorem (based on a formal semantics for the language) states that welltype programs cannot “go wrong ” and a Syntactic Soundness Theorem states that if fl accepts a program then it is well typed. We also discuss extending these results to richer languages; a typechecking algorithm based on w is in fact already implemented and working, for the metalanguage ML in the Edinburgh LCF system, 1.
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 380 (8 self)
 Add to MetaCart
(Show Context)
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.
Pict: A programming language based on the picalculus
 PROOF, LANGUAGE AND INTERACTION: ESSAYS IN HONOUR OF ROBIN MILNER
, 1997
"... The πcalculus offers an attractive basis for concurrent programming. It is small, elegant, and well studied, and supports (via simple encodings) a wide range of highlevel constructs including data structures, higherorder functional programming, concurrent control structures, and objects. Moreover ..."
Abstract

Cited by 285 (9 self)
 Add to MetaCart
The πcalculus offers an attractive basis for concurrent programming. It is small, elegant, and well studied, and supports (via simple encodings) a wide range of highlevel constructs including data structures, higherorder functional programming, concurrent control structures, and objects. Moreover, familiar type systems for the calculus have direct counterparts in the πcalculus, yielding strong, static typing for a highlevel language using the πcalculus as its core. This paper describes Pict, a stronglytyped concurrent programming language constructed in terms of an explicitlytypedcalculus core language.
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 264 (19 self)
 Add to MetaCart
(Show Context)
The views and conclusions contained in this document are those of the authors and should not be interpreted as
OrderSorted Algebra I: Equational Deduction for Multiple Inheritance, Overloading, Exceptions and Partial Operations
 Theoretical Computer Science
, 1992
"... This paper generalizes manysorted algebra (hereafter, MSA) to ordersorted algebra (hereafter, OSA) by allowing a partial ordering relation on the set of sorts. This supports abstract data types with multiple inheritance (in roughly the sense of objectoriented programming), several forms of pol ..."
Abstract

Cited by 232 (35 self)
 Add to MetaCart
(Show Context)
This paper generalizes manysorted algebra (hereafter, MSA) to ordersorted algebra (hereafter, OSA) by allowing a partial ordering relation on the set of sorts. This supports abstract data types with multiple inheritance (in roughly the sense of objectoriented programming), several forms of polymorphism and overloading, partial operations (as total on equationally defined subsorts), exception handling, and an operational semantics based on term rewriting. We give the basic algebraic constructions for OSA, including quotient, image, product and term algebra, and we prove their basic properties, including Quotient, Homomorphism, and Initiality Theorems. The paper's major mathematical results include a notion of OSA deduction, a Completeness Theorem for it, and an OSA Birkhoff Variety Theorem. We also develop conditional OSA, including Initiality, Completeness, and McKinseyMalcev Quasivariety Theorems, and we reduce OSA to (conditional) MSA, which allows lifting many known MSA results to OSA. Retracts, which intuitively are left inverses to subsort inclusions, provide relatively inexpensive runtime error handling. We show that it is safe to add retracts to any OSA signature, in the sense that it gives rise to a conservative extension. A final section compares and contrasts many different approaches to OSA. This paper also includes several examples demonstrating the flexibility and applicability of OSA, including some standard benchmarks like STACK and LIST, as well as a much more substantial example, the number hierarchy from the naturals up to the quaternions.
Linear Types Can Change the World!
 PROGRAMMING CONCEPTS AND METHODS
, 1990
"... The linear logic of J.Y. Girard suggests a new type system for functional languages, one which supports operations that "change the world". Values belonging to a linear type must be used exactly once: like the world, they cannot be duplicated or destroyed. Such values require no refere ..."
Abstract

Cited by 148 (9 self)
 Add to MetaCart
The linear logic of J.Y. Girard suggests a new type system for functional languages, one which supports operations that "change the world". Values belonging to a linear type must be used exactly once: like the world, they cannot be duplicated or destroyed. Such values require no reference counting or garbage collection, and safely admit destructive array update. Linear types extend Schmidt's notion of single threading; provide an alternative to Hudak and Bloss' update analysis; and offer a practical complement to Lafont and Holmström's elegant linear languages.
Type Inference with Polymorphic Recursion
 Transactions on Programming Languages and Systems
, 1991
"... The DamasMilner Calculus is the typed Acalculus underlying the type system for ML and several other strongly typed polymorphic functional languages such as Mirandal and Haskell. Mycroft has extended its problematic monomorphic typing rule for recursive definitions with a polymorphic typing rule. H ..."
Abstract

Cited by 146 (3 self)
 Add to MetaCart
(Show Context)
The DamasMilner Calculus is the typed Acalculus underlying the type system for ML and several other strongly typed polymorphic functional languages such as Mirandal and Haskell. Mycroft has extended its problematic monomorphic typing rule for recursive definitions with a polymorphic typing rule. He proved the resulting type system, which we call the MilnerMycroft Calculus, sound with respect to Milner’s semantics, and showed that it preserves the principal typing property of the DamasMilner Calculus. The extension is of practical significance in typed logic programming languages and, more generally, in any language with (mutually) recursive definitions. In this paper we show that the type inference problem for the MilnerMycroft Calculus is logspace equivalent to semiunification, the problem of solving subsumption inequations between firstorder terms. This result has been proved independently by Kfoury et al. In connection with the recently established undecidability of semiunification this implies that typability in the MilnerMycroft Calculus is undecidable. We present some reasons why type inference with polymorphic recursion appears to be practical despite its undecidability. This also sheds some light on the observed practicality of ML
Type classes in Haskell
 ACM Transactions on Programming Languages and Systems
, 1996
"... This paper de nes a set of type inference rules for resolving overloading introduced by type classes. Programs including type classes are transformed into ones which may be typed by the HindleyMilner inference rules. In contrast to other work on type classes, the rules presented here relate directl ..."
Abstract

Cited by 136 (7 self)
 Add to MetaCart
This paper de nes a set of type inference rules for resolving overloading introduced by type classes. Programs including type classes are transformed into ones which may be typed by the HindleyMilner inference rules. In contrast to other work on type classes, the rules presented here relate directly to user programs. An innovative aspect of this work is the use of secondorder lambda calculus to record type information in the program. 1.
HigherOrder Modules and the Phase Distinction
 In Seventeenth ACM Symposium on Principles of Programming Languages
, 1990
"... Typed λcalculus is an important tool in programming language research because it provides an extensible framework for studying language features both in isolation and in their relation to each other. In earlier work we introduced a predicative function calculus, XML, for modeling several ..."
Abstract

Cited by 136 (25 self)
 Add to MetaCart
Typed &lambda;calculus is an important tool in programming language research because it provides an extensible framework for studying language features both in isolation and in their relation to each other. In earlier work we introduced a predicative function calculus, XML, for modeling several aspects of the Standard ML type system. Following MacQueen, our study focused on the use of dependent types to represent the modularity constructs of Standard ML. In addition to shedding some light on the tradeoffs between language features, our analysis suggested that the firstorder modules system of ML could be naturally extended to higher orders. However, whereas ML maintains a clear distinction between compiletime and runtime in both its implementation and formal semantics, the XML calculus blurs this distinction. Since static type checking is, in our view, essential to the practical utility of ML, we introduce a refinement of the XML calculus for which type checking is decidable at compile time....
A semantic model of types and machine instructions for proofcarrying code
 In Principles of Programming Languages
"... Proofcarrying code is a framework for proving the safety of machinelanguage programs with a machinecheckable proof. Such proofs have previously defined typechecking rules as part of the logic. We show a universal type framework for proofcarrying code that will allow a code producer to choose a p ..."
Abstract

Cited by 135 (19 self)
 Add to MetaCart
Proofcarrying code is a framework for proving the safety of machinelanguage programs with a machinecheckable proof. Such proofs have previously defined typechecking rules as part of the logic. We show a universal type framework for proofcarrying code that will allow a code producer to choose a programming language, prove the type rules for that language as lemmas in higherorder logic, then use those lemmas to prove the safety of a particular program. We show how to handle traversal, allocation, and initialization of values in a wide variety of types, including functions, records, unions, existentials, and covariant recursive types. 1