Manuscript Offprint
arXiv:2610.07665Mechanizing Transactional Anomalous Patterns for Weak Isolation Levels
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Long Gu , Si Liu , and Hengfeng Wei
Nanjing University
The Chinese University of Hong Kong, Shenzhen
Hunan University
Abstract. Recently proposed transactional anomalous patterns (TAPs) provide a semantic characterization of weak isolation levels and serve as the foundation for TAP-based isolation checking. Yet, these characterizations currently exist only as pen-and-paper proofs. We present the first machine-checked formalization of TAPs and their associated weak isolation levels in Rocq. We further establish machine-checked proofs of the corresponding TAP-based characterization theorems. The mechanization process revealed two subtle issues in the original presentation: an underspecified transaction history model and an incomplete TAP characterization of the Read Atomicity isolation level that failed to capture violations of session guarantees. We address these issues by refining the definition of transaction histories and the corresponding TAP definitions, and re-establish all characterization theorems in Rocq. These refinements have further been integrated into the weak isolation checker Plume.
1 Introduction
Transactions are a fundamental abstraction in database systems, enabling applications to execute groups of operations atomically despite concurrent access. A key aspect of transactional correctness is isolation (the I in ACID [39]), which governs the effects of concurrent transactions that may be observed by one another. To balance consistency and performance [27,4,29,3], modern databases support a spectrum of isolation levels, ranging from strong ones such as Serializability and Snapshot Isolation to weaker ones such as Cut Isolation [4], Read Committed [7], Read Atomicity [5], and Transactional Causal Consistency [2]. These weaker levels are particularly important in highly available transactions (HATs) [4], as they enable always-on operation even in the presence of network partitions while still providing useful transactional semantics.
The importance of isolation guarantees has motivated extensive research on black-box isolation checking [9,34,21,19,42,18,25,38,30,10], which determines whether an observed database execution of transactions satisfies a target isolation guarantee without accessing often unavailable or opaque database internals. Among these checkers, Plume [25], recently developed by the authors and David
- Corresponding author.
L. Gu et al.
Basin, focuses on HAT-compatible weak isolation levels. One of its key contributions is the introduction of transactional anomalous patterns (TAPs), a collection of fine-grained anomalies that provide sound and complete characterizations of HAT-compatible isolation levels. These characterization theorems constitute the formal foundation of Plume: its correctness relies on the equivalence between the absence of certain TAPs and the satisfaction of corresponding isolation guarantees. For example, in the original Plume characterization, an execution history of transactions satisfies the Read Atomicity isolation level if and only if it excludes all instances of 12 TAPs (see, e.g., [25, Fig. 3]).
However, like most formalizations of isolation levels [1,11,12,14,9,41,10,19,42], the equivalence theory underlying Plume exists only as pen-and-paper proofs. These proofs involve subtle reasoning about execution histories, transactional dependencies, isolation semantics, etc., and often rely on implicit assumptions and omitted well-formedness conditions that are not fully captured by the formal definitions. Hence, establishing a machine-checked formalization and its equivalence results is valuable not only for increasing confidence in the proofs themselves, but also for validating the underlying definitions and their intended semantics. Otherwise, the claimed soundness (reporting no false positives) and completeness (missing no isolation violations) of TAP-based isolation checking in Plume cannot be guaranteed.
In this work, we present the first machine-checked formalization of TAPs and their associated weak isolation levels in Rocq [33]. Specifically, we mechanize the TAP theory, including transactional histories, dependency relations, the 16 TAPs (after refinement; see Section 5), and the formal semantics of four HAT-compatible isolation levels, i.e., Cut Isolation, Read Committed, Read Atomicity, and Transactional Causal Consistency. We further establish machine-checked proofs of the soundness and completeness of the corresponding TAP-based characterization theorems.
Notably, the mechanization process revealed two subtle issues in the original presentation of Plume:
-
The original transaction history model was underspecified, relying on assumptions that were implicit in the pen-and-paper development but had to be made explicit for machine checking. Consequently, a direct mechanization was not possible without first refining the history model (Section 3.3).
-
The original TAP characterization of Read Atomicity was semantically incomplete. We identified a mismatch between two TAPs and the isolation semantics they were intended to characterize, causing violations of session guarantees, specifically read my writes [35], to go undetected. We address
Plume is part of a broader collaborative research effort on the reliability of database transactions from both the design [23,27,16,17,22] and deployment [19,10,38,18] perspectives. The project is jointly led by the Information Security Group at ETH Zurich and its collaborators.
Our Rocq development is publicly available at https://github.com/dracooooo/Plume/tree/main/Mechanization.

