This repository contains the Coq mechanisation of the Arm-A instance of AxSL, an Iris-based program logic for Arm-A relaxed concurrency.
The project can be compiled using the OCaml building system dune with required denpendencies installed.
The building scripts are organised into dune-project and severnal dune files.
Refer to INSTALL.md for more information on building it in a Docker environment or
manually.
The Coq development is organised into two subdirectories.
The theories directory contains the primary Coq development of the work, including:
-
lang: This directory contains definitions of instructions, the Arm memory model, and our opax semantics.lang/instrs.vdefines the semantics of instructions using the outcome interface.lang/mm.v(combined withCandidateExecutions.v) defines the (user) Arm memory model.lang/opsem.vdefines the opax semantics.
-
algebra: This directory includes most of the ghost state constructions for the logical assertions ofAxSL. -
low: This directory contains the definition of weakest preconditions, the soundness proof of low-level proof rules, and the adequacy theorem.low/weakestpre.vdefines the base weakest precondition that is parameterised by the implementation of state interpretation. It also contains the definition of flow implications.low/instantiation.vandlow/*_res.vcontains the instantiation of the base weakest precondition with a specific state interpretation implementation.low/rules/*.vcontain base proof rules and their soundness proofs.low/lifting.vandlow/adequacy.vcontain the adequacy proof with respect to the base weakest precondition.
-
middle: This directory contains the proof rules for all microinstructions and abstraction layers.middle/weakestpre.vdefines an abstraction layer based on low-level weakest preconditions.middle/rules.vcontains proof rules for some instructions and their soundness proofs (utilising the results oflow/rules/*.v).middle/excl.vcontains our solution for supporting exclusives.middle/specialised_rules.vcontains proof rules for specific instructions used in verified examples and their soundness proofs.
-
examples: This directory contains the examples.examples/lb/includes four variants of load-buffering and their proofs.examples/mp/contains four variants of message-passing and their proofs.examples/isa2/contains a variant of ISA2 and its proofs.examples/co/contains two coherence examples and their proofs.examples/try_lock/contains an implementation of try lock using exclusives, a mutual exclusion example using the lock, and their proofs.
The system-semantics directory contains the Coq infrastructure used to define and reason about
memory models, including:
-
ISASem: This directory contains the ISA semantics interface that models may use.ISASem/Interface.vdefines the main concurrency interface.ISASem/ArmInst.vandISASem/SailArmInstTypes.vtogether define the Arm instantiation of the interface, which is used to define the Arm memory model.
-
Common: This directory contains standard-library-like features, support type definitions, and automation helpers.Common/GRel.vcontains an implementation of relations and operations for relation algebra.