arXiv:2610.07665cs.DBOct 2026

Manuscript Offprint

arXiv:2610.07665

Mechanizing Transactional Anomalous Patterns for Weak Isolation Levels

Long Gu, Si Liu, Hengfeng Wei

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Long Gu 1^{1}, Si Liu 2∗^{2*}, and Hengfeng Wei 3^{3}

1^{1} Nanjing University

2^{2} The Chinese University of Hong Kong, Shenzhen

3^{3} 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. 4^{4} 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. 5^{5}

Notably, the mechanization process revealed two subtle issues in the original presentation of Plume:

  1. 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).

  2. 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

4^{4} 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.

5^{5} Our Rocq development is publicly available at https://github.com/dracooooo/Plume/tree/main/Mechanization.

Figure

Fig.1: A hierarchy of prevalent database isolation levels. The four HAT-compatible ones are highlighted. I→I′I \rightarrow I': I is strictly weaker than I′I'.

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.

References (42)