(* Title: Rely-Guarantee Verification of the Circular Buffer Lock Author(s): Robert Colvin, Scott Heiner, Peter Hoefner, Roger Su Year: 2026 License: BSD 2-Clause Maintainer(s): Robert Colvin <r.colvin@uq.edu.au> Peter Hoefner <peter@hoefner-online.de> Roger Su <roger.c.su@proton.me> *) section ‹Circular Buffer Lock› text ‹The specification and proof of the Circular Buffer Lock, using the new specification of the queue.› theory Lock_Circular_Buffer imports Concurrent_Queue_Contract RG_Annotated_Methods begin type_synonym thread_id = nat type_synonym index = nat datatype flag_status = Pending | Granted consts NumThreads :: nat abbreviation ArraySize :: "nat" where "ArraySize ≡ NumThreads + 1" (*==================================================================*)