Fig.1: A hierarchy of prevalent database isolation levels. The four HAT-compatible ones are highlighted. : I is strictly weaker than .
this issue by refining the corresponding TAPs and re-establishing the characterization theorems (Section 5.2). These refinements have subsequently been integrated into the Plume isolation checker.
Overall, these findings highlight that mechanization is valuable not only for establishing high assurance in formal proofs, but also for exposing hidden assumptions, clarifying definitions, and improving the underlying theory.
Cut Isolation (CI) [4]. This level requires each transaction to observe an unchanging snapshot of the database throughout its execution. Hence, reading the same data item multiple times must always return the same value, ruling out the anomaly non-repeatable reads [7].
Read Committed (RC) [7]. This level guarantees that transactions observe only committed updates. It prevents dirty reads, but still permits anomalies such as non-repeatable reads.
Read Atomicity (RA) [5]. This level ensures that updates produced by a transaction are observed atomically: either all of them are visible or none are. This eliminates fractured reads, where a transaction observes only a subset of another transaction's updates. For instance, Charlie only sees one direction of a new (bidirectional) friendship between Alice and Bob in a social network.
Note that Plume adopts a slightly stronger variant of RA [9] by additionally enforcing the read my writes session guarantee [35]. Intuitively, this guarantee ensures that once a client successfully commits a transaction that writes some data, every subsequent transaction in the same client session observes those writes (or more recent values).
Transactional Causal Consistency (TCC) [2]. This level extends Read Atomicity with causal ordering and convergence guarantees. Causally related
L. Gu et al.
transactions must be observed in the same order by all sessions, preventing causality violations (e.g., Alice seeing Bob's response to Charlie's message without seeing the message itself). Moreover, all replicas are required to eventually converge to the same state despite concurrent updates.
The recently developed black-box checker Plume [25] targets these HAT-compatible isolation levels. It is built on two key ideas, addressing correctness and efficiency of checking, respectively. First, it introduces transactional anomalous patterns (TAPs), which provide sound and complete semantic characterizations of these isolation levels. Second, it combines vectors and tree clocks to efficiently detect TAP instances in the transactional dependency graph [9] derived from an execution history, thereby accelerating isolation checking.
In this work, we focus on the former aspect, which underpins the correctness of TAP-based isolation checking.
3 Mechanizing Transaction Histories and Dependencies
In this section, we mechanize in Rocq the notions of transactions, histories, and transactional dependencies that underpin the mechanization of isolation levels (Section 4) and TAPs (Section 5).
3.1 Notation
A binary relation over a set is a subset of . For , we write and interchangeably. Let be the identity relation on . We use to denote the transitive closure of . A relation is acyclic if . A strict partial order is an irreflexive and transitive relation. A strict total order is a relation that is a strict partial order and total.
In logical formulas, we often write ‘_’ for components that are irrelevant and implicitly existentially quantified, and to mean “unique existence.”
Our mechanization is developed in Rocq [33], an interactive theorem prover based on dependent type theory. In the excerpts that follow, computational objects such as operations and transactions are assigned type Type, whereas specifications and lemmas are stated as propositions of type Prop. An Inductive declaration introduces a datatype by listing its constructors (e.g., Read and Write for operations). A Record bundles named components into a single structured object; besides data fields, a record may also carry Prop-typed fields that encode well-formedness constraints or axioms (e.g., wr_unique and so_wr_acyclic in History). Named concepts are introduced with Definition.
Sets are represented as Ensembles, i.e., predicates over a carrier type: membership E a means that a belongs to the set E. A binary relation over A has type
A client session represents a sequence of interactions issued by a client to the database over a period of time, e.g., from login to logout.
relation A, equivalently A -> A -> Prop; we write R a b when . Relations are often given by anonymous functions fun a b => .... The standard library provides reusable order-theoretic notions such as strict_order and the transitive closure clos_trans.
Logical formulas use universal quantification (forall), existential quantification (exists), unique existence (exists!), and the usual connectives for conjunction, disjunction, implication (->), and bi-implication (<-). Record fields are accessed by projection: for a history H, T H denotes its transaction set and WR H x its write-read relation on key x. Isolation levels and TAPs are defined as Props that quantify over histories, commit orders, and transactions.
3.2 Mechanizing Operations and Transactions
We consider a key-value data store managing a set of keys associated with values from a set . We use to denote a read operation that reads from and to denote a write operation that writes to . Each operation has a unique identifier. A transaction is a pair , where is a set of read and write operations, each with its own unique identifier, and is a strict total order over the operations in . Figure 2 shows the Rocq excerpt for operations and transactions.
Inductive Op : Type := | Read (op_id : OpId) (x : Key) (v : Value) : Op | Write (op_id : OpId) (x : Key) (v : Value) : Op.
Record Transaction := { txn_id : TxnId; ops : Ensemble Op; po : relation Op; po_strict_total : strict_order po / \ forall o1 o2, ops o1 -> ops o2 -> o1 <> o2 -> po o1 o2 / po o2 o1 }.
Fig. 2: Rocq excerpt: operations and transactions.
We use to range over transactions, and Reads , Writes , and to denote the sets of read operations, read operations on , write operations, and write operations on in a transaction , respectively. The extension to sets of transactions is straightforward. For example, Reads denotes the set of read operations in a set of transactions. We also use and to denote the sets of transactions that read and write to , respectively. In Rocq, the predicate (resp. ) is true if and only if (resp. ) is a write (resp. read) operation on key from transaction , namely, (resp. ).
L. Gu et al.
3.3 Mechanizing Histories
A history records the interactions between clients and the database, including the set T of transactions issued by clients, the session order in which transactions are issued by each client, and the write-read relation between operations.
Plume’s Definition of History. The original definition of history used by Plume builds its write-read relation at the transaction level, focusing on the external reads of transactions. Specifically, for a transaction , we write if writes to and the last value written is , and if has a read of returning that precedes every write to in (and hence also if performs no write to ), and is the value returned by the first such read. Then, the transaction-level write-read relation WR is defined as follows:
The first condition types each edge, and the second ensures that every external read, and only an external read, has exactly one source transaction. Note that without the unique value assumption under which for each key every write to the key assigns a unique value, the reverse implication in the first condition may not hold.
For convenience, we abuse notation and use WR to also denote the relation .
Definition 1 (History [25]). A history is a tuple , where is a set of committed transactions, is the session order, and is the write-read relation, such that is acyclic.
Refining the Original History Definition. During mechanization, we identified a limitation in Plume's definition of histories. Specifically, its transaction-level write-read relation WR is incomplete with respect to the operation-level write-read relation wr, which requires every read operation r to be associated with a unique write operation w on the same key and value. Consequently, WR cannot, in general, be derived from wr in the presence of internal reads.
This limitation hinders the mechanization of the proofs of the implications between isolation levels, as well as the soundness and completeness proofs of the TAP-based characterization theorems. Therefore, in the new definition of history below, we extend WR to be equivalent to wr.
Definition 2 (History (this work)). A history is a tuple , where is the set of committed transactions, is the session order, is the transaction-level write-read relation, and is the operation-level write-read relation such that
– If , then writes to the same key and value as reads.
– For each key x, every read operation r on x is associated with a unique write operation w on x such that .
– WR and wr can be derived from each other as follows:
– (SO ∪ WR) is acyclic.
We assume a distinguished initial transaction that writes the initial value of every key to the database. Figure 3 shows the corresponding Rocq excerpt. The four conditions in Definition 2 correspond to the definitions of wr (as a global relation on operations constrained by the History record; see lines 1–3), wr_unique (lines 10–12), wr_iff_WR (lines 14–17) and so_wr_acyclic (lines 19–22), respectively.
Definition wr : relation Op :=
fun w r => is_write w /\ is_read r /
op_key w = op_key r /\ op_value w = op_value r.
Record History := { T : Ensemble Transaction; SO : relation Transaction; WR : Key -> relation Transaction;
wr_unique : forall t x r, T t -> Rx t x r -> exists! w, exists ts, T ts /\ Wx ts x w /\ wr w r;
wr_iff_WR :
forall x t s, WR x t s <->
T t /\ T s /\ t <> s /
exists w r, Wx t x w /\ Rx s x r /\ wr w r;
so_wr_acyclic : irreflexive (clos_trans Transaction (fun t1 t2 => SO t1 t2 \ exists x, WR x t1 t2)); }.
Fig. 3: Rocq excerpt: the refined definition of history.
3.4 Mechanizing Transactional Dependencies
A history satisfies an isolation level if there exists a strict total order over its transactions, called the commit order [9], which extends the causal order, i.e., the
L. Gu et al.
Definition SO_union_WR (H : History) : relation Transaction := fun t1 t2 => SO H t1 t2 / exists x, WR H x t1 t2.
Definition SO_union_WR_plus (H : History) : relation Transaction := clos_trans Transaction (SO_union_WR H).
Definition CO (H : History) : relation Transaction := SO_union_WR_plus H.
Definition commit_order
(H : History) (CM : relation Transaction) : Prop :=
strict_order CM /
(forall t1 t2,
T H t1 -> T H t2 -> t1 <> t2 ->
CM t1 t2 / CM t2 t1) /
(forall t1 t2, CO H t1 t2 -> CM t1 t2).
Fig. 4: Rocq excerpt: the causal order and the commit order.
transitive closure of the union of the write-read relation and the session order, under which the axioms defining the isolation level hold. Intuitively, the commit order dictates the order in which transactions are committed to the “global” data store.
We define the causal order CO as the transitive closure of SO and WR, i.e., , capturing the potential causality between transactions. A commit order is a strict total order that extends CO. Figure 4 presents the corresponding definitions in Rocq.
4 Mechanizing HAT-Compatible Isolation Levels
Building on the formalization of histories and ordering relations, this section presents the Rocq formalization of the four HAT-compatible isolation levels.
As shown in Figure 5, we mechanize seven axioms in total, namely RC1, RC2, RC3, CutIsolation, MonoAtomicView, ReadAtomic, and Causal, together with the four HAT-compatible isolation levels Read Committed, Cut Isolation, Read Atomicity, and Transactional Causal Consistency, each defined as a conjunction of these axioms.
In the following, we use Read Atomicity as a case study, since mechanizing it revealed another subtle issue in its TAP-based characterization (Section 5.2). Intuitively, Read Atomicity guarantees that a transaction's updates become visible as a single atomic unit. Hence, another transaction can either observe all of those updates or none of them, ruling out fractured reads.
Definition 3 (Read Atomicity [25]). A history satisfies Read Atomicity if and only if it satisfies Read Committed (specifically, RC1, RC2,

Fig. 5: Definitions of the four HAT-compatible isolation levels. An edge indicates that A is strictly weaker than B.
RC3, and RC4 (i.e., MonoAtomicView)) and there exists a commit order CM ⊆ T × T on T such that the following ReadAtomic axiom holds.
(ReadAtomic axiom) If a transaction reads a key from and there exists a transaction that also writes to such that , then . Formally, . . . .
Definition ReadAtomic (H : History) (CM : relation Transaction) : Prop := forall x t1 t2 t3, WTx (T H) x t1 -> WTx (T H) x t2 -> t1 <> t2 -> RTx (T H) x t3 -> t3 <> t1 -> t3 <> t2 -> WR H x t1 t3 -> SO_union_WR H t2 t3 -> CM t2 t1.
Definition ReadAtomicity (H : History) : Prop :=
RC1 H / \ RC2 H / \ RC3 H /
exists CM, commit_order H CM / \ ReadAtomic H CM.
Fig. 6: Rocq excerpt: the ReadAtomic axiom and Read Atomicity.
Figure 6 shows the formalization of ReadAtomic axiom and the Read Atomicity isolation level in Rocq. Specifically, the predicate WTx (T H) x t1 (line 4) (resp., RTx (T H) x t3 (line 6)) is true if and only if transaction (resp., ) writes (resp., reads) key x. The edge WR H x t1 t3 means that reads key x from (line 7). The edge SO_union_WR H t2 t3 means that is visible to
L. Gu et al.

