Giter Club home page Giter Club logo

stdpp's Introduction

Coq-std++ [coqdoc]

This project contains an extended "Standard Library" for Coq called coq-std++. The key features of this library are as follows:

  • It provides a great number of definitions and lemmas for common data structures such as lists, finite maps, finite sets, and finite multisets.
  • It uses type classes for common notations (like , , and Haskell-style monad notations) so that these can be overloaded for different data structures.
  • It uses type classes to keep track of common properties of types, like it having decidable equality or being countable or finite.
  • Most data structures are represented in canonical ways so that Leibniz equality can be used as much as possible (for example, for maps we have m1 = m2 iff ∀ i, m1 !! i = m2 !! i). On top of that, the library provides setoid instances for most types and operations.
  • It provides various tactics for common tasks, like an ssreflect inspired done tactic for finishing trivial goals, a simple breadth-first solver naive_solver, an equality simplifier simplify_eq, a solver solve_proper for proving compatibility of functions with respect to relations, and a solver set_solver for goals involving set operations.
  • It is entirely dependency- and axiom-free.

Side-effects

Importing std++ has some side effects as the library sets some global options. Notably:

  • Generalizable All Variables: This option enables implicit generalization in arguments of the form `{...} (i.e., anonymous arguments). Unfortunately, it also enables implicit generalization in Instance. We think that the fact that both behaviors are coupled together is a bug in Coq.
  • The behavior of Program is tweaked: Unset Transparent Obligations, Obligation Tactic := idtac, Add Search Blacklist "_obligation_". See base.v for further details.
  • It blocks simpl on all operations involving integers Z (by setting Arguments op : simpl never). We do this because simpl tends to expose the internals of said operations (e.g. try simpl on Z.of_nat (S n) + y). As a consequence of blocking simpl, due to Coq bug #5039 the omega tactic becomes unreliable. We do not consider this an issue since we use lia (for which the aforementioned Coq bug was fixed) instead of omega everywhere.

Prerequisites

This version is known to compile with:

  • Coq version 8.8.2 / 8.9.1 / 8.10.2 / 8.11.2 / 8.12.0

Installing via opam

To obtain the latest stable release via opam (2.0.0 or newer), you have to add the Coq opam repository:

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

Then you can do opam install coq-stdpp.

To obtain a development version, add the Iris opam repository:

opam repo add iris-dev https://gitlab.mpi-sws.org/iris/opam.git

Building from source

Run make -jN in this directory to build the library, where N is the number of your CPU cores. Then run make install to install the library.

Contributing to std++

If you want to report a bug, please use the issue tracker. You will have to create an account at the MPI-SWS GitLab (use the "Register" tab).

To contribute code, please send your MPI-SWS GitLab username to Ralf Jung to enable personal projects for your account. Then you can fork the Coq-std++ git repository, make your changes in your fork, and create a merge request.

Common problems

On Windows, differences in line endings may cause tests to fail. This can be fixed by setting Git's autocrlf option to true:

git config --global core.autocrlf true

stdpp's People

Contributors

robbertkrebbers avatar mackieloeffel avatar jhjourdan avatar blaisorblade avatar tchajed avatar co-dan avatar ralfjung avatar paldepind avatar armael avatar swasey avatar izgzhen avatar janno avatar amintimany avatar mansky1 avatar simonspies avatar rlepigre avatar ppedrot avatar devilhena-paulo avatar olaure01 avatar maximedenes avatar jakobbotsch avatar herbelin avatar gmalecha avatar skyskimmer avatar ildyria avatar atrieu avatar

Watchers

James Cloos avatar  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.