English

Recursive Mutexes in Separation Logic

Programming Languages 2026-02-02 v1 Logic in Computer Science

Abstract

Mutexes (i.e., locks) are well understood in separation logic, and can be specified in terms of either protecting an invariant or atomically changing the state of the lock. In this abstract, we develop the same styles of specifications for \emph{recursive} mutexes, a common variant of mutexes in object-oriented languages such as C++ and Java. A recursive mutex can be acquired any number of times by the same thread, and our specifications treat all acquires/releases uniformly, with clients only needing to determine whether they hold the mutex when accessing the lock invariant.

Keywords

Cite

@article{arxiv.2601.22557,
  title  = {Recursive Mutexes in Separation Logic},
  author = {Ke Du and William Mansky and Paolo G. Giarrusso and Gregory Malecha},
  journal= {arXiv preprint arXiv:2601.22557},
  year   = {2026}
}