Verifying Isolation Levels of Database Implementations for Free Using Separation Logic

๐Ÿ“… 2026-07-17
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
Existing database implementations lack formal verification of isolation-level semantics. This work proposes a novel approach based on separation logic that directly encodes isolation levels from transactional consistency models as logical specifications, enabling comprehensive modeling and verification of all possible executions of both the database and its clients. For the first time, this method yields โ€œfree-theoremโ€-style formal guarantees for isolation levels: any implementation adhering to the specification automatically satisfies the corresponding isolation semantics. The entire theory has been mechanized in the Rocq proof assistant, yielding an end-to-end formally verified framework for reasoning about the correctness of database isolation levels, thereby substantially strengthening guarantees of system reliability.
๐Ÿ“ Abstract
Modern databases are highly concurrent and provide transactions as a mean of grouping several database operations into atomically applied units. Database vendors and software engineers use isolation levels to describe the consistency guarantees of transactions. The popular isolation levels give weak guarantees, with intricate semantics, to optimize performance of applications. The problem of assuring that database implementations actually implement the isolation level guarantees that application developers build their systems upon has received a great deal of attention from the testing community. But until now, there exists no method for formally verifying that a database implementation actually implements the isolation level that database vendors says it provides. In this paper, we present a method for verifying that a database implements an isolation level: we derive isolation levels directly, as formalized in transactional consistency models by the database community, from the structure of separation logic specifications. By doing so, we consider all program executions that a database and arbitrary clients of the database could produce. The result is a so-called free theorem meaning that any database implementation, whose operations are verified against a specific set of separation logic specifications, actually implements its isolation level. As all proofs in this paper are mechanized in the Rocq proof assistant and build upon a detailed semantic model of program execution, we believe this contribution raises the bar for the achievable robustness of databases.
Problem

Research questions and friction points this paper is trying to address.

isolation levels
database verification
formal verification
transactional consistency
separation logic
Innovation

Methods, ideas, or system contributions that make the work stand out.

separation logic
isolation levels
formal verification
free theorems
transactional consistency
๐Ÿ”Ž Similar Papers