Manuscript Offprint
arXiv:2611.09410Nothing Is Shared Until You Synchronise: Reinterpreting Java for Data-Race Freedom
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Reinterpreting Java for Data-Race Freedom
LUKE CHEESEMAN, Uppsala University, Sweden
ELIAS CASTEGREN, Uppsala University, Sweden
DAVID BLACK-SCHAFFER, Uppsala University, Sweden
ERIK ÖSTERLUND, Oracle, Sweden
TOBIAS WRIGSTAD, Uppsala University, Sweden
In mainstream shared-memory languages, programmers use synchronisation mechanisms such as locks to isolate shared data accesses across threads to avoid data races. Yet synchronisation enforces only a temporal ordering, while the underlying shared memory continues to communicate updates between threads at every ordinary read and write. To achieve isolation, programmers therefore need to understand the connection between ordering and communication, and to apply synchronisation correctly and consistently on that basis, while compilers and hardware optimise assuming they have. When programmers do not order (synchronise) correctly, they lose isolation, and the semantics of their programs change without notice.
We propose Sync-as-Share, a memory model built on isolation and communication rather than on the ordering of accesses to shared memory. We start from thread isolation, where each thread reads and writes a private view of memory, and reinterpret programs' existing synchronisation actions to take on the additional role of explicitly communicating updates. As nothing is communicated outside of synchronisation actions, data races become impossible by construction. Instead, conflicting updates are now detected at synchronisation points. Importantly, by viewing synchronisation as explicit communication, we are able to identify, expose, and address the underlying synchronisation design decisions of what should be communicated, to whom, and what counts as a conflict. We explore these design decisions in Sync-as-Share and propose two different communication topologies with different trade-offs. To make the implications concrete, we instantiate Sync-as-Share for Java by making the synchronisation actions already defined by its memory model the only points at which threads communicate. Java programs can therefore adopt Sync-as-Share unmodified. We then formalise this instantiation, drawing on version control systems to build version-controlled memory, in which synchronisation actions push and pull updates between private views, and mechanise the formalisation in Rocq. From this we can then show that Java programs that are correctly synchronised (as defined by the current Java memory model) behave identically under shared memory and Sync-as-Share, while providing the benefits of isolation and explicit communication.
1 Introduction
Programmers using shared memory aim to work in isolation and to reason about a thread as if the state it touches were its own. They use synchronisation at the boundaries where that isolation must be broken, so that data can pass from one thread to another. Locks, volatiles, and thread start/join are the vocabulary for those boundaries. But they do not deliver isolation. Instead they enforce a temporal ordering which is only indirectly connected to isolation. Every thread still reads and writes one shared memory, and the mechanisms order threads without denoting the state being handed over. This misalignment places two demands on programmers: they must apply synchronisation correctly and consistently across all accesses to all shared data, and they must understand the language and hardware memory models well enough to know how ordering in time translates into isolation across space. This has proven difficult: programmers do not consistently apply synchronisation correctly [10, 35], the races that result are hard enough to find that a whole
Authors' Contact Information: Luke Cheeseman, Uppsala University, Uppsala, Sweden, luke.cheeseman@it.uu.se; Elias Castegren, Uppsala University, Uppsala, Sweden, elias.castegren@it.uu.se; David Black-Schaffer, Uppsala University, Uppsala, Sweden, david.black-schaffer@it.uu.se; Erik Österlund, Oracle, Stockholm, Sweden, erik.osterlund@oracle.com; Tobias Wrigstad, Uppsala University, Uppsala, Sweden, tobias.wrigstad@it.uu.se.
class of tools exists to find them [3, 23, 46], and understanding how ordering translates into isolation for incorrectly synchronised programs is itself a research topic [6, 37, 47]. Failing either demand has a cost. Compilers and hardware assume synchronisation is correct, and the optimisations they apply preserve semantics only when that assumption holds [11, 37]. To avoid these problems entirely, some languages and concurrency paradigms enforce isolation by construction, but they require programs to be (re-)written following their semantics, which is prohibitively expensive for large existing projects based on shared memory.
In this paper, we explore the consequences of fixing the misalignment of synchronisation and isolation for programs written against shared memory. We do so by starting from thread isolation rather than globally shared memory. In our approach, each thread operates on a private view of memory, and synchronisation operations (such as unlock) are reinterpreted to provide both explicit ordering and explicit communication of shared data. By explicit communication, we mean that a thread's synchronisation points are the only places where its private updates are communicated outwards and other threads' updates inwards.
This memory model has several important properties. First, isolation means that data races in the shared-memory sense are impossible by construction. Explicit communication means that a program's synchronisation dictates precisely where updates from different threads are brought together, and any conflicts (such as unsynchronised concurrent writes to the same variables) are detected there. Second, explicit communication exposes the design decisions of what data is shared with which threads, what we call the communication topology, and what constitutes a conflict. Finally, extending existing program synchronisation ordering to provide explicit communication means that programs need no changes and correctly synchronised programs retain their semantics.
We call this memory model Sync-as-Share. For concreteness, we instantiate Sync-as-Share for Java by reinterpreting the synchronisation actions of the Java Memory Model (JMM), i.e., monitors, volatile fields, and thread start and join. In this paper:
- we introduce Sync-as-Share and explore the consequences of defaulting to thread isolation with synchronisation as explicit communication (§2);
- we explore realisations for two communication topologies (§3);
- we formalise the semantics of the two topologies together with a simplified shared-memory baseline (§4);
- we mechanise our formalism in Rocq [1] and show that correctly synchronised programs under Sync-as-Share present the same behaviour as under shared memory (§5);
- we discuss some of the design choices inherent to Sync-as-Share (§6).
Our aim in this paper is to design a memory model built on isolation and communication, rather than on the ordering of accesses to shared memory. The motivation is to enable a better understanding of, and avoidance of, data races, while providing backwards compatibility for correctly synchronised programs through the reuse of their existing synchronisation operations. In particular, this paper does not address implementation and optimisation of the model, which we leave for future work. While we understand that the most direct implementation of Sync-as-Share would have significant overhead, we encourage the reader to consider this akin to the first introduction of other quality-of-code ideas, such as garbage collection, whose overheads have been successfully addressed over time. In addition, while our design is largely language agnostic, we explore our model in the context of Java, and explicitly leave discussions of how it would interact with other languages' memory models for later work.
Table 1. Communication choices in popular programming models and Sync-as-Share.
| Shared Memory | Transactions (STM) | Actors | Sync-as-Share | |
|---|---|---|---|---|
| (1) actions | All load and store instructions | Transactional variable reads and commits | Message sends and receives | Explicit program synchronisation actions |
| (2) what | All changes to the cacheline | The values of transactional variables | Message contents | Thread's whole view |
| (3) whom | All other threads | All other threads | The target actor | All threads, or users of the same synchronisation object |
| (4) direction | Load (in)Store (out) | Read (in)Commit (out) | Receive (in)Send (out) | Acquire (in)Release (out, or both) |
| (5) reconciled | Writes overwrite; reads see what the memory model allows | Abort on write to a read or written location | Objects in message's payload added to actor's heap | Conflict on writes to the same location |
When we instantiate Sync-as-Share for Java, we must adhere to the guarantees given by the JMM: all executions of a correctly synchronised program must appear sequentially consistent [37, §17.4.5]. For correctly synchronised programs we explicitly aim to preserve all valid executions (cf. Theorem 5.15). That requirement answers the first two design decisions outright, sets a minimum on the next two, and leaves the last to us. It also bounds our design choices, as they may only affect how an incorrectly synchronised program behaves, and where its conflicts surface. Our mapping onto Java therefore works thus: 1) The actions that communicate are Java's synchronisation actions [37, §17.4.2]: locking and unlocking a monitor, reading and writing a volatile field, starting and joining a thread, and the synthetic first and last actions of each thread.¹ 2) The thread's whole view is communicated, since anything narrower would break guarantees Java makes today [37, §17.4.5]. 3) Java requires that two threads synchronising on the same object communicate [37, §17.4.4], but a thread that communicates more widely still meets that requirement. How narrowly or widely threads communicate is the communication topology, and we present two options in §3.4) Java's synchronisation actions either release or acquire [37, §17.4.4]: a release communicates outwards, an acquire inwards. Sync-as-Share must match the communication directions these actions provide, but may additionally communicate in the other direction. 5) Deciding what counts as a conflict is a choice that is entirely ours, as Java does not detect nor prohibit data races. The last point is where we choose to break backwards-compatibility with the JMM's ignoring conflicts: we consider updates to the same location in two views to be a conflict, regardless of their values, and throw an exception when such a conflict is detected. We revisit alternative choices for this design space, including program-defined conflict definitions, in §6.
We use the programs in Fig. 1 to introduce the implications of isolation and explicit communication, and the programs in Fig. 2 to present our two communication topologies. We follow the standard form of "litmus test" from the memory model literature [2, 6]. Each program is expressed
¹We do not include VarHandles' access modes [41].
Note: at the start of all threads x=y=a=b=0

