Giter VIP home page Giter VIP logo

tarjan's Introduction

Tarjan and Kosaraju

Docker CI Contributing Code of Conduct Zulip

This development contains formalizations and correctness proofs, using Coq and the Mathematical Components library, of algorithms originally due to Kosaraju and Tarjan for finding strongly connected components in finite graphs. It also contains a verified implementation of topological sorting with extended guarantees for acyclic graphs.

Meta

Building and installation instructions

The easiest way to install the latest released version of Tarjan and Kosaraju is via OPAM:

opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq-mathcomp-tarjan

To instead build and install manually, do:

git clone https://github.com/coq-community/tarjan.git
cd tarjan
make   # or make -j <number-of-cores-on-your-machine> 
make install

Main files

Extra library files

  • bigmin.v: extra library to deal with \min(i in A) F i
  • extra.v: naive definitions of strongly connected components and various basic extentions of mathcomp libraries on paths and fintypes
  • acyclic.v: definition of acyclic graphs and proof that acyclicity can be determined by knowing strongly connected components

Proof of Kosaraju strongly connected component algorithm

  • kosaraju.v: proof of topological sorting and Kosaraju connected component algorithm
  • acyclic_tsorted.v: properties of topological sorting in acyclic graphs

Proofs of Tarjan strongly connected component algorithm (independent from each other)

  • tarjan_rank.v: proof with rank
  • tarjan_rank_bigmin.v: same proof but with a \min_ instead of multiple inequalities on the output rank
  • tarjan_num.v: same proof as tarjan_rank_bigmin.v but with serial numbers instead of ranks
  • tarjan_nocolor.v: new proof, with ranks and without colors, less fields in environement and less invariants, preconditions and postconditions.
  • tarjan_nocolor_optim.v: same proof as tarjan_nocolor.v, but with the serial number field of the environement restored, and passing around stack extensions as sets

tarjan's People

Contributors

clayrat avatar cohencyril avatar palmskog avatar proux01 avatar thery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tarjan's Issues

Release version 1.0.1 ?

Hi there!
Since last release there was a non backward compatible renaming Kosaraju.v --> kosaraju.v in this commit.
Also, recent PR updated tarjan to be compatible with recent versions of mathcomp.

Would it make sense to accumulate these changes into new minor release and also publish it to opam-coq-archive?

Update for Coq 8.15 + mathcomp 1.14

It compiles locally for this combination, and I've modified the meta.yml, but I wonder what should the docker matrix be? Having the following seems a bit of an overkill:

image:
  - 'mathcomp/mathcomp-dev:coq-dev'
  - 'mathcomp/mathcomp-dev:coq-8.15'
  - 'mathcomp/mathcomp-dev:coq-8.14'
  - 'mathcomp/mathcomp-dev:coq-8.13'
  - 'mathcomp/mathcomp-dev:coq-8.12'
  - 'mathcomp/mathcomp-dev:coq-8.11'
  - 'mathcomp/mathcomp:1.14.0-coq-8.15'
  - 'mathcomp/mathcomp:1.14.0-coq-8.14'
  - 'mathcomp/mathcomp:1.14.0-coq-8.13'
  - 'mathcomp/mathcomp:1.14.0-coq-8.12'
  - 'mathcomp/mathcomp:1.14.0-coq-8.11'
  - 'mathcomp/mathcomp:1.13.0-coq-8.15'
  - 'mathcomp/mathcomp:1.13.0-coq-8.14'
  - 'mathcomp/mathcomp:1.13.0-coq-8.13'
  - 'mathcomp/mathcomp:1.13.0-coq-8.12'
  - 'mathcomp/mathcomp:1.13.0-coq-8.11'
  - 'mathcomp/mathcomp:1.12.0-coq-8.14'
  - 'mathcomp/mathcomp:1.12.0-coq-8.13'
  - 'mathcomp/mathcomp:1.12.0-coq-8.12'
  - 'mathcomp/mathcomp:1.12.0-coq-8.11'
  - 'mathcomp/mathcomp:1.12.0-coq-8.10'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.