Giter Club home page Giter Club logo

relation-algebra's Introduction

Relation Algebra for Coq

Webpage of the project: http://perso.ens-lyon.fr/damien.pous/ra

DESCRIPTION

This Coq development is a modular library about relation algebra: those algebras admitting heterogeneous binary relations as a model, ranging from partially ordered monoid to residuated Kleene allegories and Kleene algebra with tests (KAT).

This library presents this large family of algebraic theories in a modular way; it includes several high-level reflexive tactics:

  • [kat], which decides the (in)equational theory of KAT;
  • [hkat], which decides the Hoare (in)equational theory of KAT (i.e., KAT with Hoare hypotheses);
  • [ka], which decides the (in)equational theory of KA;
  • [ra], a normalisation based partial decision procedure for Relation algebra;
  • [ra_normalise], the underlying normalisation tactic.

The tactic for Kleene algebra with tests is obtained by reflection, using a simple bisimulation-based algorithm working on the appropriate automaton of partial derivatives, for the generalised regular expressions corresponding to KAT.

Combined with a formalisation of KA completeness, and then of KAT completeness on top of it, this provides entirely axiom-free decision procedures for all model of these theories (including relations, languages, traces, min-max and max-plus algebras, etc...).

Algebraic structures are generalised in a categorical way: composition is typed like in categories, allowing us to reach "heterogeneous" models like rectangular matrices or heterogeneous binary relations, where most operations are partial. We exploit untyping theorems to avoid polluting decision algorithms with these additional typing constraints.

APPLICATIONS

We give a few examples of applications of this library to program verification:

  • a formalisation of a paper by Dexter Kozen and Maria-Cristina Patron. showing how to certify compiler optimisations using KAT.
  • a formalisation of the IMP programming language, followed by: 1/ some simple program equivalences that become straightforward to prove using our tactics; 2/ a formalisation of Hoare logic rules for partial correctness in the above language: all rules except the assignation one are proved by a single call to the hkat tactic.
  • a proof of the equivalence of two flowchart schemes, due to Paterson. The informal paper proof takes one page; Allegra Angus and Dexter Kozen gave a six pages long proof using KAT; our Coq proof is about 100 lines.

INSTALLATION

Run 'make' to compile the library, and 'make install' to install it. Latest version compiles with Coq 8.8.2

DOCUMENTATION

Each module is documented, see index.html or http://perso.ens-lyon.fr/damien.pous/ra for:

  • a description of each module's role and dependencies
  • a list of the available user-end tactics
  • the coqdoc generated documentation.

LICENSE

This library is distributed under the terms of the GNU Lesser General Public License version 3. See files LICENSE and COPYING.

AUTHORS

  • Main author

    • Damien Pous (2012-), CNRS - LIP, ENS Lyon (UMR 5668), France
  • Additional authors

    • Christian Doczkal (2018-), CNRS - LIP, ENS Lyon (UMR 5668), France
    • Insa Stucke (2015-2016), Dpt of CS, University of Kiel, Germany
    • Coq development team (2013-)

relation-algebra's People

Contributors

damien-pous avatar herbelin avatar letouzey avatar mattam82 avatar maximedenes avatar ppedrot avatar

Watchers

 avatar  avatar

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.