Fig. 1. Fork-join programs, how each model reads them, and what Thread 1 is left with at the end of its own code. The two accounts differ in what the threads write to and in what relates them: shared locations related by ordering, or private views related by communication. The diagrams show what each program's synchronisation communicates; (a) has none, and the sign in (b) marks the thread that detects the conflict.
as two sequences of statements which may be interleaved, and possibly also reordered by a compiler under the assumption that each piece of mutable state is isolated to a single thread. The variables x, y, a and b are global locations – in a Java program, they might be fields of objects on the heap.
Figure 1(a): Threads are isolated in their writes. Under Shared memory this is a write–write race, but nothing marks it as such at run time. Indeed, without a race detector, the program runs to completion with no sign that one thread's write was silently lost. Under Sync-as-Share the programmer has provided no synchronisation. As a result, neither thread's updates to its private view are ever communicated to the other. Neither thread sees the other's change in memory.
Insight: Without the programmer providing synchronisation nothing a thread does is communicated, and what is never communicated cannot conflict. This explicitly connects the programmer's interpretation of what data should be shared or isolated with their use of synchronisation. However, what the runtime does at the end of a thread's lifetime matters, and we return to it in §3.
Figure 1(b): Synchronisation is where updates are published and picked up. Under Shared memory the join is a wait in the execution, and says nothing about the data. This write-write race is the textbook "benign" one: both threads write the same value, so nothing ever looks wrong. However, one thread's write is lost with no notification. Under Sync-as-Share the join is a synchronisation event that causes an explicit communication of the two threads' updates to their private views. Each thread compares what the other has updated (not the values they wrote), so the two updates to x are detected as a conflict (despite both writing the same value).
Insight: A conflict can arise only at a synchronisation point, since that is where threads' updates are communicated to one another. The thread executing the synchronisation operation is the one that detects the conflict, since threads receive updates only when they ask for them. Whether two threads that write the same value should count as a conflict is our choice: we compare which locations each view updated, not the values written, so even this "benign" race is reported, while a value-sensitive check would accept it (cf, §6.2). However, neither choice affects correctly synchronised programs, which never bring two unordered writes together.
Figure 1(c): Threads are isolated in their reads. Under Shared memory this is a read-write race because the sources x and y are shared and updated. Sequential consistency for global shared-memory admits three outcomes for a and b, and real compilers and hardware admit a fourth in which each read sees the write the other thread performs after it. Under Sync-as-Share both reads happen before the synchronisation (join), so both read from their thread's private local view and get the original values for x and y. The updates to x and y are communicated at the join, but as they do not conflict in what was updated, there is no conflict and only one possible outcome.
Insight: That each thread's read returns the value in its own thread's view (a=b=0) follows from isolation alone, since a read cannot observe another thread's write until a synchronisation action communicates it. However, having the join report no conflict in this case is a design choice. We have chosen to track the locations of thread writes and not reads because an unreported read of this kind is harmless in a precise manner: it will always return a value permitted by JMM's happens-before consistency (cf., Theorem 5.7). Combined, we see that isolation removes the non-determinism of read-write races, but whether they should also be reported is a design choice.
The above examples come from how thread isolation interacts with the structure of a fork/join program. However, locks raise two different questions because they sit between threads, rather than connecting them directly: what is communicated and with whom. In Fig. 2a we see that the only answer compatible with existing programs to what to communicate is to communicate the thread's (full) view, i.e., everything it has changed. Figure 2b shows that to whom to communicate does not have a single answer, and we explore the choice of communication topologies in §3.
Figure 2(a): The synchronisation causes communication, not the ordering. Under Shared memory disciplined use of locks maintains isolation by controlling access ordering: if shared data is only touched under a lock, then only one thread works on it at a time. Here that discipline is broken because Thread 1 accesses both m and x under the lock, while Thread 2 accesses x outside of the lock. As a result, Thread 1 can lock first and read the initial m with either the initial x or Thread 2's new x. Under Sync-as-Share the lock keeps the ordering role and gains another: it is when the thread's own updates are communicated outwards (a push) and others' updates inwards (a pull). As a result, Thread 1 is guaranteed to get either both of Thread 2's updates (if Thread 2 locks first) or neither (if Thread 1 locks first).
Insight: An unlock communicates the thread's whole view, which includes writes made before the lock was taken. This is the only choice consistent with today's semantics, as the JMM guarantees that Thread 1 sees x=1 when Thread 2 locks first because the write to x happens before Thread 2's
Note: at the start of all threads x=m=0
(a) Sharing scope
| Thread 1 | Thread 2 |
|---|---|
(b) Communication structure?
| Thread 1 | Thread 2 |
|---|---|
Isolated threads, communicating at their synchronisation


? Should lock actions communicate with every thread, or only with users of the same lock?
| Shared Memory | Sync-as-Share | |
|---|---|---|
| (a) | ||
| (b) |
Fig. 2. Lock programs, how each model reads them, and what Thread 1 is left with. Threads communicate with a lock, so they reach each other indirectly: in a they take the same lock and so communicate; in b they take different locks, and in §3 we explore whether these threads still communicate.
unlock. This choice matters: Choosing to have the unlock communicate only the writes made under the lock would give Thread 1 the new m and the old x, while shared memory permits the old m and the new x, when Thread 1 locks first.
Figure 2(b): Who communicates with whom? Under Shared memory every access to m is under a lock, yet it is still a write-write race as the programmer failed to consistently use the same lock for the same data. Under Sync-as-Share the critical sections are also not ordered. However, whether the two threads' updates ever meet depends on the communication topology. If synchronisation actions communicate through a global view, the choice of lock is irrelevant and the updates meet. When the critical sections do not overlap, the second thread picks up the first thread's increment when its lock communicates their views and m is correctly incremented. When they do overlap, the second thread to unlock sees the first thread's update pushed to the global view and reports a conflict. However, if updates are only communicated between threads that operate on the same lock, the updates will not meet, and the conflict will only be detected later if something else, such as a join, brings the views together. We explore these design choices in §3, and return to this program in Figs. 3 and 4.
Insight: The topology choice does not matter for correctly synchronised programs, which will behave exactly as under the JMM (cf., Theorem 5.15). However, it does matter for programs like this one, where locking is not used correctly, and decides whether and where that incorrectness surfaces. A single global view “leaks” updates to threads that synchronise through different locks, so the schedule decides whether two of them conflict, much as it decides whether a shared-memory program exhibits a race. A view per lock follows the synchronisation the program performs, so only threads that synchronise with one another can conflict, whatever the schedule.
Sync-as-Share removes the data races from every one of these programs, by starting from per-thread isolation and extending existing ordering synchronisation to communicate explicitly. This suits managed languages such as Java, which are expected to provide the same behaviour on a range of hardware memory models, since isolation no longer depends on how any one of them orders accesses. In contrast, a low-level language deliberately exposes that ordering to the programmer. Portability is therefore an additional reason to instantiate Sync-as-Share for Java.
3 Communication Topologies
In this section we present and motivate the two communication topologies we have identified for Sync-as-Share. We start by recapitulating the terminology used in this paper. A private view is a view of memory belonging to a single thread; ordinary reads and writes operate only on that view. A synchronisation object is what two threads communicate through. In Java these are monitors, volatile fields, and threads. A synchronisation action is an operation that both orders thread execution and communicates updates between a thread's private view and the synchronisation object it names. A conflict arises when a synchronisation action brings together two views that have both updated the same location, regardless of the values written. A conflict is reported as an exception thrown in the thread that performs the synchronisation action.
The two locks in Fig. 2b gave rise to the question of communication topology: to whom does a thread push out its updates, and who can pull them in? Java's memory model orders synchronisation actions in two ways [37, §17.4.4], and each suggests a topology. Synchronisation order is a total order over all the synchronisation actions of an execution. Synchronizes-with is partial and relates an action only to actions on the same synchronisation object. For example, an unlock of a monitor is related to every subsequent lock of that monitor. Under Sync-as-Share those actions are where threads communicate, so either order can be taken as saying which threads communicate with which.
The Linear topology (cf. §3.1) comes from synchronisation order. Every action is ordered against every other, so every thread's updates reach every other thread, accumulating in a single global view. The history is a straight line. The Branching topology (cf. §3.2) comes from synchronizes-with. An action is related only to actions on the same object, so communication follows the objects the program names and each object carries a view of its own. The history branches and rejoins instead of running in a straight line.
Java builds happens-before from synchronizes-with, so communication in Branching happens exactly where Java requires it. Communication in Linear also happens when threads synchronise, but reaches wider than just the involved threads. Java permits this wider communication. In shared memory, communication already happens at every ordinary read and write, with no synchronisation at all. In Sync-as-Share it happens only at synchronisation actions.
There is a trade-off in these models. Branching better represents the synchronizes-with order, and therefore the happens-before order, but its branches must be reconciled wherever they join, and the branching history makes that check more complicated. Linear is a coarser over-approximation of synchronizes-with, and the straight-line history makes those reconciliation points simpler.
Table 2 shows the meaning of Java's synchronisation actions in the two topologies. Each of those actions either releases or acquires [37, §17.4.4]. Under Sync-as-Share a release pushes and an acquire pulls. pushes thread 's updates to the synchronisation object . In Linear, is always the global view . In Branching, can be another thread, a lock, or a volatile field. pulls all outstanding updates from , i.e., those pushed to since 's last pull from . A pull fails if it detects a conflict. atomically combines the two, and aborts before the push if the pull fails, so no conflicting view is ever pushed out. In Linear a release pulls first as well, since its push has to be checked against the global view.
Table 2. Java illustration of Linear and Branching Sync-as-Share communication.
| Sync. Action | Reinterpretation | ||
|---|---|---|---|
| Object | Action | Linear | Branching |
| thread | spawn t' | ||
| join t' | |||
| lock | lock l | ||
| unlock l | |||
| volatile | read v | ||
| write v | |||
| Sync. Action | Reinterpretation | |
|---|---|---|
| Linear | Branching | |
| start | — | |
| end | — | |
pulls updates from , checking for conflicts.
pushes updates to .
atomically pulls from and, if conflict-free, pushes to .
The right table shows the meaning of the synthetic synchronisation actions start and end which constitute the first and last action of a thread, respectively. In the Linear model, a thread fetches all updates from the global view at its start, and, at its end, pulls in all outstanding updates, reconciles them and then pushes back a merged view of its state to (or aborts if the pull detected a conflict). In Branching, both synthetic actions are no-ops. This is because the spawn action pushes the parent thread's view to the child when the child is spawned, and because a join in Branching pulls directly from the thread instead of from . A thread that is never joined therefore communicates nothing at its end, which is what synchronizes-with gives, since no join means its final action is related to nothing. The volatile write is the one place Branching departs from synchronizes-with, since it pulls as well as pushes where the relation gives a write no incoming edge. We discuss this part of the design space in §6.3.
3.1 Linear communication
To illustrate the effect of the Linear topology, we examine the separate-lock counter example from Fig. 2b and present two executions in Fig. 3. Whether a conflict is detected depends on the ordering. In the conflicting execution (left): Thread 1 starts and locks , pulling from , sees the initial value of the counter, and increments its private view of the counter. Thread 2 starts and locks , pulling from and also sees the initial value of the counter, before incrementing its private view. Thread 1 then unlocks , pulling from (finding no updates) and pushing its updated value of the counter () to . When Thread 2 unlocks , it pulls from and discovers the update from Thread 1, but as it has already updated its own private view of in the meantime, this constitutes a conflict and an exception is raised. In the non-conflicting execution (right): both threads start as before, each pulling the initial value of the counter from into their private views. Thread 1 locks , increments its private view, and unlocks , pushing its update to . Thread 2 then locks , pulling from , which now incorporates Thread 1's update. Thread 2 then increments its private view and unlocks , pushing its updates to . The execution is non-conflicting as Thread 2's final push does not see a conflict because it had earlier pulled Thread 1's updates from .
The non-conflicting nature of the second execution is the result of information leakage: the synchronisation actions on and are unrelated, yet the updates to are communicated between the threads through the global that Linear uses. The issue of leakage further motivates the more directed communication topology of the Branching topology.
3.2 Branching communication
In Branching, the synchronisation actions on and communicate through separate synchronisation objects, so they do not leak information about updates to between the threads and no conflict can be observed. This can be seen in Fig. 4 left, which shows the same interleaving that caused a conflict under Linear, but here the pushes are to two separate synchronisation objects ( and ) instead of a shared global one (). The JMM requires only this much communication for this example, but it permits more, since a read is allowed to return the value of an unordered write from another thread. In Branching the read can only return the value in the reading thread's own view, which is one of the options the JMM allows (Theorem 5.7).
If Thread 1 joins Thread 2, Thread 1 will pull in updates from Thread 2. This means the conflict will necessarily surface since the two threads' views each contain separate updates to . Figure 4 right shows how a join in Thread 1 forces a synchronisation between two threads' views, leading to a conflict detection. Indeed, no schedule can establish a coherent order for them before the join detects a conflict, which is the benefit of the reduced information leakage of Branching over Linear.
Information transfer through synchronisation. Branching prevents updates from reaching a thread through synchronisation objects it never explicitly names, but the communication itself is unscoped: a synchronisation action carries all updates a thread has accumulated. The consequence of this is visible in nested locking, as the inner locks will communicate all updates from the thread's private view, including those done under the outer lock. For example, if a thread locks , writes , locks , writes , and unlocks , then receives a view containing both and , not just . A later

