Relationally-parametric polymorphic contracts

@inproceedings{Guha2007RelationallyparametricPC,
  title={Relationally-parametric polymorphic contracts},
  author={Arjun Guha and Jacob Matthews and R. Findler and S. Krishnamurthi},
  booktitle={DLS '07},
  year={2007}
}
The analogy between types and contracts raises the question of how many features of static type systems can be expressed as dynamic contracts. An important feature missing in prior work on contracts is parametricity, as represented by the polymorphic types in languages like Standard ML. We present a contract counterpart to parametricity. We explore multiple designs for such a system and present one that is simple and incurs minimal execution overhead. We show how to extend the notion of… Expand
Polymorphic Contracts
TLDR
This work defines FH, a polymorphic calculus with manifest contracts, and establishes fundamental properties including type soundness and relational parametricity, and develops the metatheory of contracts in a completely syntactic fashion. Expand
Polymorphic Manifest Contracts, Revised and Resolved
TLDR
This calculus is the first polymorphic manifest calculus with parametricity, depending on no conjectures—it resolves the issues in prior calculi with delayed substitution on casts, and establishes fundamental properties including type soundness and relationalParametricity. Expand
Computational contracts
TLDR
Computational contracts is a contract model with blame assignment in a higher-order setting that provides a systematic way to specify temporal contracts over objects and functions and their possibly higher- order arguments. Expand
Space-efficient gradual typing
TLDR
A semantics for gradual typing is presented that is based on coercions instead of function proxies, and which combines adjacent coercions at runtime to limit their space consumption, demonstrating that programmers can safely mix typing disciplines without incurring unreasonable overheads. Expand
The root cause of blame: contracts for intersection and union types
TLDR
The untyped lambda calculus is extended with contracts for monitoring higher-order intersection and union types, for the first time giving a uniform treatment to both. Expand
Blame for all
We present a language that integrates statically and dynamically typed components, similar to the gradual types of Siek and Taha (2006), and extend it to incorporate parametric polymorphism. OurExpand
Manifest contracts
TLDR
This dissertation develops so-called manifest contract systems which integrate more coherently in the type system, and relates them to Findler-and-Felleisen-style latent contracts, and extends a manifest system with type abstraction and relational parametricity. Expand
Behavioral software contracts
TLDR
The keynote presents the challenges and rewards of supporting contracts in a modern, full-spectrum programming language and covers technical challenges of contracts while demonstrating the non-technical motivation for contract system design choices and showing how contracts and contract research can serve practicing programmers. Expand
Gradual parametricity, revisited
TLDR
The challenge of designing a gradual language with explicit parametric polymorphism is revisited, exploring the extent to which the Abstracting Gradual Typing methodology helps to derive such a language, GSF, and establishing a weaker property that allows to disprove several claims about gradual free theorems. Expand
Design and evaluation of contracts for gradual typing
TLDR
This thesis investigates the design and evaluation of contracts for gradual typing, focusing on bridging the gap between JavaScript (dynamic) and TypeScript (static), and shows that contracts can be used to enforce conformance to a type, detecting errors in the speci cation. Expand
...
1
2
3
4
5
...

References

SHOWING 1-10 OF 31 REFERENCES
Typed Contracts for Functional Programming
TLDR
This paper proposes an embedded domain-specific language for typed, higher-order and first-class contracts, which is both more expressive than previous proposals, and allows for a more informative blame assignment. Expand
Contracts as Pairs of Projections
TLDR
A model for software contracts that follows Dana Scott's program by interpreting contracts as projections is developed, providing a definitive answer to the questions raised by Blume and McAllester's work. Expand
Contracts for higher-order functions
TLDR
This paper introduces λcon, a typed lambda calculus with assertions for higher-order functions, which models the assertion monitoring system that is employed in DrScheme and establishes basic properties of the model (type soundness, etc.). Expand
Interlanguage migration: from scripts to programs
TLDR
This paper proves that rewriting a program that consists of modules in the untyped lambda calculus produces an equivalent program and adds the expected amount of type safety, i.e., code in typed modules can't go wrong. Expand
Compiling polymorphism using intensional type analysis
TLDR
This paper examines an alternative approach for compiling polymorphism where types are passed as arguments to polymorphic routines in order to determine the representation of an object, and shows how to translate an ML-like language into the target language so that primitive operators can analyze types to produce efficient representations. Expand
Principals in programming languages: a syntactic proof technique
TLDR
This paper adds principals to variants of the simply-typed λ-calculus and shows how it can track the code corresponding to each principal throughout evaluation, and yields syntactic proofs of some type abstraction properties that traditionally require semantic arguments. Expand
Abstract types have existential type
TLDR
This work uses a second-order typed lambda calculus SOL to show how data algebras may be given types, passed as parameters, and returned as results of function calls. Expand
A Theory of Type Polymorphism in Programming
  • R. Milner
  • Computer Science
  • J. Comput. Syst. Sci.
  • 1978
TLDR
This work presents a formal type discipline for polymorphic procedures in the context of a simple programming language, and a compile time type-checking algorithm w which enforces the discipline. Expand
Behavioral contracts and behavioral subtyping
TLDR
This paper shows how to enforce contracts if components are manufactured from class and interface hierarchies with pre- and post-conditions in the context of Java, based on the notion of behavioral subtyping. Expand
jContractor: A Reflective Java Library to Support Design by Contract
jContractor is a purely library based approach to support Design By Contract specifications such as preconditions, postconditions, class invariants, and recovery and exception handling in Java.Expand
...
1
2
3
4
...