Hoare type theory, polymorphism and separation
- Alexandar Nanevski,
- J. Gregory Morrisett,
- Lars Birkedal
- Microsoft Research
Publikation:
Artikel i tidsskrift og konference artikel i tidsskrift
Tidsskriftartikel
Forskning
Peer-reviewResume
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 of type A. Hoare types can be nested,
combined with other types, and abstracted, leading to a smooth integration with higher-order
functions and type polymorphism.
We further show that in the presence of type polymorphism, it becomes possible to interpret
the Hoare types in the “small footprint” manner, as advocated by separation logic, whereby
specifications tightly describe the state required by the computation.
We establish that HTT is sound and compositional, in the sense that separate verifications
of individual program components suffice to ensure the correctness of the composite program.
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 of type A. Hoare types can be nested,
combined with other types, and abstracted, leading to a smooth integration with higher-order
functions and type polymorphism.
We further show that in the presence of type polymorphism, it becomes possible to interpret
the Hoare types in the “small footprint” manner, as advocated by separation logic, whereby
specifications tightly describe the state required by the computation.
We establish that HTT is sound and compositional, in the sense that separate verifications
of individual program components suffice to ensure the correctness of the composite program.
Publikation information
Produktionstype
Publikation:
Artikel i tidsskrift og konference artikel i tidsskrift
Tidsskriftartikel
Forskning
Peer-reviewOriginalsprog
EngelskSider fra-til (Antal sider)
Sider 865-911 (47 sider)Tidsskrift (Bind, Nummer)
Journal of Functional Programming (Bind 18, Udgave 5-6)Publikationsmilepæle
- Udgivet - 2008
Publikationsstatus
Udgivet - 2008
ISSN
0956-7968Publication IDs
- Scopus: 55249085443
Metrikker
PlumX
Antal citationer
108
Omtaler
1
Hentninger
48