(a) A conflicting execution.

(b) A non-conflicting execution.
Fig. 3. Executions of the separate-lock counter under Linear Sync-as-Share communication. The central lane is the shared synchronisation object; and are the private views of the counter in and .

(a) The separate-lock counter under Branching Sync-as-Share communication. The lock actions communicate through separate synchronisation objects and so do not conflict.

(b) Adding a join to the previous execution causes a conflict. The join attempts to combine the two updates, which were communicated through separate synchronisation objects and so cannot be ordered.
Fig. 4. Executions of the separate-lock counter under Branching Sync-as-Share communication.
thread acquiring therefore sees not just but also , which was written before was even locked. This behavior is important to satisfy the release-acquire guarantee that correctly synchronised Java programs already rely on. Sync-as-Share produces this naturally because synchronisation communicates a view, not a selection of writes.
4 Realizing Sync-as-Share via Version-Controlled memory
We make the two Sync-as-Share communication topologies precise by formalising their semantics in what we call version-controlled memory. In version-controlled memory, each thread maintains a diff for uncommitted writes and a commit identifier recording its position in the shared history; synchronisation actions advance or extend that position. The version information is what allows the model to detect conflicts: two views that have made incompatible independent updates cannot be coherently combined.
In Linear, all synchronisation actions share a single global version history ; in Branching, threads and synchronisation objects each track a commit in a shared commit graph. The Linear history resembles the linear revision history of Subversion or multi-version concurrency control (MVCC), while the Branching commit graph resembles the commit graph of a distributed version control system such as Git. Table 3 defines pull, push, and pull-push for both topologies.
The version-controlled memory models are parametric: they share a concurrent runtime, presented in Figs. 5a and 5b, that abstracts over three auxiliary relations – commit, push, and pull. Instantiating these as the identity relation yields a Java-inspired but deliberately simplified shared-memory semantics (§4.1). We present two reinterpretations that yield Linear (§4.3) and Branching (§4.4). Content in violet boxes is not present for shared memory, only the versioned models.
We assume a relation that steps expression to continuation , emitting effect . The effect signals a read, a write, or some synchronisation action that is consumed by the concurrent runtime. The continuation is a function that consumes a value (including a special unit value ), an exceptional value or a thread identifier and produces another expression.
A configuration in the concurrent runtime consists of a collection of threads , a heap , a collection of locks and a map of volatile variables . A thread has a lifetime state which is
Providing a “hierarchical” scoping, in which only writes under the current synchronisation object are communicated, would limit the state transfer further, but be incompatible with what the JMM requires today.
We assume a relation that steps to , emitting effect .
(a) Syntax and sequential semantics.
(b) Concurrency semantics.
Fig. 5. Syntax and semantics. Content in violet boxes is only relevant for versioned memory.
Table 3. Version-controlled realisation of pull, push, and pull-push. x's commit denotes the commit x currently points to; B-Pull and B-Push each cover a family of rules (see §4.4).
| Operation | Linear (x = g, version history) | Branching (commit graph) |
|---|---|---|
| L-Pull: if t's staged writes do not conflict with updates to g since t's last pull, advance t's commit to g's latest. | B-Pull: if merging t's commit with x's commit is conflict-free, extend the graph with a merge commit as a child of both; t advances to it. | |
| (not applicable in Linear) | B-Push: no conflict check; create a new commit from t's staged writes as a child of t's current commit; advance x's commit to it. | |
| L-PullPush: atomically, as L-Pull then append t's staged writes to g as a new commit; t and g both advance to it. | B-PullPush: atomically, as B-Pull from x's commit then B-Push to x's commit (not in the paper). |
(new), (running) or (terminated), as well as a current expression . A lock is free or is being held by some thread. initially maps all lock identifiers to free. For the branching model, a lock also stores the last commit pushed to that lock (initially a special root commit ). The heap in shared memory is different from that in versioned memory; its definitions are given in Fig. 6 and explained in their corresponding sections.
Motivation of Scoping. Our goal is backwards compatibility for race-free executions of programs (cf., Theorem 5.15). According to the JMM, a program is correctly synchronised if and only if all sequentially consistent executions are free of data races. The JMM further states that if a program has no data races, then all executions of the program will appear to be sequentially consistent [37, §17.4.5]. This motivates picking a simplified, sequentially consistent shared-memory semantics as a baseline to compare our version-controlled memory models to. For racy executions, we either intentionally break backwards compatibility by throwing an exception or source reads from writes in a manner consistent with the JMM (cf., Theorem 5.7). We also omit volatile variables from the semantics in the paper as their synchronisation actions are already represented through thread and lock operations (cf., Table 2). Volatile variables are included in the mechanised semantics (cf., §5.3).
We model conflicting executions as getting stuck. This keeps the rules concise: a rule guarded by conflict-freedom would otherwise require a complementary conflict case. We discuss an alternative presentation in §4.5 which models synchronisation conflicts as explicit exceptions. Importantly, our results transfer to such a presentation as well (this has been verified in Rocq).
4.1 Shared Memory Concurrency Semantics
Fig. 5b, when ignoring the violet boxes, shows the semantics for a concurrent runtime with non-versioned memory. The step relation non-deterministically selects a thread and applies one rule. We write for updated at with state . The commit, push and pull relations are all interpreted as the identity relation, meaning for example that and for .
Fig. 6a defines the shared-memory heap in the as a map from variables to values with intuitive definitions of reading and writing. The initial heap is empty. Reading a variable before it has been initialised is an error, but an underlying semantics with variable scoping could prevent it.
Rules START and END are internal lifecycle rules: START transitions a spawned thread from new to running, and END transitions a normally completed running thread to terminated. We write to update only the field of to . The names START and END denote runtime lifecycle steps, thread creation is represented by SPAWN, and observing completion is represented
(a) Heap semantics in shared memory.
(b) Heap semantics in versioned memory.
Fig. 6. Heap semantics and related helper functions.
by JOIN. Rules READ and WRITE read and write values from and to the heap. Note how the abstract sequential semantics emits a read (or write) effect and a continuation K. The continuation is “filled in” with the value v from the heap (or for writing) and the resulting expression is reinstated as the expression of the thread.
The SPAWN rule creates a new thread with a fresh thread identifier . The new thread starts out with the thread state (so that rule START can start it later). The JOIN rule lets a thread join some terminated thread. The continuation K of the joining thread is passed the result value r from the terminated thread. Rules LOCK and UNLOCK respectively acquire and release a lock.
4.2 Version-Controlled Heap Semantics
In versioned memory, the heap is a graph of commits where each commit is mapped to a diff. Fig. 6b shows the definition of this graph and the related helper functions. Given a commit graph , we define an ancestor relation for when a commit is the direct ancestor of another (we use for the reflexive and transitive closure). The initial graph contains a single root commit with an empty diff (again, reading an uninitialised variable is an error).
Each thread has a local staging area with writes that have not yet been committed to memory, and a commit which is the latest commit that thread has observed. All writes of a thread go to its staging area, which is later committed to the heap during synchronisation. When a thread reads a value, it checks its own staging area first and then finds the latest value in the heap according to the latest commit the thread has observed. The function , used in the read helper, is defined as the maximal element of a set of commits with respect to . While this partial order allows multiple maximal elements – this would be the result of an execution with conflicting writes – both version-controlled models guarantee that, unless a conflict is detected, the set of latest values is never larger than one element (cf, Lemma 5.10).
In order to detect conflicts in the commit graph, we define the change set as the set of variables modified in the history of but not visible in the history of :
Definition 4.1 (Change set).
What sets the two version-controlled models apart is the shape of the commit graphs, their implementation of synchronisation actions, and when they check for conflict.
4.3 Linear Memory Concurrency Semantics
In the linear model, the commit graph is linear, with the latest commit always being the last commit made by any thread. Whenever a thread synchronises with the heap, the concurrent runtime checks the staging area for conflicts (we write for the maximal commit in H).
Definition 4.2 (Conflict-free commit). Conflict-Free( )
On thread initialisation, starting threads get the maximal heap commit init .
A thread can pull in the updates from the heap by checking its staging area for conflicts and fast-forwarding its own commit to the current global maximum (the synchronisation object is irrelevant in Linear and is ignored).
When a thread commits its staged updates it moves its staging area to the heap as a fresh commit with the current global maximal commit as its ancestor.
When a thread synchronises with another thread or lock it commits its staged updates (ignoring the synchronisation object ).
With these auxiliary relations in place, the rules in Fig. 5b define how threads synchronise across different actions. The START rule starts a thread and sets its commit to the current maximum. The END rule terminates a thread and also commits its updates. The SPAWN rule commits the updates of the spawning thread via L-PULLPUSH and spawns a new thread that starts with an empty staging area and a dummy commit. The dummy commit will be updated by the START rule, and no other rule can observe a thread with the thread state N, so this is safe. The JOIN rule uses L-PULL to pull from the heap, which contains all updates of the joined thread due to END. The two LOCK rules pull the latest commit via L-PULL and the UNLOCK rule commits via L-PULLPUSH.
4.4 Branching Memory Concurrency Semantics
In the branching model the commit graph is a DAG. Committing in the branching model commits the staging area of a thread as a child of the thread's current commit and updates it. It does not perform a conflict check because the updates are not yet visible to other threads.
In the branching model, both threads and locks have a current commit. We define two actions for committing a thread's staged updates to the commit graph and communicating this commit to another thread or lock.
Similarly, a thread can pull from another thread or from a lock. In both cases, the runtime checks for conflicts before creating a merge commit. We define the condition under which a thread with staging area and commit can merge with another commit without conflicts:
Definition 4.3 (Conflict-free merge of two commits).
This requires that the updates introduced by do not conflict with the thread's current commit , nor with the uncommitted writes in its staging area . We define an auxiliary merge operation that checks for conflicts and creates a merge commit.
The pull operation merges with a specified external commit. Unlike Linear, which implicitly refers to the global history, pulling in Branching requires an explicit target.
Pulling leaves staged updates uncommitted, mirroring the pull action in the linear model.
When starting, a thread keeps the commit given to it by its spawning thread: init .
The synchronisation in Fig. 5b is the same as for the linear model; the differences are in the definitions of the synchronisation actions. The SPAWN rule pushes the thread's staged updates to the commit graph and spawns a new thread. The new thread is spawned with the same commit as the parent thread (via B-PUSH-THREAD), so it inherits the parent's private view. This reflects a branching point in the version history, where the new thread can diverge from the parent thread's view and make independent updates. The JOIN rule pulls the last commit from the joined thread into the joining thread before retrieving the result of the joined thread. This is a merge point between two divergent branches in the commit graph, where the joining thread synchronises with the updates made by the joined thread. The LOCK rules atomically pulls the latest commit from the lock's commit into the locking thread and acquires the lock. This ensures that the locking thread synchronises with any updates that have been pushed to the lock before acquiring it. The UNLOCK rule pushes the unlocking thread's staged updates to the commit graph and releases the lock. The
| Code | Action | Commit graph |
|---|---|---|
| — | — | initial: |
| synchronized (11) {} | lock | creates , child of and ; advances to |
| ; | write | stages |
| synchronized (12) {} | lock | creates , child of and ; advances to |
| ; | write | stages |
| {} | unlock | commits with ; advances to |
| ; | write | stages |
| {} | unlock | commits with ; advances to |
Fig. 7. Version-controlled representation of nested locking in Branching. A single thread acquires two locks, and ; each lock receives the thread's current commit, including writes performed before that lock was acquired.
rule updates the lock's commit to the unlocking thread's new commit, so updates made while holding the lock are available to the next acquirer.
A Worked Example. To build intuition for the branching semantics, we revisit the nested-locking example from the end of §3. Fig. 7 shows the program code and the corresponding updates to the commit graph. Acquiring lock pulls from by creating a merge commit from 's current commit and 's current commit, and advances to that merge commit. The write to is added to 's staging area. Acquiring proceeds analogously, creating a merge commit from 's current commit and 's current commit. The write to is also added to 's staging area. Unlocking commits 's staged writes, , as a child of 's current commit and advances to that new commit. After the write to , unlocking commits the staged write as a descendant of the commit published to , and advances to it. This is precisely the release-acquire guarantee: a thread acquiring sees all writes committed during the unlock of , including the written before was even locked. Information transfer through synchronisation is naturally realised in version-controlled memory: when a thread pushes to a lock, it publishes the thread's current commit, including writes performed before that lock was acquired.
The commit graph preserves per-synchronisation-object history without discarding the thread-local program-order history. The same reasoning extends to hand-over-hand locking: successive unlocks advance the corresponding locks to the commits current at those releases.
4.5 Detecting and Reporting Conflicts
We model conflicting executions as getting stuck. An alternative presentation could include failing variants of every conflict-checking rule that provides an exceptional value to the continuation . This would be closer to a user-facing implementation of version-controlled memory. For example, the rule for a conflicting join in the branching semantics could be written as follows:
Our proof of backwards-compatibility transfer to such a presentation as we only care about race-free executions, where a merge will never fail (cf., Lemma 5.12). Whether the failing thread should terminate and lose its staged updates or recover from a detected conflict (catching the exception) is an open question that we leave for future work.
Fig. 8. Syntax of events and definition of happens-before relation on logs.
5 Metatheory
In this section we discuss the metatheoretical properties of the formalism in §4. Our main result is that for race-free executions both version-controlled memory models are equivalent to the shared-memory model (Theorem 5.15). We also show that threads that read initialised variables always read values permitted by the JMM, even in the presence of races (Theorem 5.7). To formulate these properties, we first define a variant of each of the three semantics that emits a log of events in the order they happened (§5.1). We then define what it means for a log to be race free and show that all three semantics coincide for executions that produce a race-free log (§5.2). All definitions and proofs have been mechanised in Rocq [1], including volatile variables, which are omitted from the paper presentation (§5.3).
5.1 Event Logs and Logging Semantics
To reason about whether a data race has occurred, it is not enough to look for two threads about to access the same memory. Any number of operations could have happened between two racing accesses. Instead, the semantics produces a log of events, which we inspect to decide whether an unsynchronised access has occurred. Fig. 8 shows the syntax of logs. There is one event per rule in the semantics, and each event contains the thread that caused the event.
We omit the well-formedness relation for logs, written log wf. It requires unique spawn and start events; threads that start only after spawning and have no events before their start or after their end; joins only after the joined thread has ended; and locks acquired and released in order by the same thread. To avoid the chicken-and-egg problem of requiring every thread to be spawned before it starts, we require a non-empty log to begin with the start event of a special root thread , which was never spawned. See the mechanisation for details ( ).
Fig. 8 also shows a happens-before relation on events in a log, defining when two events are definitely ordered. Because the same event can occur multiple times in a log, it is based on the indices of the events. should be read as “in log, the event at index m happens before the event at index n” Rule HB-PO orders two events performed by the same thread by program order. Rule HB-Lock orders each unlock event before subsequent lock events of the same lock. Rules
HB-SPAWN and HB-JOIN orders the spawn event of a thread before its start event, and the end of a thread before subsequent join events. Rule HB-TRANS makes the happens-before relation transitive.
For each relation we define the relation that is equivalent but additionally emits the corresponding event to its log. Proving this equivalence is straightforward.
THEOREM 5.1 (EQUIVALENCE OF LOGGING SEMANTICS). The logging semantics is equivalent to the non-logging semantics (for all three models)
All three models have a relation that defines when a log correctly describes a configuration. We omit the formal definition of the shared parts here: threads with a spawn event have spawned, spawned threads without a start event have the new lifetime state , threads with an end event have terminated (have lifetime state ), threads that have a start event but no end event are running (have lifetime state ), locks whose latest event was a lock are locked, and locks without events or whose latest event was an unlock are free.
For the logging shared-memory semantics, also requires that the heap maps every variable to the value given by the last write event touching that variable.
Definition 5.2 (The log describes the shared-memory heap).
The two versioned semantics need more structure, since every thread should either see its own latest value or the latest global value seen from the thread's commit. To capture this, for the two versioned semantics includes the requirement that replaying the log reproduces a view that is consistent with . (We focus on the branching model here; the definitions for the linear model are similar.)
A view is a tuple where maps thread identifiers to their uncommitted staging areas, maps thread identifiers to their commits, maps locks to their commits, and is the commit graph from §4.2. Fig. 9 shows the replay relation for single events, written as . Each rule of the replay relation mirrors a rule in Fig. 5b, capturing the changes to staging areas and commits. To exemplify the rules in Fig. 9 we describe four rules here. Rules PLAY-START and PLAY-READ do not update any commit information. Rule PLAY-END commits the staged updates of a terminating thread as a fresh child commit of 's current commit and updates the staging area and commit of in and . Rule PLAY-WRITE updates the staging area of so that it also includes the updated variable. Rules PLAY-SNOC and PLAY-NIL lift the other replay rules to a log, , additionally recording the commit of each event in the log in (this is used for bookkeeping commit ancestry in the proofs). For example, when the event end is replayed, will be extended with the fresh commit given to the terminating thread.
The relation requires that replaying the log from an initial view produces a view that is consistent with the configuration: in addition to producing the same graph, each thread holds a staging area and commit that agrees with and , and each lock holds a commit that agrees with . The initial view maps the root thread to an empty staging area, the root thread and all locks to the root commit , and contains the initial commit graph .
\begin{aligned}\Delta\in TID\rightarrow(Var\rightarrow Val)\quad&TC\in TID\rightarrow CommitID\quad LC\in Lock\rightarrow CommitID\\CH::=CH,c\mid\epsilon&\quad view::=\langle\Delta,TC,LC,H\rangle\\\frac{t start/\langle\Delta;TC;LC;H\rangle\triangleright\langle\Delta;TC;LC;H\rangle}{&}PLAY-START\\\frac{c^{\prime}\notin dom(H)}{H^{\prime}=H[c^{\prime}\mapsto\Delta(t)][TC(t)\leftarrow c^{\prime}]}&PLAY-END\\t end/\langle\Delta;TC;LC;H\rangle\triangleright\langle\Delta[t\mapsto\emptyset];TC[t\mapsto c^{\prime}];LC;H^{\prime}\rangle\\\frac{t read x v/\langle\Delta;TC;LC;H\rangle\triangleright\langle\Delta;TC;LC;H\rangle}{&}PLAY-READ\\\frac{\Delta^{\prime}=\Delta[t\mapsto\Delta(t)[x\mapsto v]]}{t write x v/\langle\Delta;TC;LC;H\rangle\triangleright\langle\Delta^{\prime};TC;LC;H\rangle}&PLAY-WRITE\\\frac{c^{\prime}\notin dom(C)}{\Delta^{\prime}=\Delta[t_{1}\mapsto\emptyset][t_{2}\mapsto\emptyset]}\\TC^{\prime}=TC[t_{1}\mapsto c^{\prime}][t_{2}\mapsto c^{\prime}]\\\frac{H^{\prime}=H[c^{\prime}\mapsto\Delta(t_{1})][TC(t)\leftarrow c^{\prime}]}{t_{1}spawn t_{2}/\langle\Delta;TC;LC;H\rangle\triangleright\langle\Delta^{\prime};TC^{\prime};LC;H^{\prime}\rangle}&PLAY-SPAWN\\\frac{c^{\prime}\notin dom(H)}{H^{\prime}=H[c^{\prime}\mapsto\emptyset][TC(t_{1})\leftarrow c^{\prime}][TC(t_{2})\leftarrow c^{\prime}]}&PLAY-JOIN\\t_{1}join t_{2}/\langle\Delta;TC;LC;H\rangle\triangleright\langle\Delta;TC[t_{1}\mapsto c^{\prime}];LC;H^{\prime}\rangle\\\frac{l\notin dom(LC)}{t lock\ell/\langle\Delta;TC;LC;H\rangle\triangleright\langle\Delta;TC;LC[l\mapsto TC(l)];H\rangle}&PLAY-LOCKFRESH\\\frac{l\in dom(LC)}{H^{\prime}=H[c^{\prime}\mapsto\emptyset][TC(t)\leftarrow c^{\prime}][LC(\ell)\leftarrow c^{\prime}]}&PLAY-LOCK\\t lock\ell/\langle\Delta;TC;LC;H\rangle\triangleright\langle\Delta;TC;LC[l\mapsto c^{\prime}];H^{\prime}\rangle\\\frac{c^{\prime}\notin dom(C)}{H^{\prime}=H[c^{\prime}\mapsto\Delta(t)][TC(c)\leftarrow c^{\prime}]}&PLAY-UNLOCK\\t unlock\ell/\langle\Delta;TC;LC;H\rangle\triangleright\langle\Delta[t\mapsto\emptyset];TC[t\mapsto c^{\prime}];LC[\ell\mapsto c^{\prime}];H^{\prime}\rangle\\\frac{log/\langle\Delta;TC;LC;H\rangle\triangleright CH/\langle\Delta^{\prime};TC^{\prime};LC^{\prime};H^{\prime}\rangle}{E/\langle\Delta^{\prime};TC^{\prime};LC^{\prime};H^{\prime}\rangle\triangleright\langle\Delta^{\prime\prime};TC^{\prime\prime};LC^{\prime\prime};H^{\prime\prime}\rangle}&PLAY-SNOC\\\frac{log,E/\langle\Delta;TC;LC;H\rangle\triangleright CH,TC^{\prime\prime}(E.t)/\langle\Delta^{\prime\prime};TC^{\prime\prime};LC^{\prime\prime};H^{\prime\prime}\rangle}{\epsilon/\langle\Delta;TC;LC;H\rangle\triangleright\epsilon/\langle\Delta;TC;LC;H\rangle}&PLAY-NIL\end{aligned}Fig. 9. Rules for replaying a log for the branching semantics (linear is similar).
Definition 5.3 (Replaying the log creates a consistent view).
For all three logging semantics, we prove that the dynamic semantics produce well-formed logs describing the resulting configurations.
THEOREM 5.4 (WELL-FORMEDNESS OF INITIAL CONFIGURATION). The initial configuration, containing an arbitrary expression e, is described by the empty log (for all three models)
THEOREM 5.5 (PRESERVATION OF LOGGING SEMANTICS). The logging semantics preserves well-formed logs that describe configurations (for all three models)
Before turning to race-free executions, note that our versioned semantics is also backwards compatible in the presence of conflicts that have not yet caused an exception. The JMM requires that the result of a read is sourced from a write such that does not happen-before and such that there is no write such that happens-before and happens-before [37, §17.4.5]. We define this property for logs and prove that it is preserved by our two versioned semantics, even in the presence of races.
Definition 5.6 (Happens-before consistency).
THEOREM 5.7 (PRESERVATION OF HAPPENS-BEFORE CONSISTENCY). If a well-formed and happens-before consistent log describes a configuration and that configuration can take a step, then the resulting log is also happens-before consistent.
5.2 Race-Free Executions
A log describing the history of a program, together with a definition of when events are ordered (Fig. 8), lets us define what it means for an execution to be race free.
Definition 5.8 (Race-free log). A log is race-free, written log rf, if for every pair of a write event and a read or write event of the same variable the first event happens before the second.
A race-free log describes a race-free execution, where reads and writes to the same variable are ordered by happens-before. This excludes, for example, the execution in Fig. 3a where the two writes in the different threads are unordered (so is the write by thread 1 and the read by thread 2).
Replaying a race-free log in the versioned semantics produces configurations with several important properties. First, the value of a variable in versioned memory is the same as the last write to that variable.
LEMMA 5.9 (LAST VERSIONED VALUE IS LAST WRITE IN RACE-FREE EXECUTIONS). When replaying a well-formed, race-free log that ends with thread reading from variable , looking up the latest value of gives the same value as the last write to that variable.
The lemma contains two cases, based on whether the read goes via the local staging area or the commit graph . Having the read event in the log is essential to guarantee that the write to x happens before the read. Note that the right-hand side of the equivalence in the conclusion of this lemma matches the right-hand side of the equivalence in Definition 5.2. This lets us relate the versioned-memory heap to the shared-memory heap.
A related lemma states that reads are deterministic for race-free executions.
LEMMA 5.10 (DETERMINISTIC READS IN RACE-FREE EXECUTIONS). When replaying a well-formed, race-free log, looking up the latest value of a variable always gives the same value.
Furthermore, committing (in the linear model) and merging (in the branching model) always succeeds in a race-free execution.
LEMMA 5.11 (COMMITTING IN THE LINEAR MODEL FOR RACE-FREE EXECUTIONS). When replaying a well-formed, race-free log, any thread can commit its staging area as the new global maximum commit without conflict.
LEMMA 5.12 (MERGING IN THE BRANCHING MODEL FOR RACE-FREE EXECUTIONS). When replaying a well-formed, race-free log, any thread can merge its staging area with any commit in the commit graph without conflict.
The contrapositives of these two lemmas are also informative: if a conflict check fails, there must have been an actual data race. We show this here for joining a thread.
COROLLARY 5.13 (SOUNDNESS OF CONFLICT DETECTION FOR JOINS). If trying to join a terminated thread fails due to a reported conflict, there was an actual data race.
Similar lemmas can be stated about all rules that contain a conflict check.
Our main theorem, which is identical for both the linear and branching semantics, states that for race-free executions the versioned semantics is equivalent to the shared-memory semantics.
Definition 5.14 (Same expressions).
THEOREM 5.15 (EQUIVALENCE OF VERSIONED AND SHARED MEMORY UNDER RACE-FREE EXECUTION). For a well-formed log that describes both a shared-memory configuration and a versioned configuration , and where each thread in the two configurations have the same expressions, the shared-memory semantics can take a step producing a race-free log if and only if the versioned semantics can take a step producing the same log.
The most interesting case of the theorem is reading a variable, where we use Lemma 5.9 to ensure that the same value is read. For the completeness direction we use Lemma 5.11 and Lemma 5.12 to ensure that the versioned semantics do not get stuck on a conflict. Omitted here is the trivial preservation of same-exprs in both directions of the equivalence. Together with the preservation of well-formed describing logs (Theorem 5.5), this extends Theorem 5.15 to full executions.
Theorem 5.15 shows that for race-free executions, programs have exactly the same semantics under version-controlled memory as under sequentially consistent shared memory. This ensures backwards compatibility with the JMM for race-free executions. For a racy execution we either intentionally break backwards compatibility by throwing an exception, or we present a behaviour allowed by the JMM (cf., Theorem 5.7).
5.3 Mechanisation, Including Volatile Variables
We have mechanised our formal development in Rocq [1], using Arthur Charguéraud's TLC library [16] with parts of the proofs written using an LLM. LLM support was especially helpful for exploring variations of the semantics, such as the different semantics for volatile variables discussed in §6.3. The code base weighs in at a total of ≈16 500 lines, with ≈2700 lines of definitions and ≈13 800 lines of proofs and theorem statements. The Linear and Branching mechanisations contribute differently: Linear accounts for ≈700 lines of definitions and ≈4800 lines of proofs, while Branching requires ≈1000 lines of definitions and ≈6500 lines of proofs, reflecting the higher complexity of its conflict-checking mechanism; the remainder covers the shared memory semantics and definitions shared between semantics. The presentation in §4 defines all three semantics using a single rule set, whereas the mechanisation defines them separately, duplicating overlapping parts and proofs. The read, init, and write functions are replaced by their definitions, splitting the READ rule into a local and a global version for the two versioned semantics. Lemma 5.9 is likewise split into separate lemmas for local and global reads.
The mechanised semantics also support volatile variables, following the interpretations listed in Table 2 and realised in Table 3. The semantics are parameterised over a set of volatile variables, and volatile variables are stored in H alongside regular variables. The branching semantics additionally maintain a map V of the latest commit of each volatile variable, which is updated on write. Since the shared semantics is already sequentially consistent, it needs no changes. The two versioned semantics get an extra premise requiring non-volatility in rules READ and WRITE, and get two additional rules READVOLATILE (which pulls before reading) and WRITEVOLATILE (which pulls and pushes). In both semantics, these rules can fail on conflict. Note also that volatile variables are pushed on write, so they are never in a staging area of any thread.
The mechanised semantics is otherwise the same as the paper, modulo technical details: the push, pull, commit, and merge operations of the branching model are functions rather than relations, with the conflict-freedom requirement lifted to the rules that use them; in the linear model commit is likewise a function and the pull is inlined into the rules; the global case of the read function is a relation; and finiteness of maps and sets are threaded through the proofs where needed.
The mechanisation also has a proof of progress for the three semantics, assuming progress for the underlying sequential language. The progress theorems show that the semantics can get stuck only through a deadlock caused by locks or joins, a failing conflict check, a read of an uninitialised variable, or an attempt to release a lock the thread does not hold. We consider the two last operations benign since an underlying language could prevent them.
6 Design Choices
In this section we discuss some of the design choices inherent to Sync-as-Share.
6.1 When are Conflicts Detected?
The model we have presented detects a write-write conflict at the point where incompatible unordered writes are brought together. An alternative is to delay this detection until the first read of the “conflicted” value. Programs whose racy writes are never observed would then continue. Furthermore, if a write to a conflicted location occurs before any read witnesses the conflict, we could allow it to proceed without triggering an error. This may be a poor choice for testing, but a useful stance for running in production. This requires tracking conflicted locations in views and defining when later reads force the conflict. It is important to note that the ability to choose when conflicts are detected is a direct result of Sync-as-Share using isolated views and explicit communication: in traditional shared memory these updates happen with no visibility.
6.2 What Constitutes a Conflict?
Sync-as-Share gives us the further ability to explore the design space of what constitutes a conflict. In this paper, we have chosen a relatively conservative approach where conflict checking is made between two writes and is value-agnostic. In Linear, a thread can push a staged write only if it has seen all later versions of every location it modified. In Branching, merging two unordered branches rejects any location changed in both. Both definitions ignore the values being written, so two unordered writes of the same value to the same location are treated as incompatible when a later synchronisation action brings the views together.
A more conservative approach would consider the values read by a thread when determining conflicts: when thread's views are brought together, conflicts would be detected based on both the values read and written. This would be closer to the read log that is constructed in transactional memory systems, where conflicts are detected based on the values read and written by transactions. More programs would be considered conflicting under this stricter definition, potentially highlighting programmer errors. However, in contrast to write-write conflicts where there are multiple possible values that can be written concurrently, the read value of an isolated thread can only be the last value it observed. There is no “race” in the traditional sense, since a thread's view changes only at its synchronisation actions. Maintaining a read log for each thread also increases the complexity of the conflict detection mechanism.
We can also relax the conflict definition. Some deployed Java idioms are intentionally racy but expected to produce correct results. A standard example is java.lang.String.hashCode(), which lazily computes the hash on first call and caches it in a private field. Synchronisation is intentionally omitted from this operation because the hash is derived from immutable state and integer writes are atomic. All callers compute the same value regardless of ordering, and the field reads and writes cannot be observed to be incoherent.
To address such patterns, a value-sensitive conflict check would let unordered writes to the same location pass when their values are equivalent. Primitive values are straightforward, objects can either be compared by equality or through a programmer-defined notion of equivalence. Reference equality admits only writes of the same object, while an object's own equals() method lets the programmer say which distinct objects count as interchangeable.
Checking by equivalence rather than equality would exclude such “benign” conflicts. The cost is additional non-determinism in whether an execution conflicts, a more complex conflict check, and user code running as part of conflict detection. Checking by equivalence associates a policy with a type, but an annotation could associate one with a field (volatile is already such an annotation).
6.3 What are the Semantics of Java Volatile Fields?
The JMM establishes requirements for Sync-as-Share's backwards compatible interpretation of Java's volatile semantics: A volatile write synchronises-with subsequent reads of that field, but not with other writes to it [37, §17.4.4]; Two writes to the same variable unordered by happens-before are therefore a data race [37, §17.4.5], even when that variable is volatile; And, every volatile write that precedes a read in synchronisation order synchronises with that read, not only the write whose value the read sees [37, §17.4.4]. These guarantees are specific to Java. In C++ release-acquire semantics, for example, an acquire synchronises only with the release that it takes its value from [6], so a design instantiated in C++ could target a weaker constraint.
When reinterpreting volatile reads and writes as communication operations, we have a choice in how to realise the guarantees they provide. Analogous to monitors, a thread writing to a volatile field pushes its updates into the field's view, where later readers pull them in. The question is whether the writing thread pulls that view in as well. If the thread pulls, the write to the volatile field brings the two views together and detects any conflict there. If the thread only pushes, the views will be brought together in the field's view and next read of the volatile field will be where conflicts are detected. Figs. 10a and 10b show the effects of this choice.
Even though the JMM considers unordered volatile writes racy, whether or not to report them as a conflict is a design choice for Sync-as-Share. One option is to relax the conflict semantics for the volatile field whose access brings two views together, along the lines of the equivalence policies in §6.2. We could relax it further and resolve unordered writes to the field with a last-writer-wins policy. The volatile annotation would then gain a further role, marking the fields where unordered writes resolve rather than conflict. Figures 10c and 10d show this, where Thread 2's x = 2 overwrites Thread 1's x = 1 because x is excluded from conflict checking. Note that the full views are still communicated. In Fig. 10c Thread 2 sees the non-volatile y's value due to its write to x. Had there been other conflicts in the views, an exception would still be raised. Only the written x is exempt.
To keep things simple for this paper, we adopt the most conservative approach for volatile fields: Threads pull and push on volatile writes, and volatile fields are included in conflict checking. This corresponds to Fig. 10a. A correctly synchronised program behaves the same under all four designs (mechanically verified in Rocq). The designs give different outcomes only for programs that are incorrectly synchronised. We will be able to relax this as we learn more about programming styles, the complexity of conflict checking, and the constraints imposed by the memory model.
6.4 Performance Costs and Opportunities
Sync-as-Share will incur runtime costs in both memory and performance. Conflict checking, maintaining private views, tracking version histories, and communicating between views at synchronisation points all carry a price, and we have not measured it. However, Sync-as-Share can remove existing costs as well. For example, JVMs today guard object construction with fences, so that racing reads cannot observe partially initialised objects. And compiler optimisations, program transformations, and garbage collection must reason about what other threads can observe, which
Shared state
static volatile int x;
static int y;
Thread 1
y = 1;
x = 1;
Thread 2
x = 2;
print(y);
print(x);
volatile writes pull
volatile writes do not pull

