We developed the following abstractions, and employed them in our type-based concurrent model.
- Resources; which are a special form of state transition systems that we use as part of types of concurrent programs.
- Resource morphisms; which are a notion of function types. A resource morphism transports a program verified over domain resource to the range resource.
- Resource simulations; used to reason about morphed programs. The simulations feature in a novel inference rule that typechecks an application of a resource morphism to a program.
- Partial Commutative Monoids. PCMs have been used in prior work to formalize ghost state in separation logic. We developed the associated notions of PCM morphisms and associated separating relations that serve as the morphism preconditions.
- Linearizable resources; we combined the theories of resources, PCMs, and their morphism to formalize linearizability. We also developed special mathematical constructions that form the beginning of the algebra of linearizable resources.
- Visibility relations. We observed that the most common way linearizability proofs are given today is operational, as it involves describing the line of code that constitutes the linearization points (LP) for each method of the verified structure. Being operational, the approach lacks power of mathematical abstraction. We have thus considered a declarative way of proving linearizability by axiomatizing the dependence (i.e. visibility) relations between the methods. We developed a generic and systematic approach to obtain declarative concurrent axiomatizations starting from sequential ones. We applied it to verify challenging concurrent structures: RDCSS and MCAS, timestamped stack, and three Janati snapshot algorithms. In all cases, we obtained high-level proofs that apply to several different implementations.
- In a cross-over application, we considered how our stateful type theory can be generalized to an abstract notion of algebraic effects. We developed a modal type system, where types keep track of the signature for the algebraic effect. We built on the prior work on Contextual Modal Type Theory (CMTT), thereby establishing a surprising and useful connection between modal type theories and algebraic effects. The connection enabled us to transfer an idea that existed in the field of modal types, and apply it to solve one of they key challenges in algebraic effects.
The development of resources fits in the WP1 of the proposal. The development of resource morphisms and simulations is in WP2. A paper describing these notions in detail has been published at the OOPSLA 2019 conference.
The development of the algebra of PCMs is in WP3. A paper describing PCM algebra has been published at POPL 2021 conference.
The work on declarative proofs of linearizability is in WP4, and has been published at ECOOP 2017, OOPSLA 2020, and POPL 2022 conferences.
The work on algebraic effects is in WP5, and has been published at ICFP 2021.
The work on the systematic axiomatization of visibility straddles WP3 and WP4, and is currently in submission to CONCUR 2023
The algebra of linearizable resources is in WP2 and WP3. It is currently available as a library mechanized in Coq, but has not yet been prepared for publication.
We have applied the above mathematics to formally verify some representative and challenging benchmark examples such as: concurrent stack data structures, several different variant of locks including a flat combiner structure, some non-linearizable data structures, and concurrent graph structures. All of these have been verified formally in our extension of the Coq theorem prover with concurrency, and we have made the software artifacts publicly available. All of the mechanization work fits into WP6.
For example, the library for formally reasoning about PCMs has been released as a stand-alone package, as it has applications beyond our project:
https://sympa.inria.fr/sympa/arc/coq-club/2018-04/msg00111.html(se abrirá en una nueva ventana)The meta theory behind the designed system, as well as all the examples, are available on-line at the project's public website.