Skip to main content
QUICK REVIEW

[Paper Review] Verifying Lock-Free Search Structure Templates

Nisarg Patel, Dennis Shasha|arXiv (Cornell University)|Jan 1, 2024
Logic, programming, and type systemsComputer Science1 citations
TL;DR

This paper presents a modular, parametric framework for verifying lock-free search structure templates—specifically for skiplists and linked lists—using concurrent separation logic (Iris). It introduces a mechanized proof technique based on hindsight reasoning with prophecy tracking to handle future-dependent linearization points, reducing proof effort by 53% compared to prior methods. The approach enables formal verification of multiple existing and novel lock-free algorithms in one unified proof, including the first fully verified lock-free skiplist of unbounded height.

ABSTRACT

We present and verify template algorithms for lock-free concurrent search structures that cover a broad range of existing implementations based on lists and skiplists. Our linearizability proofs are fully mechanized in the concurrent separation logic Iris. The proofs are modular and cover the broader design space of the underlying algorithms by parameterizing the verification over aspects such as the low-level representation of nodes and the style of data structure maintenance. As a further technical contribution, we present a mechanization of a recently proposed method for reasoning about future-dependent linearization points using hindsight arguments. The mechanization builds on Iris' support for prophecy reasoning and user-defined ghost resources. We demonstrate that the method can help to reduce the proof effort compared to direct prophecy-based proofs.

Motivation & Objective

  • To develop a modular, parametric template for verifying a broad class of lock-free search structures, including skiplists and linked lists.
  • To address the challenge of verifying linearizability in lock-free data structures with future-dependent and external linearization points.
  • To formalize and mechanize hindsight reasoning in the Iris concurrent separation logic framework for scalable, reusable proofs.
  • To reduce proof effort compared to direct prophecy-based reasoning by leveraging user-defined ghost resources and temporal interpolation.
  • To demonstrate the framework's applicability by verifying known algorithms (e.g., Herlihy-Shavit, Michael, Harris) and generating new correct-by-construction variants.

Proposed method

  • The framework uses parametric template algorithms that abstract over node representation, maintenance style (eager vs. lazy), and operation order on higher levels.
  • Linearizability proofs are mechanized in Iris, a foundational concurrent separation logic with support for prophecy reasoning and ghost resources.
  • A novel formalization of hindsight reasoning is developed, enabling inference about past states using temporal interpolation and prophecy resolution.
  • Helper functions like markNode and changeNext are specified with atomic triples that integrate prophecy resolution and update tracking.
  • The framework reuses and extends prior work on multicopy templates, applying hindsight reasoning to reduce proof complexity.
  • The proof strategy uses past operators (⟪s,t₀⟫) to reason about state history and establish linearization points post-hoc.

Experimental results

Research questions

  • RQ1Can a single, modular template algorithm be used to verify a wide range of lock-free search structure implementations, including skiplists and linked lists?
  • RQ2How can future-dependent linearization points in lock-free data structures be formally reasoned about using proof techniques that do not require prior knowledge of execution outcomes?
  • RQ3To what extent can hindsight reasoning with prophecy tracking reduce proof effort compared to direct prophecy-based proofs in Iris?
  • RQ4Can the proposed framework verify known lock-free algorithms (e.g., Herlihy-Shavit, Michael, Harris) and generate new correct-by-construction variants?
  • RQ5Is it possible to achieve full mechanization of linearizability proofs for unbounded-height lock-free skiplists in a foundational program logic?

Key findings

  • The framework successfully verifies the Herlihy-Shavit skiplist, Michael set, and Harris list algorithms as instantiations of the same template.
  • The mechanized hindsight reasoning technique reduces proof effort by 53% when re-verifying multicopy template algorithms compared to prior tailor-made proofs.
  • The first formal verification of a fully functional, unbounded-height lock-free skiplist is achieved using this framework.
  • The use of user-defined ghost resources and prophecy reasoning enables modular, composable proofs that scale across algorithm variants.
  • The framework supports the generation of new, correct-by-construction lock-free skiplist algorithms through parameter instantiation.
  • The formalization of hindsight reasoning in Iris is the first foundational program logic-level mechanization of this technique, enabling reusable and extensible verification.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.