Fig. 10. One program under the different design choices for volatile fields.
forces conservative choices and more expensive analyses. Under Sync-as-Share a thread sees another's writes only when a synchronisation action communicates them, so today's construction fence would have nothing to guard against. And as thread execution operates on a private view, a thread's code between synchronisation points is sequential, which simplifies many of these optimisations and enables others. Evaluating these benefits and reducing what Sync-as-Share pays for its safety is the main direction for future work.
7 Related Work
Memory models and DRF guarantees. The memory models of Java and C/C++ define concurrency through access-level executions, synchronisation order, visibility, and data-race freedom [6, 11, 37]. Earlier Java work showed the difficulty: the original model admitted behaviours that were too weak for programmers and too awkward for compiler writers, leading to the revised JMM and its causality test cases [43, 44]. Research continues to test the implementations that aim to realise the JMM [42]. Hardware and language memory-model work has refined this access-based style by specifying consistency guarantees, compiler transformations, and out-of-thin-air restrictions [2, 28, 47, 51]. Sync-as-Share preserves the behaviours of programs that are correctly synchronised under the JMM but changes the treatment of incorrect synchronisation. A conflict throws an exception, and the JMM has no such behaviour. An axiomatic presentation of Sync-as-Share would let us compare the two models directly, and determine whether the JMM already allows everything else Sync-as-Share does.
Race-exception semantics. Goldilocks throws a DataRaceException from within a Java runtime, backed by precise lockset-based detection [21]. DRFx and Conflict Exceptions instead raise exceptions on conflicts between concurrently executing regions delimited by synchronisation operations, using hardware support, and Valor achieves the same region-conflict guarantee in software [8, 36, 39]. Like Sync-as-Share, DRFx detects dynamically and delimits its regions at synchronisation actions. DRFx compares the individual accesses of two regions and faults when the regions overlap in time, so which pair of conflicting writes it reports depends on the schedule and on how much parallelism the machine provides. Under Sync-as-Share a conflict arises where two private updates to the same variable meet at a synchronisation action, which the program's synchronisation structure determines rather than the configuration it runs on. DRFx monitors a shared-memory execution and guarantees that every execution either faults or is sequentially consistent. Sync-as-Share changes what the execution is, and Theorem 5.15 guarantees that conflict-free executions coincide with shared-memory behaviour.
Dynamic race detection. Dynamic race detectors report executions with conflicting accesses that are unordered by a chosen race relation, in the lockset style established by Eraser [46] or the happens-before style of FastTrack [23], with sampling and JVM-integrated systems such as MaTSa reducing overhead further [3, 38]. Predictive detectors and model checkers instead search for races the observed schedule did not exhibit, through weak-causally-precedes and later prediction techniques, Java PathFinder, and optimal dynamic partial-order reduction [24, 29, 30, 45, 49]. These tools report a race, but once a program is incorrectly synchronised the JMM no longer requires its behaviours to be sequentially consistent, so compiler, JIT, and hardware transformations may expose stale values, reordered effects, or cached reads [37]. The programmer may therefore still need to reconstruct the failure through the same low-level semantics that made the bug difficult to understand. Under Sync-as-Share the program's synchronisation determines the outcome, leaving a thread isolated with its own values or raising a conflict where incompatible views meet.
Concurrent revisions and isolated workspaces. Concurrent revisions give forked tasks isolated snapshots and merge them at joins, with isolation types controlling deterministic conflict resolution [14], and deterministic threading and workspace-consistency systems similarly use isolated workspaces and controlled commit points [5, 34]. Revisions communicate at fork and join, where Sync-as-Share communicates at every synchronisation action a Java program already performs, including monitor operations and volatile accesses, with ordinary accesses staying private in between. Restricting communication to fork and join earns revisions their determinism, and Sync-as-Share gives that up, with conflicts detected and an exception thrown, value-agnostically, rather than merged and resolved through declared isolation types. We discussed alternatives which allow for different resolutions in §6.2. Distributed version-control systems and libraries such as Irmin expose clone, merge, and conflict-resolution operations over persistent data [22], where our use of version control is semantic.
Transactional memory. Transactional memory makes blocks of code appear atomic by detecting conflicts in read/write sets and using abort, retry, or rollback to find a serialisable execution [26, 48], and snapshot isolation and STM algorithms such as TL2 and NOrec maintain version information to validate reads and writes [7, 19, 20]. Snapshot isolation over the whole heap would be a means to achieve Linear, with each synchronisation action opening a transaction, the next action closing it, and a write-write conflict throwing instead of aborting. Branching has no such encoding, since snapshot isolation commits to a single version history where a synchronisation action communicates through the synchronisation object it names.
Commutativity and transactional meta-theories. A line of transactional work makes conflict detection less conservative by using the commutativity of abstract operations rather than read/write sets, reducing false conflicts and the rollbacks they cause [25, 31]. The push/pull model of transactions is a meta-theory of serialisability in which a transaction pushes its effects into a shared log and pulls in those of others, with side conditions resolved through commutativity [32]. Sync-as-Share shares this push/pull structure of private and shared views, but reinterprets existing code rather than transforming it, and has no atomicity, serialisability, or rollback. Sync-as-Share compares writes to the same variable, which is more conservative.
Type systems for race freedom. A language can rule out unsafe sharing statically, with regions and effects in Deterministic Parallel Java [9], ownership in Swift 6, Kappa and SafeJava [12, 13, 15], affine types in Rust [27, 40], and reference capabilities in Pony and behaviour-oriented concurrency [4, 17, 18]. Lungfish moves some of this enforcement to run time [50], and LVars achieve determinism through monotone writes and lattice joins [33]. These systems provide static or deterministic guarantees but require programs to be written in, or migrated to, a restricted discipline. Sync-as-Share targets the synchronisation constructs already present in existing shared-memory code.
8 Conclusion
Sync-as-Share provides a backwards-compatible and understandable path forward towards data-race-free programming. Under Sync-as-Share isolation is the default, so programmers no longer need to work out how ordering in time becomes isolation across space. Instead, they decide when, and with whom, their threads communicate using existing synchronisation actions. Further, getting synchronisation wrong no longer corrupts a thread's state, as it simply stays isolated and carries on with its own values. However, when two private updates to the same globally named variable meet as the result of a synchronisation action, Sync-as-Share makes the conflict visible.
While implementing Sync-as-Share will incur overheads, we also see opportunities for savings and new optimisations. We take comfort from the incredible success garbage collection has seen in improving its cost-to-benefit ratio.
Sync-as-Share is not specific to any language. Its combination of isolation and explicit communication allows us to expose the key design choices in what is communicated and what constitutes a conflict, which can be different for different languages. We have explored the trade-offs in two different communication topologies: Linear, which brings together updates but can leak them between threads that do not directly synchronise, and Branching, which keeps updates apart, but at a higher cost in checking.
For concreteness we have instantiated Sync-as-Share for Java and shown how an existing language can achieve data-race freedom. Correctly synchronised Java programs can adopt Sync-as-Share and keep both their code and their behaviour (cf., Theorem 5.15). Incorrectly synchronised programs can adopt it just as readily, and are told if and where a conflict arises. More than that, Sync-as-Share is a roadmap for reinterpreting synchronisation in shared-memory languages to rule out data races by construction.
References
[1] [n. d.].
[2] Sarita V. Adve and Kourosh Gharachorloo. 1996. Shared memory consistency models: a tutorial. Computer 29, 12 (Dec. 1996), 66–76. https://doi.org/10.1109/2.546611
[3] Alexandros Emmanuel Antonakakis, Iacovos G. Kolokasis, Foivos S. Zakkak, Angelos Bilas, and Polyvios Pratikakis. 2025. MaTSa: Race Detection in Java. In Proceedings of the 17th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages (Singapore, Singapore) (VMIL '25). Association for Computing Machinery, New York, NY, USA, 1–11. https://doi.org/10.1145/3759548.3763369
[4] Ellen Arvidsson, Elias Castegren, Sylvan Clebsch, Sophia Drossopoulou, James Noble, Matthew J. Parkinson, and Tobias Wrigstad. 2023. Reference Capabilities for Flexible Memory Management. Proc. ACM Program. Lang. 7, OOPSLA2, Article 270 (Oct. 2023), 31 pages. https://doi.org/10.1145/3622846
[5] Amitai Aviram, Bryan Ford, and Yu Zhang. 2011. Workspace Consistency: A programming model for shared memory parallelism. 2nd WoDet (2011). https://doi.org/10.48550/arXiv.0912.0926
[6] Mark Batty, Scott Owens, Susmit Sarkar, Peter Sewell, and Tjark Weber. 2011. Mathematizing C++ concurrency. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Austin, TX, USA) (POPL '11). Association for Computing Machinery, New York, NY, USA, 55–66. https://doi.org/10.1145/1926385.1926394
[7] Hal Berenson, Phil Bernstein, Jim Gray, Jim Melton, Elizabeth O'Neil, and Patrick O'Neil. 1995. A critique of ANSI SQL isolation levels. In Proceedings of the 1995 ACM SIGMOD International Conference on Management of Data (San Jose, California, USA) (SIGMOD '95). Association for Computing Machinery, New York, NY, USA, 1–10. https://doi.org/10.1145/223784.223785
[8] Swarnendu Biswas, Minjia Zhang, Michael D. Bond, and Brandon Lucia. 2015. Valor: Efficient, Software-Only Region Conflict Exceptions. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (Pittsburgh, PA, USA) (OOPSLA '15). Association for Computing Machinery, New York, NY, USA, 241–259. https://doi.org/10.1145/2814270.2814292
[9] Robert L. Bocchino, Vikram S. Adve, Danny Dig, Sarita V. Adve, Stephen Heumann, Rakesh Komuravelli, Jeffrey Overbey, Patrick Simmons, Hyojin Sung, and Mohsen Vakilian. 2009. A type and effect system for deterministic parallel Java. In Proceedings of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications (Orlando, Florida, USA) (OOPSLA '09). Association for Computing Machinery, New York, NY, USA, 97–116. https://doi.org/10.1145/1640089.1640097
[10] Hans-J. Boehm. 2011. How to miscompile programs with “benign” data races. In Proceedings of the 3rd USENIX Conference on Hot Topics in Parallelism (HotPar'11).
[11] Hans-J. Boehm and Sarita V. Adve. 2008. Foundations of the C++ concurrency memory model. In Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation (Tucson, AZ, USA) (PLDI '08). Association for Computing Machinery, New York, NY, USA, 68–78. https://doi.org/10.1145/1375581.1375591
[12] Borla, Holly. 2023. SE-0414: Region Based Isolation. https://forums.swift.org/t/se-0414-region-based-isolation/68805. Accessed: 2026-10-14.
[13] Chandrasekhar Boyapati and Martin Rinard. 2001. A parameterized type system for race-free Java programs. In Proceedings of the 16th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (Tampa Bay, FL, USA) (OOPSLA '01). Association for Computing Machinery, New York, NY, USA, 56–69. https://doi.org/10.1145/504282.504287
[14] Sebastian Burckhardt and Daan Leijen. 2011. Semantics of concurrent revisions. In Proceedings of the 20th European Conference on Programming Languages and Systems: Part of the Joint European Conferences on Theory and Practice of Software (Saarbrücken, Germany) (ESOP'11/ETAPS'11). Springer-Verlag, Berlin, Heidelberg, 116–135.
[15] Elias Castegren and Tobias Wrigstad. 2016. Reference Capabilities for Concurrency Control. In 30th European Conference on Object-Oriented Programming, ECOOP 2016, July 18-22, 2016, Rome, Italy (LIPIcs, Vol. 56), Shiram Krishnamurthi and Benjamin S. Lerner (Eds.). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 5:1–5:26. https://doi.org/10.4230/LIPICS.ECOOP.2016.5
[16] Arthur Chargueraud. n.d.. TLC: a non-constructive library for Coq. https://www.chargueraud.org/softs/tlc/. Accessed: 2026-06-30.
[17] Luke Cheeseman, Matthew J. Parkinson, Sylvan Clebsch, Marios Kogias, Sophia Drossopoulou, David Chisnall, Tobias Wrigstad, and Paul Liétar. 2023. When Concurrency Matters: Behaviour-Oriented Concurrency. Proc. ACM Program. Lang. 7, OOPSLA2, Article 276 (Oct. 2023), 30 pages. https://doi.org/10.1145/3622852
[18] Sylvan Clebsch, Sophia Drossopoulou, Sebastian Blessing, and Andy McNeil. 2015. Deny capabilities for safe, fast actors. In Proceedings of the 5th International Workshop on Programming Based on Actors, Agents, and Decentralized Control (Pittsburgh, PA, USA) (AGERE! 2015). Association for Computing Machinery, New York, NY, USA, 1–12. https://doi.org/10.1145/2824815.2824816
[19] Luke Dalessandro, Michael F. Spear, and Michael L. Scott. 2010. NOrec: streamlining STM by abolishing ownership records. In Proceedings of the 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (Bangalore, India) (PPoPP '10). Association for Computing Machinery, New York, NY, USA, 67–78. https://doi.org/10.1145/1693453.1693464
[20] Dave Dice, Ori Shalev, and Nir Shavit. 2006. Transactional locking II. In Proceedings of the 20th International Conference on Distributed Computing (Stockholm, Sweden) (DISC'06). Springer-Verlag, Berlin, Heidelberg, 194–208. https://doi.org/10.1007/11864219_14
[21] Tayfun Elmas, Shaz Qadeer, and Serdar Tasiran. 2007. Goldilocks: A Race and Transaction-Aware Java Runtime. In Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation (San Diego, California, USA) (PLDI '07). Association for Computing Machinery, New York, NY, USA, 245–255. https://doi.org/10.1145/1250734.1250762
[22] Benjamin Farinier, Thomas Gazagnaire, and Anil Madhavapeddy. 2015. Mergeable persistent data structures. In Actes des Vingt-sixièmes Journées Francophones des Langages Applicatifs (JFLA 2015), David Baelde and Jade Alglave (Eds.). Le Val d'Ajol, France. https://inria.hal.science/hal-01099136
[23] Cormac Flanagan and Stephen N. Freund. 2009. FastTrack: efficient and precise dynamic race detection. SIGPLAN Not. 44, 6 (June 2009), 121–133. https://doi.org/10.1145/1543135.1542490
[24] Klaus Havelund and Thomas Pressburger. 2000. Model checking java programs using java pathfinder. International Journal on Software Tools for Technology Transfer 2, 4 (2000), 366–381. https://doi.org/10.1007/s100090050043
[25] Maurice Herlihy and Eric Koskinen. 2008. Transactional Boosting: A Methodology for Highly-Concurrent Transactional Objects. In Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPOPP '08). 207–216. https://doi.org/10.1145/1345206.1345237
[26] Maurice Herlihy and J. Eliot B. Moss. 1993. Transactional memory: architectural support for lock-free data structures. In Proceedings of the 20th Annual International Symposium on Computer Architecture (San Diego, California, USA) (ISCA '93). Association for Computing Machinery, New York, NY, USA, 289–300. https://doi.org/10.1145/165123.165164
[27] Ralf Jung, Jacques-Henri Jourdan, Robbert Krebbers, and Derek Dreyer. 2017. RustBelt: securing the foundations of the Rust programming language. Proc. ACM Program. Lang. 2, POPL, Article 66 (Dec. 2017), 34 pages. https://doi.org/10.1145/3158154
[28] Jeehoon Kang, Chung-Kil Hur, Ori Lahav, Viktor Vafeiadis, and Derek Dreyer. 2017. A promising semantics for relaxed-memory concurrency. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (Paris, France) (POPL 2017). Association for Computing Machinery, New York, NY, USA, 175–189. https://doi.org/10.1145/3009837.3009850
[29] Dileep Kini, Umang Mathur, and Mahesh Viswanathan. 2017. Dynamic race prediction in linear time. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (Barcelona, Spain) (PLDI 2017). Association for Computing Machinery, New York, NY, USA, 157–170. https://doi.org/10.1145/3062341.3062374
[30] Michalis Kokologiiannakis, Iason Marmanis, Vladimir Gladstein, and Viktor Vafeiadis. 2022. Truly stateless, optimal dynamic partial order reduction. Proc. ACM Program. Lang. 6, POPL, Article 49 (Jan. 2022), 28 pages. https://doi.org/10.1145/3498711
[31] Eric Koskinen, Matthew Parkinson, and Maurice Herlihy. 2010. Coarse-Grained Transactions. In Proceedings of the 37th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '10). 19–30. https://doi.org/10.1145/1706299.1706304
[32] Eric Koskinen and Matthew J. Parkinson. 2015. The Push/Pull Model of Transactions. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '15). 186–195. https://doi.org/10.1145/2737924.2737995
[33] Lindsey Kuper and Ryan R. Newton. 2013. LVars: lattice-based data structures for deterministic parallelism. In Proceedings of the 2nd ACM SIGPLAN Workshop on Functional High-Performance Computing (Boston, Massachusetts, USA) (FHPC '13). Association for Computing Machinery, New York, NY, USA, 71–84. https://doi.org/10.1145/2502323.2502326
[34] Tongping Liu, Charlie Curtisinger, and Emery D. Berger. 2011. Dthreads: efficient deterministic multithreading. In Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles (Cascais, Portugal) (SOSP '11). Association for Computing Machinery, New York, NY, USA, 327–336. https://doi.org/10.1145/2043556.2043587
[35] Shan Lu, Soyeon Park, Eunsoo Seo, and Yuanyuan Zhou. 2008. Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS XIII). 329–339. https://doi.org/10.1145/1346281.1346323
[36] Brandon Lucia, Luis Ceze, Karin Strauss, Shaz Qadeer, and Hans-J. Boehm. 2010. Conflict Exceptions: Simplifying Concurrent Language Semantics with Precise Hardware Exceptions for Data-Races. In Proceedings of the 37th Annual International Symposium on Computer Architecture (Saint-Malo, France) (ISCA '10). Association for Computing Machinery, New York, NY, USA, 210–221. https://doi.org/10.1145/1815961.1815987
[37] Jeremy Manson, William Pugh, and Sarita V. Adve. 2005. The Java memory model. SIGPLAN Not. 40, 1 (Jan. 2005), 378–391. https://doi.org/10.1145/1047659.1040336
[38] Daniel Marino, Madanlal Musuvathi, and Satish Narayanasamy. 2009. LiteRace: effective sampling for lightweight data-race detection. SIGPLAN Not. 44, 6 (June 2009), 134–143. https://doi.org/10.1145/1543135.1542491
[39] Daniel Marino, Madanlal Musuvathi, and Satish Narayanasamy. 2010. DRFx: A simple and efficient memory model for concurrent programming languages. In Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation (Toronto, Ontario, Canada) (PLDI '10). Association for Computing Machinery, New York, NY, USA, 351–362. https://doi.org/10.1145/1806596.1806636
[40] Nicholas D. Matsakis and Felix S. Klock II. 2014. The Rust language. In Proceedings of the 2014 ACM SIGAda annual conference on High integrity language technology, HILT 2014, Portland, Oregon, USA, October 18-21, 2014. 103–104. https://doi.org/10.1145/2663171.2663188
[41] Oracle. 2017. JEP 193: Variable Handles. https://openjdk.org/jeps/193. [42] Lukas Panneke and Heike Wehrheim. 2026. jMT: Testing Correctness of Java Memory Models. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS). Springer. https://doi.org/10.1007/978-3-032-22749-2_13 [43] William Pugh. 2000. The Java memory model is fatally flawed. Concurrency: Practice and Experience 12, 6 (May 2000), 445-455. https://doi.org/10.1002/1096-9128(200005)12:6<445::AID-CPE484>3.0.CO;2-A [44] William Pugh and Jeremy Manson. 2004. Java Memory Model Causality Test Cases. https://www.cs.umd.edu/~pugh/java/memoryModel/CausalityTestCases.html. Accessed 2026-06-22. [45] Jake Roemer, Kaan GenC, and Michael D. Bond. 2020. SmartTrack: efficient predictive race detection. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (London, UK) (PLDI 2020). Association for Computing Machinery, New York, NY, USA, 747-762. https://doi.org/10.1145/3385412.3385993 [46] Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, and Thomas Anderson. 1997. Eraser: a dynamic data race detector for multithreaded programs. ACM Trans. Comput. Syst. 15, 4 (Nov. 1997), 391-411. https://doi.org/10.1145/265924.265927 [47] Jaroslav Ševěik and David Aspinall. 2008. On Validity of Program Transformations in the Java Memory Model. In Programming Languages and Systems (ESOP 2008). Springer, Berlin, Heidelberg, 27-51. https://doi.org/10.1007/978-3-540-78739-6_3 [48] Nir Shavit and Dan Touitou. 1995. Software transactional memory. In Proceedings of the Fourteenth Annual ACM Symposium on Principles of Distributed Computing (Ottawa, Ontario, Canada) (PODC '95). Association for Computing Machinery, New York, NY, USA, 204-213. https://doi.org/10.1145/224964.224987 [49] Zheng Shi, Umang Mathur, and Andreas Pavlogiannis. 2024. Optimistic Prediction of Synchronization-Reversal Data Races. In Proceedings of the IEEE/ACM 46th International Conference on Software Engineering (Lisbon, Portugal) (ICSE '24). Association for Computing Machinery, New York, NY, USA, Article 134, 13 pages. https://doi.org/10.1145/3597503.3639099 [50] Fridtjof Peer Stoldt, Brandt Bucher, Sylvan Clebsch, Matthew A. Johnson, Matthew J. Parkinson, Guido van Rossum, Eric Snow, and Tobias Wrigstad. 2025. Dynamic Region Ownership for Concurrency Safety. Proc. ACM Program. Lang. 9, PLDI, Article 210 (June 2025), 26 pages. https://doi.org/10.1145/3729313 [51] Viktor Vafeiadis, Thibaut Balabonski, Soham Chakraborty, Robin Morisset, and Francesco Zappa Nardelli. 2015. Common compiler optimisations are invalid in the C11 memory model and what we can do about it. In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Mumbai, India) (POPL '15). Association for Computing Machinery, New York, NY, USA, 209-220. https://doi.org/10.1145/2676726.2676995