(a) TAP-k: FRACTUREDREADCO

(b) TAP-l: FRACTUREDREADCM
Fig. 7: The two original TAPs for fractured read [25]. Solid black arrows are edges present in the TAPs. Red dashed arrows are commit-order edges entailed by the ReadAtomic axiom; together with the solid commit-order edge, they expose the contradiction.
through one SO ∪ WR step (line 8). The conclusion CM t2 t1 requires that must be ordered before in the commit order (line 9).
We omit the definitions of RC1, RC2, and RC3, and note that RC4 (i.e., MonoAtomicView) is implied by ReadAtomic. The complete mechanized definitions, including those for other isolation levels, can be found in our repository.
5 Mechanizing TAPs and Their Semantic Conformance
This section mechanizes the transactional anomalous patterns (TAPs), focusing on those for Read Atomicity, and verifies the equivalence between the absence of corresponding TAPs and the formal definition of Read Atomicity given in Section 4. Our initial attempt to establish this equivalence failed, revealing a subtle semantic issue in the original TAPs: they do not capture anomalies arising from violations of the read my writes session guarantee [35]. This observation led us to refine the TAP-based characterization and subsequently complete the machine-checked proof of equivalence.
5.1 Mechanizing TAPs
Plume devises 14 fine-grained TAPs to characterize the four HAT-compatible isolation levels. Read Atomicity is defined using 12 of these TAPs: nine are shared with Read Committed, one with Cut Isolation, and the remaining two capture fractured reads, the distinguishing anomaly prohibited by Read Atomicity. Figure 7 shows these two TAPs, and their formalization is given in Figure 8.
We note that the textual descriptions and formal definitions of TAP-k and TAP-l in [25, Table 1] are inconsistent with their visualizations in [25, Figure 3], missing the required SO edges. Figure 7 shows our corrected versions.
TAP-k: FracturedReadCO
TAP-l: FracturedReadCM
Fig. 8: Formal definitions of the two original TAPs in Figure 7.

