scispace - formally typeset
Open AccessJournal ArticleDOI

Alone Together: Compositional Reasoning and Inference for Weak Isolation

Reads0
Chats0
TLDR
A novel program logic is presented that enables compositional reasoning about the behavior of concurrently executing weakly-isolated transactions, and an inference procedure is described that ascertains the weakest isolation level that still guarantees the safety of high-level consistency assertions associated with such transactions.
Abstract
Serializability is a well-understood correctness criterion that simplifies reasoning about the behavior of concurrent transactions by ensuring they are isolated from each other while they execute. However, enforcing serializable isolation comes at a steep cost in performance and hence database systems in practice support, and often encourage, developers to implement transactions using weaker alternatives. Unfortunately, the semantics of weak isolation is poorly understood, and usually explained only informally in terms of low-level implementation artifacts. Consequently, verifying high-level correctness properties in such environments remains a challenging problem. To address this issue, we present a novel program logic that enables compositional reasoning about the behavior of concurrently executing weakly-isolated transactions. Recognizing that the proof burden necessary to use this logic may dissuade application developers, we also describe an inference procedure based on this foundation that ascertains the weakest isolation level that still guarantees the safety of high-level consistency invariants associated with such transactions. The key to effective inference is the observation that weakly-isolated transactions can be viewed as functional (monadic) computations over an abstract database state, allowing us to treat their operations as state transformers over the database. This interpretation enables automated verification using off-the-shelf SMT solvers. Case studies and experiments of real-world applications (written in an embedded DSL in OCaml) demonstrate the utility of our approach.

read more

Citations
More filters
Journal ArticleDOI

Hamsaz: replication coordination analysis and synthesis

TL;DR: This work presents novel coordination protocols that are parametric in terms of the analysis results and provide the well-coordination requirements and implemented a tool called Hamsaz that can automatically analyze the given object, instantiate the protocols and synthesize replicated objects.
Journal ArticleDOI

Safe replication through bounded concurrency verification

TL;DR: A novel programming framework for replicated data types (RDTs) equipped with an automatic (bounded) verification technique that discovers and fixes weak consistency anomalies and shows that in practice, proving bounded safety guarantees typically generalize to the unbounded case.
Journal ArticleDOI

Mergeable replicated data types

TL;DR: This work presents a fundamentally different approach to programming in the presence of replicated state based on the use of invertible relational specifications of an inductively-defined data type as a mechanism to capture salient aspects of the data type relevant to how its different instances can be safely merged in a replicated environment.
Book ChapterDOI

Proving the Safety of Highly-Available Distributed Objects

TL;DR: This work proposes a proof methodology for establishing that a given object maintains a given invariant, taking into account any concurrency control, for the subclass of state-based distributed systems.
Book ChapterDOI

On the Semantics of Snapshot Isolation

TL;DR: In this article, the authors define snapshot isolation (SI) as a standard transactional consistency model used in databases, distributed systems and software transactional memory (STM), and define its semantics both declaratively and operationally as a concurrent algorithm with memory bearing timestamps.
References
More filters
Proceedings ArticleDOI

Separation logic: a logic for shared mutable data structures

TL;DR: An extension of Hoare logic that permits reasoning about low-level imperative programs that use shared mutable data structure is developed, including extensions that permit unrestricted address arithmetic, dynamically allocated arrays, and recursive procedures.
Journal ArticleDOI

The notions of consistency and predicate locks in a database system

TL;DR: It is argued that a transaction needs to lock a logical rather than a physical subset of the database, and an implementation of predicate locks which satisfies the consistency condition is suggested.
Journal ArticleDOI

Brewer's conjecture and the feasibility of consistent, available, partition-tolerant web services

TL;DR: In this paper, it is shown that it is impossible to achieve consistency, availability, and partition tolerance in the asynchronous network model, and then solutions to this dilemma in the partially synchronous model are discussed.
Proceedings ArticleDOI

A critique of ANSI SQL isolation levels

TL;DR: It is shown that these phenomena and the ANSI SQL definitions fail to properly characterize several popular isolation levels, including the standard locking implementations of the levels covered, and new phenomena that better characterize isolation types are introduced.
Journal ArticleDOI

Tentative steps toward a development method for interfering programs

TL;DR: In this paper, extensions to the specification method based on postconditions that are predicates of two states and the development methods of operation decomposition and data refinement are proposed for the rigorous development of interfering programs.
Related Papers (5)