Results 1 
8 of
8
Practical RefinementType Checking
, 1997
"... Refinement types allow many more properties of programs to be expressed and statically checked than conventional type systems. We present a practical algorithm for refinementtype checking in a calculus enriched with refinementtype annotations. We prove that our basic algorithm is sound and comple ..."
Abstract

Cited by 34 (1 self)
 Add to MetaCart
Refinement types allow many more properties of programs to be expressed and statically checked than conventional type systems. We present a practical algorithm for refinementtype checking in a calculus enriched with refinementtype annotations. We prove that our basic algorithm is sound and complete, and show that every term which has a refinement type can be annotated as required by our algorithm. Our positive experience with an implementation of an extension of this algorithm to the full core language of Standard ML demonstrates that refinement types can be a practical program development tool in a realistic programming language. The required refinement type definitions and annotations are not much of a burden and serve as formal, machinechecked explanations of code invariants which otherwise would remain implicit. 1 Introduction The advantages of staticallytyped programming languages are well known, and have been described many times (e.g. see [Car97]). However, conventional ty...
Hybrid Type Checking
"... Traditional static type systems are effective for verifying basic interface specifications. Dynamicallychecked contracts support more precise specifications, but these are not checked until run time, resulting in incomplete detection of defects. Hybrid type checking is a synthesis of these two appro ..."
Abstract

Cited by 17 (0 self)
 Add to MetaCart
Traditional static type systems are effective for verifying basic interface specifications. Dynamicallychecked contracts support more precise specifications, but these are not checked until run time, resulting in incomplete detection of defects. Hybrid type checking is a synthesis of these two approaches that enforces precise interface specifications, via static analysis where possible, but also via dynamic checks where necessary. This paper explores the key ideas and implications of hybrid type checking, in the context of the λcalculus extended with contract types, i.e., with dependent function types and with arbitrary refinements of base types.
Type reconstruction for general refinement types
 In ESOP ’07
, 2007
"... Abstract. General refinement types allow types to be refined by predicates written in a generalpurpose programming language, and can express function pre and postconditions and data structure invariants. In this setting, with expressive and possibly verbose types, type reconstruction is particular ..."
Abstract

Cited by 13 (3 self)
 Add to MetaCart
Abstract. General refinement types allow types to be refined by predicates written in a generalpurpose programming language, and can express function pre and postconditions and data structure invariants. In this setting, with expressive and possibly verbose types, type reconstruction is particularly valuable, yet typeability is undecidable because it subsumes type checking. Using a generalized notion of type reconstruction, we present the first type reconstruction algorithm for a type system with base types refined by abitrary program terms. Our algorithm is a typeabilitypreserving transformation and defers type checking to a subsequent phase. The algorithm generates and solves a collection of implication constraints over refinement predicates, inferring maximally precise refinement predicates in a largely syntactic manner that is reminiscent of strongest postcondition calculation. Perhaps surprisingly, our notion of type reconstruction is decidable even though type checking is not. 1
Full Abstraction, Totality and PCF
 Math. Structures Comput. Sci
, 1997
"... ion, Totality and PCF Gordon Plotkin Abstract Inspired by a question of Riecke, we consider the interaction of totality and full abstraction, asking whether full abstraction holds for Scott's model of cpos and continuous functions if one restricts to total programs and total observations. The ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
ion, Totality and PCF Gordon Plotkin Abstract Inspired by a question of Riecke, we consider the interaction of totality and full abstraction, asking whether full abstraction holds for Scott's model of cpos and continuous functions if one restricts to total programs and total observations. The answer is negative, as there are distinct operational and denotational notions of totality. However, when two terms are each total in both senses then they are totally equivalent operationally iff they are totally equivalent in the Scott model. Analysing further, we consider sequential and parallel versions of PCF and several models: Scott's model of continuous functions, Milner's fully abstract model of PCF and their effective submodels. We investigate how totality differs between these models. Some apparently rather difficult open problems arise, essentially concerning whether the sequential and parallel versions of PCF have the same expressive power, in the sense of total equivale...
A Theory of Program Refinement
, 1998
"... We give a canonical program refinement calculus based on the lambda calculus and classical firstorder predicate logic, and study its proof theory and semantics. The intention is to construct a metalanguage for refinement in which basic principles of program development can be studied. The idea is t ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
We give a canonical program refinement calculus based on the lambda calculus and classical firstorder predicate logic, and study its proof theory and semantics. The intention is to construct a metalanguage for refinement in which basic principles of program development can be studied. The idea is that it should be possible to induce a refinement calculus in a generic manner from a programming language and a program logic. For concreteness, we adopt the simplytyped lambda calculus augmented with primitive recursion as a paradigmatic typed functional programming language, and use classical firstorder logic as a simple program logic. A key feature is the construction of the refinement calculus in a modular fashion, as the combination of two orthogonal extensions to the underlying programming language (in this case, the simplytyped lambda calculus). The crucial observation is that a refinement calculus is given by extending a programming language to allow indeterminate expressions (or ‘stubs’) involving the construction ‘some program x such that P ’. Factoring this into ‘some x...’
When is a type refinement an inductive type
 In FOSSACS, volume 6604 of Lecture Notes in Computer Science
, 2011
"... Abstract. Dependently typed programming languages allow sophisticated properties of data to be expressed within the type system. Of particular use in dependently typed programming are indexed types that refine data by computationally useful information. For example, the Nindexed type of vectors ref ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
Abstract. Dependently typed programming languages allow sophisticated properties of data to be expressed within the type system. Of particular use in dependently typed programming are indexed types that refine data by computationally useful information. For example, the Nindexed type of vectors refines lists by their lengths. Other data types may be refined in similar ways, but programmers must produce purposespecific refinements on an ad hoc basis, developers must anticipate which refinements to include in libraries, and implementations often store redundant information about data and their refinements. This paper shows how to generically derive inductive characterisations of refinements of inductive types, and argues that these characterisations can alleviate some of the aforementioned difficulties associated with ad hoc refinements. These characterisations also ensure that standard techniques for programming with and reasoning about inductive types are applicable to refinements, and that refinements can themselves be further refined. 1
Simplytyped Underdeterminism
 of Journal of Computer Science and Technology
, 1998
"... We study an extension of the simplytyped lambda calculus with constructs for expressing a notion we call underdeterminism. This allows us to interpret notions of stub and skeleton used in topdown program development. We axiomatise a simple notion of program refinement, and give a semantics, for wh ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
We study an extension of the simplytyped lambda calculus with constructs for expressing a notion we call underdeterminism. This allows us to interpret notions of stub and skeleton used in topdown program development. We axiomatise a simple notion of program refinement, and give a semantics, for which the calculus is proved sound and complete. 1
Compositional and Decidable Checking for Dependent Contract Types
, 2008
"... Simple type systems perform compositional reasoning in that the type of a term depends only on the types of its subterms, and not on their semantics. Contracts offer more expressive abstractions, but static contract checking systems typically violate those abstractions and base their reasoning direc ..."
Abstract
 Add to MetaCart
Simple type systems perform compositional reasoning in that the type of a term depends only on the types of its subterms, and not on their semantics. Contracts offer more expressive abstractions, but static contract checking systems typically violate those abstractions and base their reasoning directly upon the semantics of terms. Pragmatically, this noncompositionality makes the decidability of static checking unpredictable. We first show how compositional reasoning may be restored using standard typetheoretic techniques, namely existential types and subtyping. Despite its compositional nature, our type system is exact, in that the type of a term can completely capture its semantics, hence demonstrating that precision and compositionality are compatible. We then address predictability of static checking for contract types by giving a typechecking algorithm for an important