Giter Site home page Giter Site logo

ssrbit's Introduction

A library for Bit Sequences and Bit Sets

This library implements modular arithmetic and logical operations over bit sequences. It adopts a data-refinement approach, through which one can switch between proof-oriented and computation-oriented implementations. In particular, it establishes a refinement between SSR finset library and bitsets. Finally, it provides a trustworthy extraction to OCaml, using exhaustive testing for 8 and 16bits integers.

See the main file for documentation.

Installation

ssrbit has been implemented in Coq.8.5.2/SSR.1.6 and depends on two libraries in development version:

Both librairies are included as git submodules in the lib directory.

To retrieve the submodules:

$ cd $SSRBIT_DIR
$ git submodule init
$ git submodule update

To build a self-contained installation of ssrbit, we recommend installing an ad-hoc opam directory:

$ cd $SSRBIT_DIR
$ mkdir opam
$ opam init --root=opam
$ eval `opam config env --root=$SSRBIT_DIR/opam`
$ opam repo add coq-released https://coq.inria.fr/opam/released 
$ opam install -j4 coq.8.5.2 coq-mathcomp-algebra.1.6

To install paramcoq:

$ cd $SSRBIT_DIR/lib/paramcoq
$ make && make install

To install CoqEAL:

$ cd $SSRBIT_DIR/lib/CoqEAL/theory
$ make && make install 
$ cd $SSRBIT_DIR/lib/CoqEAL/refinements
$ make && make install 

To build ssrbit:

$ cd $SSRBIT_DIR
$ make

To benchmark the n-queens code:

$ cd $SSRBIT_DIR
$ make bench

$ perf record --call-graph=dwarf -- ./queens_driver.native
$ perf report

References

This library supersedes the implementation described in

"From Sets to Bits in Coq", Arthur Blot, Pierre-Evariste Dagand, Julia Lawall

With code available at:

In particular, the formalisation of bit vectors (ie. tuples of booleans) is obtained by canonical lifting of the corresponding (untyped) implementation on bit sequences (ie. lists of booleans) rather than directly working on tuples, as was the case in coq-bits.

Other interesting references are:

Acknowledgments

ssrbit has been developed at the Centre de Recherche en Informatique of MINES ParisTech (former École de Mines de Paris) and in LIP6/CNRS/Inria Paris. It is partially supported by the FEEVER project and the Emergence(s) 2015 program.

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.