Formalisation of an Incremental Cycle Detection algorithm

This is a formalisation of an incremental cycle detection algorithm, which is a minor variant of the algorithm described in Section 2 of A New Approach to Incremental Cycle Detection and Related Problems by Bender, M. A., Fineman, J. T., Gilbert, S., & Tarjan, R. E. (2015).

NB: the aforementioned paper can alternatively be found on sci-hub. Note also that this is not the version that can be found on arXiv. The arXiv version is quite older and has not been updated with the latest improvements from the authors.

The development in this repository is described in our paper Formal Proof and Analysis of an Incremental Cycle Detection Algorithm, published at ITP'19.

OCaml library

API documentation

Interactive demo!

To install the library using opam:

opam pin incremental_cycles https://gitlab.inria.fr/agueneau/incremental-cycles.git

Building the proofs

Installing the dependencies

You need to have opam >= 2.0 installed.

Troubleshooting

For Option B, if the invocation fails at some point, either remove the _opam directory and re-run the command (this will redo everything), or do eval $(opam env) and then opam install -y --deps-only . (this will continue from where it failed).

Building

make proofs

Organisation of the development

OCaml implementation

The src/ directory contains the OCaml implementations that we verify.

Coq proofs

The proofs/ directory contains the Coq proofs.

Proofs directly relating OCaml functions to their specification
Generic auxiliary definitions, lemmas and tactics