Compositional Verification of Concurrency Using Past-Time Temporal Epistemic Logic
Hamed Nemati, Mads Dam
TL;DR
The paper introduces a past-time temporal epistemic logic with perfect-recall histories to reason about shared-memory concurrency from a thread's local perspective. It develops a formal interleaving semantics, a sound sequent-style proof system, and a concrete instantiation with instrumented reads, enabling local knowledge-based reasoning that yields global safety results. A key contribution is the locality of reasoning via the Prev operator and stability concepts, which together support a rely-guarantee style approach embedded directly in the logic. The Peterson mutual exclusion proof illustrates how local knowledge about a thread's last step, combined with environmental stability, implies global invariants and mutual exclusion; the framework also supports compositional reasoning and model-constraint explanations for relies and guarantees. This approach offers a modular path to correctness proofs in concurrent programs and lays groundwork for automation and integration with existing rely-guarantee and separation-logic techniques.
Abstract
Shared-memory concurrency is difficult to reason about because each thread executes under interference from other threads. At the same time, many correctness arguments for classic algorithms are epistemic: a thread enters a critical region only when, from its local view, it can rule out that another thread is concurrently in that region. We make such arguments explicit by introducing a past-time temporal epistemic logic interpreted over interleaving executions with perfect-recall local histories. Past-time operators support "since" reasoning, while epistemic modalities capture what a given thread can conclude from its own observation history. We give semantics and a sound proof system, instantiate the logic to a simple shared-memory language with instrumented read/write observations, and illustrate the approach on Peterson's mutual exclusion algorithm by proving a local knowledge condition that implies mutual exclusion.
