This artifact provides the supplementary Coq development for the Relaxed Memory Concurrency Re-executed paper.
The overall structure of Coq development in src
folder is as follows:
lib
contains various auxillary definitions and lemmas for the projectreordering
contains the proof that reordering transformation is consistent in XMMtraces
contains various properties and definitions for connecting graphs to tracesxmm
contains the basic deifinitions and properties of the modelxmm_cons
contains proofs for the consistency properties
- Definitions of labels (Def 3.1), events (Def 3.2), execution graphs (Def 3.3) and their well-formedness predicate (Def 3.3 too) are provided by the
imm
package. - We define the execution graph constructions rules, along with concepts such as "rf-completeness" (Def 3.5) and "well formed configuration" (Def 3.6) in
src/xmm/Core.v
.- This includes the step deltas (See figure 3.4)
- A sanity-check proof that a well-formed graph is well-formed after
add_event
can be found insrc/xmm/AddEventWf.v
. - The proof for multistep lemma (Lm 3.1) can be found in
src/xmm/SubToFullExec.v
under the namesub_to_full_exec
. - Definitions of graphs embdedding (Def 3.7) and the
StableUncommittedReads
predicate (Def 3.8) are located insrc/xmm/Core.v
too. - The proof for listless multistep lemma (Lm 3.2) can be found in
src/xmm/SubToFullExec.v
under the namesub_to_full_exec_listless
. - The definition of
RC20
consistency can be found insrc/xmm/Core.v
as theWCore.is_cons
predicate.- The
hb
andsw
relations are acquired fromimm
. - The
rpo
andrhb
relation definitions can be found insrc/xmm/Rhb.v
.
- The
- The definition of the
srf
relation (Def 3.11) along some of its properties can be found insrc/xmm/Srf.v
.
- The proofs of all consistency predicate properties is located in the
xmm_cons
direcotry- The monotonicity (Lm B.7) is proven in
src/xmm_cons/ConsistencyMonotonicity.v
- The maximal read extensibility (Lm B.8) is proven in
src/xmm_cons/ConsistencyReadExtensibility.v
- The maximal write extensibility (Lm B.9) is proven in
srx/xmm_cons/ConsistencyWriteExtensibility.v
- Some common consistency lemmas are proven in
src/xmm_cons/ConsistencyCommon.v
- The monotonicity (Lm B.7) is proven in
- The proof for consistency of the reordering transformation with XMM is located inside the
reordering
directory- The simulation relation (Def E.32) is located in
src/reordering/ReordSimrel.v
along with a "Step Invariant" predicate, which is expected to be preserved by the target graph after each step. - The proof of simulation relation for init graphs (Lm E.25) is located in
src/reordering/ReordSimrelInit.v
along with the proof that init graphs satisfy the "Step Invariant". - The "not a, not b" step (Lm E.27) is proven in
src/reordering/ReordExecNaNb.v
. - The "b" step (Lm E.28) is proven in
src/reordering/ReordExecB.v
. - The "a" step (Lm E.29) is proven in
src/reordering/ReordExecA.v
. - The "rexec" step (Lm E.30) is provne in
src/reordering/ReordReexec.v
.
- The simulation relation (Def E.32) is located in
- Additional files in the xmm directory include:
- Some common simulation relation properties in
src/xmm/SimrelCommon.v
- Some useful properties of the step deltas in
src/xmm/StepOps.v
- A shortcut lemma for proving less goals when we know in advance that the graph acquired after adding an event is well-formed
- Some common simulation relation properties in
- List of files in
lib
src/lib/AuxDef.v
provides extra definitions like function surjectivity (without any related proofs).src/lib/AuxInj.v
provides extra lemmas about mapping relations and sets with injective functions.src/lib/AuxRel.v
andsrc/lib/AuxRel2.v
provide various handy rewrite lemmas without any particular subject.src/lib/ExecEquiv.v
provides the definition of execution equivalence, which is equivalent to definitional execution equality under the assumptions of classic logic.src/lib/HahnTotalListEx.v
provides extra lemmas for working with the total order induced by a list.src/lib/HbPrefix.v
provides a handy (for avoiding recursive definitions) lemma for computing the view-front relation (vf
) in smaller graphs by removing some "happens-after events".src/lib/Instructions.v
provides a weak universal abstraction of program instructions.src/lib/PorfPrefix.v
provides simpler but more constraining lemmas for computing the `view-front relation in smaller graphs by removing the po-rf suffix.
The following statements are planned to be supported (in order of priority)
- The following statements from the reordering transformation
- Reordering reexecution step lemma (Lm E.2.30 )
- Reordering simulation relation implying consistency (Lm E.2.31)
- The lemma about simulating any sequence of steps from target graph in source graph (Lm E.2.26)
- The reordering theorem (Th E.2.5)
- Proof of consistency sequentilisation transformation in XMM
- Other consistency properties
- same-read extensibility (Lm B.11)
- overwrite extensibility (Lm B.10)