On Library Correctness under Weak Memory Consistency (artifact)
This artifact contains Coq formalizations of some proofs presented in the paper.
We provide the artifact in two forms:
Please note that the compilation requires 8 GB of RAM.
In case you do not have that much RAM avalilable,
you should be able to compile all the files except ImplLockedQueue2.v
.
Organization of the Coq development:
-
The directory
hahn
contains a helper library for manipulating lists and
binary relations. More information on this library can be found on
https://github.com/vafeiadis/hahn.
-
The part of the development corresponding to the paper is contained in the
wlib
directory. This directory contains the following files.
-
Language.v
and LangSemantics.v
These files contain the definition of the programing language and its
semantics. In the paper, the programing language is introduced in §2,
and its semantics in §3.
-
ExpandFcall.v
This file contains basic facts regarding the expansion of function calls
in our programming language.
-
Operations.v
This file contains the definition of the data type used to represent
function calls in our programming language. The name of the data type is
operation.
-
LibBase.v
This file contains formalization of §4.1 of the paper. Here you can find
the definitions of library specification, execution, encapsulation, and
consistency.
-
ImplBase.v
This file contains the formalization of the modularity theorem (Theorem 1
in the paper), and provides the general framework for proving correctness
of library implementations. (§4.2 in the paper.)
-
LibC11.v
This file contains formulation of RC11 in terms of our library framework.
We use this library as the base library on top of which we build all
other implementations. (See Remark 1 in the paper.)
-
LibReg.v
This file contains formalization of the Example 1.
-
LibLock.v
and ImplLock.v
These files contain the specification of the mutex library (see §5.1),
and the correctness proof for the spinlock implementation.
-
LibExchanger.v
This file contains the specification of the exchanger library (§5.2).
-
LibQueue.v
, ImplLockedQueue.v
, and ImplLockedQueue2.v
These files contain the (strong) queue specification (§5.3), and the
correctness proof for the globally locked queue implementation.
-
LibStack.v
This file contains the specification of the stack library (§5.4).
-
impl_resources.v
This file contains some helper lemmas used in the correctness proofs (Impl*.v
files).