Share on Facebook Tweet on Twitter Share on LinkedIn Share by email
Semantics of Concurrent Revisions

Sebastian Burckhardt and Daan Leijen

Abstract

Enabling applications to execute various tasks in parallel is difficult if those tasks exhibit read and write conflicts. We recently developed a programming model based on concurrent revisions that addresses this challenge in a novel way: each forked task gets a conceptual copy of all the shared state, and state changes are integrated only when tasks are joined, at which time write-write conflicts are deterministically resolved.

In this paper, we study the precise semantics of this model, in particular its guarantees for determinacy and consistency. First, we introduce a revision calculus that concisely captures the programming model. Despite allowing concurrent execution and locally nondeterministic scheduling, we prove that the calculus is confluent and guarantees determinacy. We show that the consistency guarantees of our calculus are a logical extension of snapshot isolation with support for conflict resolution and nesting. Moreover, we discuss how custom merge functions can provide stronger guarantees for particular data types that are tailored to the needs of the application. Finally, we show we can faithfully characterize concurrent computations as revision diagrams which show visually the synchronization between tasks and allow local reasoning about state updates. We prove various properties of revision diagrams, and show in particular that these graphs are semi-lattices.

Details

Publication typeTechReport
NumberMSR-TR-2010-94
> Publications > Semantics of Concurrent Revisions