## Type-theoretic semantics for transactional concurrency (2007)

### Cached

### Download Links

Citations: | 6 - 4 self |

### BibTeX

@MISC{Nanevski07type-theoreticsemantics,

author = {Aleksandar Nanevski and Paul Govereau and Greg Morrisett},

title = { Type-theoretic semantics for transactional concurrency},

year = {2007}

}

### OpenURL

### Abstract

We propose a dependent type theory that integrates programming, specifications, and reasoning about higher-order concurrent programs with shared transactional memory. The design builds upon our previous work on Hoare Type Theory (HTT), which we extend with types that correspond to Hoare-style specifications for transactions. The types track shared and local state of the process separately, and enforce that shared state always satisfies a given invariant, except at specific critical sections which appear to execute atomically. Atomic sections may violate the invariant, but must restore it upon exit. HTT follows Separation Logic in providing tight specifications of space requirements. As a logic, we argue that HTT is sound and compositional. As a programming language, we define its operational semantics and show adequacy with respect to specifications.

### Citations

733 | Notions of Computation and Monads
- Moggi
- 1991
(Show Context)
Citation Context ...gorithmically. All of these features significantly improve over the information hiding and code reuse facilities of Hoare Logic. From the semantic standpoint, the Hoare type ST {P } x:A{Q} is a monad =-=[16]-=-. Here we introduce yet another monadic family of Hoare types, which serves to encapsulate concurrent behavior. The new Hoare types take the form CMD {I}{P } x:A{Q} and classify concurrent programs th... |

413 |
Guarded commands, nondeterminacy and formal derivation of programs
- Dijkstra
- 1975
(Show Context)
Citation Context ...yping rules. Having in mind that there is a strong correspondence between relations and predicates (relations are extensions of predicates), the reader familiar with Dijkstra’s predicate transformers =-=[5]-=- will find the typechecking process completely analogous to computing strongest postconditions. We will have four typing judgments for computations, two for ST-computations and two for CMD-computation... |

404 | Language support for lightweight transactions, in OOPSLA '03
- Harris, Fraser
(Show Context)
Citation Context ...indeed be made if the step’s precondition has been proved in the assertion logic. 7. Related and future work Transactional Memory. Monads for dealing with transactions have been introduced in Haskell =-=[8, 9]-=-. Our approach is similar, however, we have not considered an explicit abort in this paper because we are interested in a high-level semantics where an explicit abort is not necessary [17]. Also, we c... |

383 | Composable memory transactions
- Harris, Marlow, et al.
- 2005
(Show Context)
Citation Context ...t concurrent programs that avoid data races and deadlock. Moreover, transactions are sufficiently well-behaved and compositional to fit naturally into a functional, higher-order language like Haskell =-=[9]-=-. In this paper we are interested not only in programming with transactions, but in developing a formal logic for specification and reasoning about concurrent programs with shared transactional memory... |

289 | Dependent types in practical programming
- Xi, Pfenning
- 1999
(Show Context)
Citation Context ...gical reasoning. Such systems have mostly employed singleton types to establish the connection between the pure and the impure levels of the language. Examples include Dependent ML by Xi and Pfenning =-=[30, 31]-=-, Applied type systems by Chen and Xi [4] and Zhu and Xi [32], a type system for certified binaries by Shao et al. [26], and the theory of refinements by Mandelbaum et at. [12]. HTT differs from these... |

269 | Local reasoning about programs that alter data structures - O’Hearn, Reynolds, et al. - 2001 |

216 | Cayenne–a language with dependent types
- Augustsson
- 1998
(Show Context)
Citation Context ...ncapsulation facilitates hygienic mixing of types and effects, and thus preserves soundness. There are also several recent proposals for purely functional languages with dependent types, like Cayenne =-=[1]-=-, Epigram [14], Omega [27] and Sage [7]. We also list several works that extend Hoare and Separation Logics with higher-order functions, like the work of Honda, Berger and Yoshida [2] and Krishnaswami... |

169 | Eliminating array bound checking through dependent types
- Xi, Pfenning
- 1998
(Show Context)
Citation Context ...gical reasoning. Such systems have mostly employed singleton types to establish the connection between the pure and the impure levels of the language. Examples include Dependent ML by Xi and Pfenning =-=[30, 31]-=-, Applied type systems by Chen and Xi [4] and Zhu and Xi [32], a type system for certified binaries by Shao et al. [26], and the theory of refinements by Mandelbaum et at. [12]. HTT differs from these... |

162 | Separation and information hiding - O’Hearn, Yang, et al. - 2004 |

