# Hoare type theory, polymorphism and separation1

@article{Nanevski2008HoareTT, title={Hoare type theory, polymorphism and separation1}, author={Aleksandar Nanevski and J. G. Morrisett and L. Birkedal}, journal={Journal of Functional Programming}, year={2008}, volume={18}, pages={865 - 911} }

Abstract We consider the problem of reconciling a dependently typed functional language with imperative features such as mutable higher-order state, pointer aliasing, and nontermination. We propose Hoare type theory (HTT), which incorporates Hoare-style specifications into types, making it possible to statically track and enforce correct use of side effects. The main feature of HTT is the Hoare type {P}x:A{Q} specifying computations with precondition P and postcondition Q that return a result… Expand

#### Topics from this paper

#### 117 Citations

Formalized Proof of Type Safety of Hoare Type Theory

- 2011

We prove type safety of the Hoare Type Theory (HTT), an extension of Separation Logic and Hoare Logic to higher-order functional programs. Our proof is rather simple and is based on subject… Expand

Type-theoretic Semantics for Transactional Concurrency

- Computer Science
- 2007

A dependent type theory that integrates programming, specifications, and reasoning about higher-order concurre nt programs with shared transactional memory is proposed and it is argued that HTT is sound and compositional. Expand

Inferring Precise Polymorphic Specifications for the Hoare State Monad

- Computer Science
- 2012

This paper aims to reduce this cost by automatically inferring verification conditions for programs using the Hoare monad by implementing the inference algorithm as a front-end to the F compiler and reporting on a preliminary evaluation of the tool on a collection of benchmarks. Expand

Towards type-theoretic semantics for transactional concurrency

- Computer Science
- TLDI '09
- 2009

A dependent type theory that integrates programming, specifications, and reasoning about higher-order concurrent programs with shared transactional memory is proposed, arguing that HTT is sound and compositional. Expand

Structuring the verification of heap-manipulating programs

- Computer Science
- POPL '10
- 2010

This work uses reflection to enable equational reasoning about heaps, and Hoare triples with binary postconditions to further facilitate it, to obtain a new proof technique for verification of higher-order imperative programs that is general, extendable, and supports very short proofs, even without significant use of automation by tactics. Expand

Dependent types and multi-monadic effects in F*

- Computer Science
- POPL 2016
- 2016

A new, completely redesigned, version of F*, a language that works both as a proof assistant as well as a general-purpose, verification-oriented, effectful programming language that confirms F*'s pay-as-you-go cost model. Expand

Syntactic soundness proof of a type-and-capability system with hidden state

- Computer Science
- J. Funct. Program.
- 2013

This paper presents a formal definition and machine-checked soundness proof for a very expressive type-and-capability system, that is, a low-level type system that keeps precise track of ownership and side effects, and offers evidence that this relatively simple-minded proof technique can scale up to systems of this complexity. Expand

Propositions-as-types and shared state

- Computer Science
- Proc. ACM Program. Lang.
- 2021

We develop a principled integration of shared mutable state into a proposition-as-types linear logic interpretation of a session-based concurrent programming language. While the foundation of type… Expand

Dependent Types for Class-based Mutable Objects

- Computer Science
- ECOOP
- 2018

This is the first dependently-typed language with mutable objects that the authors know of to bring classes and index refinements into play, enabling types (classes) to be refined by indices drawn from some constraint domain. Expand

Verification Condition Generation with the Dijkstra State Monad

- Mathematics
- 2012

The Hoare state monad provides a powerful means of structuring the verification of higher-order, stateful programs. This paper defines a new variant of the Hoare state monad, which, rather than being… Expand

#### References

SHOWING 1-10 OF 120 REFERENCES

Abstract Predicates and Mutable ADTs in Hoare Type Theory

- Computer Science
- ESOP
- 2007

This paper extends HTT with quantification over abstract predicates, thus embedding into HTT the Extended Calculus of Constructions, and demonstrates this power by sketching a number of abstract data types that demand ownership of mutable memory, including an idealized custom memory manager. Expand

Dependent types in practical programming

- Computer Science
- POPL '99
- 1999

We present an approach to enriching the type system of ML with a restricted form of dependent types, where type index objects are drawn from a constraint domain C, leading to the DML(C) language… Expand

Dependently typed functional programs and their proofs

- Computer Science, Mathematics
- 2000

This thesis shows that the adoption of this uniqueness as axiomatic is sufficient to make pattern matching admissible, and develops technology for programming with dependent inductive families of datatypes and proving those programs correct. Expand

A logical analysis of aliasing in imperative higher-order functions

- Computer Science
- ICFP '05
- 2005

The program logic extends earlier logic for alias-free imperative higher-order functions with new modal operators which serve as building blocks for clean structural reasoning about programs and data structures in the presence of aliasing. Expand

A step-indexed model of substructural state

- Computer Science
- ICFP '05
- 2005

The goal is to establish a common model that supports each of these languages, by allowing us to encode and study the interactions of the different forms of uniqueness, based on a substructural variant of the polymorphic λ-calculus, augmented with four kinds of mutable references. Expand

A Linear Language with Locations

- 2007

We present a simple, but expressive type system that supports strong updates—updating a memory cell to hold values of unrelated types at different points in time. Our formulation is based upon a… Expand

L3: A Linear Language with Locations

- Mathematics, Computer Science
- Fundam. Informaticae
- 2005

We present a simple, but expressive type system that supports strong updates - updating a memory cell to hold values of unrelated types at different points in time. Our formulation is based upon a… Expand

Separation Logic for Higher-Order Store

- Computer Science
- CSL
- 2006

This paper introduces an extension of the logic and proves it sound, including the Frame Rule that enables specifications of code to be extended by invariants on parts of the heap that are not accessed, and introduces the benefits of local reasoning available to languages with higher-order store. Expand

Bunching for Regions and Locations

- Computer Science
- MFPS
- 2006

The model is refined and used to provide a denotational semantics for a language with explicit allocation and disposal of regions, and it is shown how both additive and multiplicative polymorphic quantifiers arise naturally in the authors' models. Expand

A logic for information flow in object-oriented programs

- Computer Science
- POPL '06
- 2006

This paper specifies, via a Hoare-like logic, an interprocedural and flow sensitive (but termination insensitive) information flow analysis for object-oriented programs that employs independence assertions to describe the noninterference property that formalizes confidentiality, and employs region assertions to describes possible aliasing. Expand