Fig. 9: A history violating Read Atomicity, but not captured by Plume's original TAP-k or TAP-l.
Specifically, in TAP-k (FRACTUREDREADCO), transaction reads from and from , while transaction also writes to but . Similarly, in TAP-l (FRACTUREDREADCM), transaction reads from and from , while transaction also writes to but . In both cases, should precede in CM, contradicting in TAP-k and in TAP-l, respectively. Note that, since , TAP-l is a general case of TAP-k. We retain both named patterns for diagnosis and comparison with Plume [25], which aims to provide a fine-grained characterization of anomalies. The proof basis is minimal: because TAP-k implies TAP-l, the absence of TAP-l suffices. This also applies to TAP-o and TAP-p, which we introduce in Section 5.2.
5.2 Initial Attempt to Prove the Equivalence
Unfortunately, Plume’s original TAP characterization of Read Atomicity is incomplete, and our initial attempt to prove the equivalence failed. Figure 9 shows a history, originally reported by Barros et al. [6], that violates Read Atom-
L. Gu et al.

(a) New TAP-k: FRACTUREDREADCO

(b) New TAP-l: FRACTUREDREADCM

(c) TAP-o: NOTMYSESSIONWRITECO

(d) TAP-p: NOTMYSESSIONWRITECM
Fig. 10: Refined TAPs for fractured reads and for violations of the session guarantee read my writes.
icity, specifically the ReadAtomic axiom, but is not captured by the corresponding TAPs, namely TAP-k and TAP-l.
In this history, transaction is ordered before in CM, while is ordered before in SO. Transaction reads key from , while failing to observe the later write to performed by . The ReadAtomic axiom requires , contradicting . Hence, this history violates Read Atomicity. However, neither TAP-k nor TAP-l matches this history, because both patterns require at least two read operations in .
The underlying issue is that the original TAP-k and TAP-l conflate two distinct kinds of anomalies, namely fractured reads and violations of the session guarantee read my writes, in a single pattern. To address this issue, we split each of the original patterns into two. The revised TAP-k (resp. TAP-l) captures only fractured reads, while the new TAP-o (NOTMYSESSIONWRITECO) and TAP-p (NOTMYSESSIONWRITECM) capture violations of read my writes. Figure 10 shows the refined TAPs, and their formalization is given in Figure 11. Compared with the original definitions, the revised TAP-k and TAP-l allow the case where , but exclude the case where . The latter is instead captured by TAP-o and TAP-p. Since , TAP-p is a general case of TAP-o.
With these refinements, the ReadAtomic axiom is equivalent to the absence of TAP-j (for anomalies of non-repeatable reads), TAP-l, and TAP-p. Figure 12 and Figure 13 present the Rocq definitions of revised TAP-l and new TAP-p, respectively.
New TAP-k: FracturedReadCO
New TAP-l: FracturedReadCM
TAP-o: NotMySessionWriteCO
TAP-p: NotMySessionWriteCM
Fig. 11: Formal definitions of the refined TAPs in Figure 10.
5.3 Proving the Equivalence
Table 1 summarizes the definitions of the four HAT-compatible isolation levels in terms of prohibited TAPs (16 in total after our refinement), together with the key lemmas used to prove their equivalence in Rocq. It also highlights the modular structure of our proof development by showing how the characterization of each isolation level is built from a small set of reusable lemmas. For example, the proof of Read Committed decomposes into lemmas establishing the equivalence between RC-(1–3) and the absence of TAP-a–TAP-g, showing that TAP-h implies TAP-i, and finally connecting MonoAtomicView with the absence of TAP-i. Likewise, the proof of Read Atomicity builds on lemmas showing that TAP-k and TAP-o respectively imply TAP-l and TAP-p, before establishing the correspondence between ReadAtomic and the remaining TAPs and semantic axioms.
In total, our development comprises 1057 LOC in Rocq, 736 LOC for proofs, 13 key lemmas, and 4 theorems.
L. Gu et al.
Definition TAP_1
(H : History) (CM : relation Transaction) : Prop :=
exists x t1 t2 t3,
WTx (T H) x t1 / \ WTx (T H) x t2 / \ t1 <> t2 /
RTx (T H) x t3 / \ t3 <> t1 / \ t3 <> t2 /
(exists y, x <> y /
RTx (T H) y t3 / \ WR H x t1 t3 / \ CM t1 t2 / \ WR H y t2 t3).
Fig. 12: Rocq excerpt: the revised TAP-l (FRACTUREDREADCM).
Definition TAP_p
(H : History) (CM : relation Transaction) : Prop :=
exists x t1 t2 t3,
WTx (T H) x t1 / \ WTx (T H) x t2 / \ t1 <> t2 /
RTx (T H) x t3 / \ t3 <> t1 / \ t3 <> t2 /
(WR H x t1 t3 / \ CM t1 t2 / \ SO H t2 t3).
Fig. 13: Rocq excerpt: the new TAP-p (NotMySessionWriteCM).
6 Related Work
A range of formal models have been proposed to characterize the semantics of isolation levels. One influential formalism is dependency graphs, introduced by Bernstein et al. [8] to characterize Serializability and later extended by Adya [1] to weaker isolation guarantees such as Snapshot Isolation and Read Committed. A second line of work adopts axiomatic semantics. Cerone et al. [11] introduced abstract executions that define isolation levels using two relations: visibility, capturing which effects a transaction may observe, and arbitration, ordering committed versions. Biswas and Enea [9] later proposed an alternative axiomatization based on the write-read relation, which can be extracted directly from execution histories. Orthogonal to these models, Crooks et al. [14] characterized isolation levels using state-based traces, while Xiong et al. [41] proposed an operational semantics for them. More recently, several alternative formalisms have been proposed specifically for black-box isolation checking. These include polygraphs and their variants [34,19,10,42], as well as transactional anomalous patterns [25].
Across these efforts, new formalizations are typically validated by proving their semantic equivalence to earlier ones. For example, Biswas and Enea [9] proved that their axiomatic semantics is equivalent to that of Cerone et al. [11]; Crooks et al. [14] established the correspondence between their state-based semantics and Adya's dependency-graph model [1]; Huang et al. [19] proved that their characterization of Snapshot Isolation using generalized polygraphs is equivalent to Cerone et al.'s dependency-graph-based characterization [12]. However, all of these equivalence results rely solely on pen-and-paper proofs. In
Table 1: Defining the four HAT-compatible isolation levels in terms of prohibited TAPs, together with the key lemmas used to prove their equivalence.
| Iso. Level | Prohibited TAPs | Key Lemmas |
|---|---|---|
| CI | TAP-j | direct equivalence |
| RC | TAP-a TAP-i | MonoAtomicView |
| RA | TAP-a TAP-l TAP-o TAP-p | ReadAtomic ReadAtomic CutIsolationReadAtomic MonoAtomicView |
| TCC | TAP-a TAP-p | Causal ReadAtomicCausal |
contrast, we provide machine-checked proofs that TAPs are sound and complete with respect to the isolation semantics they characterize.
Tool support for formal reasoning about database isolation has also received increasing attention. Liu et al. [28] developed a framework in Maude [13] for specifying and model checking database isolation guarantees over execution histories of transaction systems. VerIso [16] mechanized the operational semantics of [41] in Isabelle/HOL [32], enabling machine-checked verification that concurrency control protocols satisfy their intended isolation guarantees. Our work differs from these efforts in that, rather than verifying the correctness of protocols/systems, we mechanize the soundness and completeness proofs establishing the equivalence between two characterizations of isolation levels.
More recently, Isolde [6] addresses the same goal as ours by automatically reasoning about the equivalence between different definitions of isolation levels. Relying on bounded counterexample synthesis, it is sound (e.g., it correctly reports the Read Atomicity violation shown in Figure 9) and complete within a bound. In contrast, we establish fully machine-checked soundness and completeness proofs, at the cost of requiring interactive theorem proving.
7 Conclusion
We have presented a machine-checked formalization of TAPs and their associated HAT-compatible isolation levels in Rocq. We have also established machine-checked proofs of the corresponding soundness and completeness theorems. Beyond increasing confidence in the correctness of these results, our mechanization uncovered an imprecise definition of transaction histories and subtle mismatches between TAP definitions and their intended semantics, leading to refinements that have since been incorporated into Plume.
L. Gu et al.
We therefore argue that mechanization should not be viewed as an optional add-on, but rather as a necessary step in the rigorous formalization of isolation levels and consistency theories in general. Existing formalizations can benefit from retrospective mechanization, as this work illustrates, while future proposals such as [40,37] should be accompanied by machine-checked developments from the outset.
Looking forward, we plan to develop a meta-framework for database isolation semantics, which provides a common foundation for expressing diverse formalizations and establishing their semantic equivalence in a principled manner.
Acknowledgments
Si Liu would like to express his deepest gratitude to David Basin for his generous support and mentorship throughout his six years at ETH Zurich. He is especially grateful for the freedom to continue his research on the formal verification of distributed systems (e.g., [26,23,43]), while also pursuing a new research direction on the verification and validation of database isolation guarantees (e.g., [19,20,25,16,38,10]). He also sincerely thanks David for introducing him to the field of network security, particularly DNS security, where they and their collaborators made important advances (e.g., [24,15,31,36]). Si Liu was supported by the University Development Fund (UDF01004607). Hengfeng Wei was supported by the Fundamental Research Funds for the Central Universities.
References
-
Adya, A.: Weak Consistency: A Generalized Theory and Optimistic Implementations for Distributed Transactions. Ph.D. thesis, USA (1999)
-
Akkoorath, D.D., Tomsic, A.Z., Bravo, M., Li, Z., Crain, T., Bieniusa, A., Preguiça, N.M., Shapiro, M.: Cure: Strong semantics meets high availability and low latency. In: ICDCS 2016. pp. 405–414. IEEE Computer Society (2016). https://doi.org/10.1109/ICDCS.2016.98
-
Antoniadis, K., Didona, D., Guerraoui, R., Zwaenepoel, W.: The impossibility of fast transactions. In: 2020 IEEE International Parallel and Distributed Processing Symposium (IPDPS). pp. 1143–1154 (2020). https://doi.org/10.1109/IPDPS47924.2020.00120
-
Bailis, P., Davidson, A., Fekete, A., Ghodsi, A., Hellerstein, J.M., Stoica, I.: Highly available transactions: Virtues and limitations. Proc. VLDB Endow. 7(3), 181–192 (nov 2013). https://doi.org/10.14778/2732232.2732237
-
Bailis, P., Fekete, A., Ghodsi, A., Hellerstein, J.M., Stoica, I.: Scalable atomic visibility with RAMP transactions. ACM Trans. Database Syst. 41(3) (Jul 2016). https://doi.org/10.1145/2909870
-
Barros, M., Cunha, A., Pereira, J., Kang, E.: Reasoning about transactional isolation levels with isolde (2026), https://arxiv.org/abs/2604.00159
-
Berenson, H., Bernstein, P., Gray, J., Melton, J., O'Neil, E., O'Neil, P.: A critique of ANSI SQL isolation levels. ACM SIGMOD Record 24(2), 1–10 (1995). https://doi.org/10.1145/223784.223785
-
Bernstein, P.A., Goodman, N.: Concurrency control in distributed database systems. ACM Computing Surveys (CSUR) 13(2), 185–221 (1981). https://doi.org/10.1145/356842.356846
-
Biswas, R., Enea, C.: On the complexity of checking transactional consistency. Proc. ACM Program. Lang. 3(OOPSLA), 165:1–165:28 (2019). https://doi.org/10.1145/3360591
-
Cai, Z., Liu, S., Wei, H., Chen, Y., Pan, A.: Fast verification of strong database isolation. Proc. VLDB Endow. 19(4), 563–575 (2025). https://doi.org/10.14778/3785297.3785300
-
Cerone, A., Bernardi, G., Gotsman, A.: A framework for transactional consistency models with atomic visibility. In: CONCUR 2015. LIPIcs, vol. 42, pp. 58–71. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2015). https://doi.org/10.4230/LIPICS.CONCUR.2015.58
-
Cerone, A., Gotsman, A.: Analysing snapshot isolation. J. ACM 65(2) (Jan 2018). https://doi.org/10.1145/3152396
-
Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: All about Maude - a High-Performance Logical Framework: How to Specify, Program and Verify Systems in Rewriting Logic. Springer-Verlag, Berlin, Heidelberg (2007). https://doi.org/10.1007/978-3-540-71999-1
-
Crooks, N., Pu, Y., Alvisi, L., Clement, A.: Seeing is believing: A client-centric specification of database isolation. In: Proceedings of the ACM Symposium on Principles of Distributed Computing. p. 73–82. PODC '17, ACM (2017). https://doi.org/10.1145/3087801.3087802
-
Duan, H., Bearzi, M., Vieli, J., Basin, D., Perrig, A., Liu, S., Tellenbach, B.: CAMP: Compositional amplification attacks against DNS. In: USENIX Security 24. pp. 5769–5786. USENIX Association, Philadelphia, PA (Aug 2024), https://www.usenix.org/conference/usenixsecurity24/presentation/duan
-
Ghasemirad, S., Liu, S., Sprenger, C., Multazzu, L., Basin, D.: VerIso: verifiable isolation guarantees for database transactions. Proc. VLDB Endow. 18(5), 1362–1375 (2025). https://doi.org/10.14778/3718057.3718065
-
Ghasemirad, S., Sprenger, C., Liu, S., Multazzu, L., Basin, D.: Pushing the limit: Verified performance-optimal causally-consistent database transactions. In: TACAS '25. LNCS, vol. 15698, pp. 43–62 (2025). https://doi.org/10.1007/978-3-031-90660-2_3
-
Gu, L., Liu, S., Xing, T., Wei, H., Chen, Y., Basin, D.: IsoVista: black-box checking database isolation guarantees. Proc. VLDB Endow. 17(12), 4325–4328 (Aug 2024). https://doi.org/10.14778/3685800.3685866
-
Huang, K., Liu, S., Chen, Z., Wei, H., Basin, D.A., Li, H., Pan, A.: Efficient black-box checking of snapshot isolation in databases. Proc. VLDB Endow. 16(6), 1264–1276 (2023). https://doi.org/10.14778/3583140.3583145
-
Jiang, Z.M., Liu, S., Rigger, M., Su, Z.: Detecting transactional bugs in database engines via Graph-Based oracle construction. In: OSDI 23. pp. 397–417. USENIX Association (2023)
-
Kingsbury, K., Alvaro, P.: Elle: Inferring isolation anomalies from experimental observations. Proc. VLDB Endow. 14(3), 268–280 (2020). https://doi.org/10.5555/3430915.3442427
-
Liang, L., Liu, S.: Exploring design alternatives for replicated RAMP transactions using maude. In: TASE 2021. pp. 111–118. IEEE (2021). https://doi.org/10.1109/TASE52547.2021.00026
L. Gu et al.
-
Liu, S.: All in One: Design, Verification, and Implementation of SNOW-optimal Read Atomic Transactions. ACM Trans. Softw. Eng. Methodol. 31(3) (Mar 2022). https://doi.org/10.1145/3494517
-
Liu, S., Duan, H., Heimes, L., Bearzi, M., Vieli, J., Basin, D., Perrig, A.: A Formal Framework for End-to-End DNS Resolution. In: Proceedings of the ACM SIGCOMM 2023 Conference. p. 932–949. ACM SIGCOMM '23, ACM (2023). https://doi.org/10.1145/3603269.3604870
-
Liu, S., Gu, L., Wei, H., Basin, D.: Plume: Efficient and complete black-box checking of weak isolation levels. Proc. ACM Program. Lang. 8(OOPSLA), 876–904 (2024). https://doi.org/10.1145/3689742
-
Liu, S., Meseguer, J., Ölveczky, P.C., Zhang, M., Basin, D.: Bridging the semantic gap between qualitative and quantitative models of distributed systems. Proc. ACM Program. Lang. 6(OOPSLA2) (Oct 2022). https://doi.org/10.1145/3563299
-
Liu, S., Multazzu, L., Wei, H., Basin, D.A.: NOC-NOC: towards performance-optimal distributed transactions. Proc. ACM Manag. Data 2(1) (Mar 2024). https://doi.org/10.1145/3639264
-
Liu, S., Ölveczky, P.C., Zhang, M., Wang, Q., Meseguer, J.: Automatic analysis of consistency properties of distributed transaction systems in Maude. In: TACAS 2019. LNCS, vol. 11428, pp. 40–57. Springer (2019). https://doi.org/10.1007/978-3-030-17465-1_3
-
Lu, H., Sen, S., Lloyd, W.: Performance-Optimal Read-Only transactions. In: 14th USENIX Symposium on Operating Systems Design and Implementation (OSDI 20). pp. 333–349. USENIX Association (Nov 2020), https://www.usenix.org/conference/osdi20/presentation/lu
-
Møldrup, L., Pavlogiannis, A.: AWDIT: an optimal weak database isolation tester. Proc. ACM Program. Lang. 9(PLDI) (Jun 2025). https://doi.org/10.1145/3742465
-
Nevatia, D., Liu, S., Basin, D.: Reachability Analysis of the Domain Name System. Proc. ACM Program. Lang. 9(POPL) (Jan 2025). https://doi.org/10.1145/3704898
-
Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL - A Proof Assistant for Higher-Order Logic, Lecture Notes in Computer Science, vol. 2283. Springer (2002). https://doi.org/10.1007/3-540-45949-9
-
Rocq: The Rocq Prover (Accessed in June, 2026), https://rocq-prover.org/
-
Tan, C., Zhao, C., Mu, S., Walfish, M.: Cobra: Making transactional key-value stores verifiably serializable. In: OSDI 2020. pp. 63–80. USENIX Association (2020), https://www.usenix.org/conference/osdi20/presentation/tan
-
Terry, D.: Replicated data consistency explained through baseball. Commun. ACM 56(12), 82–89 (2013). https://doi.org/10.1145/2500500
-
Weghorn, T., Liu, S., Sprenger, C., Perrig, A., Basin, D.A.: N-Tube: Formally Verified Secure Bandwidth Reservation in Path-Aware Internet Architectures. In: CSF '22. pp. 147–162. IEEE (2022). https://doi.org/10.1109/CSF54842.2022.9919646
-
Wei, H., Liu, S., Chen, Y.: Specifying and analyzing transactional consistency models with predicates (extended abstract) (2026), https://sccp-workshop.github.io/sccp26/papers/sccp26-consistency-models-predicates.pdf, presented at SCCP 2026
-
Wei, H., Xiao, J., Yang, N., Liu, S., Yin, Z., Chen, Y., Pan, A.: Boosting end-to-end database isolation checking via mini-transactions. In: ICDE 2025.
pp. 3998–4010. IEEE Computer Society (May 2025). https://doi.org/10.1109/ICDE65448.2025.00298
-
Weikum, G., Vossen, G.: Transactional Information Systems: Theory, Algorithms, and the Practice of Concurrency Control and Recovery. Morgan Kaufmann (2002)
-
Xiong, Q., Wei, H., Liu, S., Chen, Y., Ge, J.: Semantic conformance of concurrency control protocols under mixed isolation levels (2026), https://arxiv.org/abs/2607.16696
-
Xiong, S., Cerone, A., Raad, A., Gardner, P.: Data consistency in transactional storage systems: A centralised semantics. In: ECOOP 2020. LIPIcs, vol. 166, pp. 21:1–21:31. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2020). https://doi.org/10.4230/LIPICS.ECOOP.2020.21
-
Zhang, J., Ji, Y., Mu, S., Tan, C.: Viper: A fast snapshot isolation checker. In: EuroSys 2023. p. 654–671. ACM (2023). https://doi.org/10.1145/3552326.3567492
-
Zhou, Z., Liu, S., Zhou, Z., Wang, P., Zhang, M.: A formal framework for predicting distributed system performance under faults. In: Formal Methods: 27th International Symposium, FM 2026. p. 47–66. Springer-Verlag (2026). https://doi.org/10.1007/978-3-032-26204-2_3