159 | Towards a Mathematical Science of Computation
- McCarthy
- 1962
(Show Context)
Citation Context ... τ(H,M, N1) ∧ seleq τ(H,M, N2) ⊃ N1 =τ N2 The first axiom states that an empty heap does not contain any assignments. The second and the third are the well-known McCarthy axioms for functional arrays =-=[15]-=-. The fourth axiom asserts a version of heap functionality: a heap may assign at most one value to a location, for each given type. The fourth axiom is slightly weaker than expected, as we would like ... |

154 | Resources, concurrency and local reasoning
- O’Hearn
- 2004
(Show Context)
Citation Context ...fication and reasoning about concurrent programs with shared transactional memory. Most program logics for concurrency are versions of Hoare Logic [24]. The recent work on concurrent Separation Logic =-=[22, 3, 28, 6]-=- has made significant inroads into specification and reasoning about shared memory with locking synchronization. The advances of Separation Logic mostly revolve around the idea of spatial separation, ... |

153 |
The view from the left
- McBride, McKinna
(Show Context)
Citation Context ...facilitates hygienic mixing of types and effects, and thus preserves soundness. There are also several recent proposals for purely functional languages with dependent types, like Cayenne [1], Epigram =-=[14]-=-, Omega [27] and Sage [7]. We also list several works that extend Hoare and Separation Logics with higher-order functions, like the work of Honda, Berger and Yoshida [2] and Krishnaswami et al. [10]. ... |

136 |
Verifying Properties of Parallel Programs: An Axiomatic Approach
- Owicki, Gries
- 1976
(Show Context)
Citation Context ...nsactions, but in developing a formal logic for specification and reasoning about concurrent programs with shared transactional memory. Most program logics for concurrency are versions of Hoare Logic =-=[24]-=-. The recent work on concurrent Separation Logic [22, 3, 28, 6] has made significant inroads into specification and reasoning about shared memory with locking synchronization. The advances of Separati... |

118 |
Hybrid type checking
- Flanagan
- 2006
(Show Context)
Citation Context ...g of types and effects, and thus preserves soundness. There are also several recent proposals for purely functional languages with dependent types, like Cayenne [1], Epigram [14], Omega [27] and Sage =-=[7]-=-. We also list several works that extend Hoare and Separation Logics with higher-order functions, like the work of Honda, Berger and Yoshida [2] and Krishnaswami et al. [10]. To our knowledge, none of... |

84 | An Extended Calculus of Constructions
- Luo
- 1990
(Show Context)
Citation Context ...menting transactions. Similar to Haskell, HTT monads separate the purely functional from the effectful, impure fragment. The pure fragment of HTT includes the Extended Calculus of Constructions (ECC) =-=[11]-=-, which is a full dependent type theory with support for abstraction over type universes and predicates in higher-order logic. Indeed, we are currently in the process of implementing HTT in Coq [13], ... |

83 | Combining programming with theorem proving - Chen, Xi - 2005 |

83 | A type system for certified binaries
- Shao, Trifonov, et al.
- 2005
(Show Context)
Citation Context ...ure levels of the language. Examples include Dependent ML by Xi and Pfenning [30, 31], Applied type systems by Chen and Xi [4] and Zhu and Xi [32], a type system for certified binaries by Shao et al. =-=[26]-=-, and the theory of refinements by Mandelbaum et at. [12]. HTT differs from these approaches, because we allow effectful computations to freely appear in types, as the monadic encapsulation facilitate... |

78 | A Semantics for Concurrent Separation Logic
- Brookes
(Show Context)
Citation Context ...fication and reasoning about concurrent programs with shared transactional memory. Most program logics for concurrency are versions of Hoare Logic [24]. The recent work on concurrent Separation Logic =-=[22, 3, 28, 6]-=- has made significant inroads into specification and reasoning about shared memory with locking synchronization. The advances of Separation Logic mostly revolve around the idea of spatial separation, ... |

73 | A marriage of rely/guarantee and separation logic
- Vafeiadis, Parkinson
- 2007
(Show Context)
Citation Context ...fication and reasoning about concurrent programs with shared transactional memory. Most program logics for concurrency are versions of Hoare Logic [24]. The recent work on concurrent Separation Logic =-=[22, 3, 28, 6]-=- has made significant inroads into specification and reasoning about shared memory with locking synchronization. The advances of Separation Logic mostly revolve around the idea of spatial separation, ... |

69 | Languages of the future
- Sheard
- 2004
(Show Context)
Citation Context ...hygienic mixing of types and effects, and thus preserves soundness. There are also several recent proposals for purely functional languages with dependent types, like Cayenne [1], Epigram [14], Omega =-=[27]-=- and Sage [7]. We also list several works that extend Hoare and Separation Logics with higher-order functions, like the work of Honda, Berger and Yoshida [2] and Krishnaswami et al. [10]. To our knowl... |

62 | An effective theory of type refinements
- Mandelbaum, Walker, et al.
- 2003
(Show Context)
Citation Context ... by Xi and Pfenning [30, 31], Applied type systems by Chen and Xi [4] and Zhu and Xi [32], a type system for certified binaries by Shao et al. [26], and the theory of refinements by Mandelbaum et at. =-=[12]-=-. HTT differs from these approaches, because we allow effectful computations to freely appear in types, as the monadic encapsulation facilitates hygienic mixing of types and effects, and thus preserve... |

55 | High-level small-step operational semantics for transactions
- Moore, Grossman
- 2008
(Show Context)
Citation Context ...n Haskell [8, 9]. Our approach is similar, however, we have not considered an explicit abort in this paper because we are interested in a high-level semantics where an explicit abort is not necessary =-=[17]-=-. Also, we can state and check the pre-conditions for an atomic block statically, and do not require an explicit abort to ensure correctness of algorithms. Higher-order and dependent types for effects... |

43 | Abstract Predicates and Mutable ADTs in Hoare Type Theory
- Nanevski, Ahmed, et al.
- 2007
(Show Context)
Citation Context ...mbining programming, specification, and reasoning in the style of Separation Logic about higher-order programs with transactional concurrency. We build on our previous work on Hoare Type Theory (HTT) =-=[20, 18]-=-, which is a dependent type theory with extensive support for programming and reasoning about side-effects related to state. Here, we extend HTT with concurrency and transactional primitives. The main... |

40 | On the relationship between concurrent separation logic and assume guarantee reasoning
- Feng, Ferreira, et al.
- 2007
(Show Context)
Citation Context |

31 | A Concurrent Logical Framework: The Propositional Fragment
- Watkins, Cervesato, et al.
(Show Context)
Citation Context ...cation. We do not annotate lambda abstractions with the domain types, but instead provide a constructor M:A to ascribe a type A to the term M. This organization facilitates bidirectional typechecking =-=[29]-=-. The stdo and cmdo constructors are the introduction forms for the corresponding Hoare types, analogous to the monadic-do in Haskell, except in HTT we have separate constructor for each monad, to avo... |

28 | A logical analysis of aliasing in imperative higher-order functions
- Berger, Honda, et al.
- 2005
(Show Context)
Citation Context ...es, like Cayenne [1], Epigram [14], Omega [27] and Sage [7]. We also list several works that extend Hoare and Separation Logics with higher-order functions, like the work of Honda, Berger and Yoshida =-=[2]-=- and Krishnaswami et al. [10]. To our knowledge, none of the mentioned languages and logics has been extended to a concurrent setting. Separation Logic and concurrency. Resource invariants in (sequent... |

26 | Safe Programming with Pointers through Stateful Views
- Zhu, Xi
- 2005
(Show Context)
Citation Context ...s to establish the connection between the pure and the impure levels of the language. Examples include Dependent ML by Xi and Pfenning [30, 31], Applied type systems by Chen and Xi [4] and Zhu and Xi =-=[32]-=-, a type system for certified binaries by Shao et al. [26], and the theory of refinements by Mandelbaum et at. [12]. HTT differs from these approaches, because we allow effectful computations to freel... |

22 |
Hoare type theory, polymorphism and separation
- Nanevski, Morrisett, et al.
(Show Context)
Citation Context ...mbining programming, specification, and reasoning in the style of Separation Logic about higher-order programs with transactional concurrency. We build on our previous work on Hoare Type Theory (HTT) =-=[20, 18]-=-, which is a dependent type theory with extensive support for programming and reasoning about side-effects related to state. Here, we extend HTT with concurrency and transactional primitives. The main... |

15 | A realizability model of impredicative Hoare type theory
- Peterson, Birkedal, et al.
- 2008
(Show Context)
Citation Context ...hic types only, as customary in, say, Standard ML (SML). Thus, HTT supports only predicative polymorphism, although extensions with impredicativity are currently being investigated by Petersen et al. =-=[25]-=-. As usual with dependent types, we write A → B instead of Πx:A. B, when the type B does not depend on x. In the current paper, we ignore the other useful type constructors from pure type theories, li... |

10 |
Separation logic for a higher-order typed language
- Krishnaswami
(Show Context)
Citation Context ...m [14], Omega [27] and Sage [7]. We also list several works that extend Hoare and Separation Logics with higher-order functions, like the work of Honda, Berger and Yoshida [2] and Krishnaswami et al. =-=[10]-=-. To our knowledge, none of the mentioned languages and logics has been extended to a concurrent setting. Separation Logic and concurrency. Resource invariants in (sequential) Separation Logic were in... |