Skip to content

Commits on Source 21

doc
html
.pc
*.aux
*.a
*.cma
*.cmi
*.cmo
*.cmx
*.cmxa
*.cmxs
*.glob
*.native
*.o
*.d
*.vio
*.vo
.coq-native
.merlin
Makefile.coq
Makefile.coq.conf
AAC_tactics 0.2-pl2 :
-----------------
- Improved the handling of nullifiable patterns.
AAC_tactics 0.2.1 :
-----------------
- backport of some debian patches (thanks to S. Glondu)
AAC_tactics 0.2 :
-----------------
- Several operators can share a given unit (like max and plus sharing zero)
- Added some support to rewrite in inequations (using inequations)
- Better priting functions for aac_instances
- Overhauled inference of morphisms and operators :
* Lift the previous requirement to have at leat one AC and one A operator
* Binary operations are infered before morphisms (hence List.assoc can be recognized as being Associative)
- Should now be able to handle goal with evars (but this is not unification modulo AC)
- Added several new instances of Associative and Commutative operators
- The old syntax to declare AC and A operators is no longer supported
- The tactics do not abstract the proof they built (was troublesome if evars appeared)
AAC_tactics 0.1 :
-----------------
Initial release
This diff is collapsed.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
The aac_tactics plugin library is free software: you can redistribute
Copyright (C) 2009-2018 Thomas Braibant, Damien Pous, Fabian Kunze
The AAC tactics plugin library is free software: you can redistribute
it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
......@@ -8,6 +10,168 @@ WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see
<http://www.gnu.org/licenses/>.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
-I .
-R . AAC_tactics
coq.mli
helper.mli
search_monad.mli
matcher.mli
theory.mli
print.mli
aac_rewrite.mli
coq.ml
helper.ml
search_monad.ml
matcher.ml
theory.ml
print.ml
aac_rewrite.ml4
aac.mlpack
AAC.v
Instances.v
Tutorial.v
Caveats.v
all: Makefile.coq
+make -f Makefile.coq all
+$(MAKE) -f Makefile.coq all
clean: Makefile.coq
+make -f Makefile.coq clean
rm -f Makefile.coq
+$(MAKE) -f Makefile.coq cleanall
rm -f Makefile.coq Makefile.coq.conf
Makefile.coq: Make
$(COQBIN)coq_makefile -f Make -o Makefile.coq
Makefile.coq: _CoqProject
$(COQBIN)coq_makefile -f _CoqProject -o Makefile.coq
Make: ;
_CoqProject Makefile: ;
%: Makefile.coq
+make -f Makefile.coq $@
+$(MAKE) -f Makefile.coq $@
.PHONY: all clean
aac_tactics
===========
Thomas Braibant & Damien Pous
Laboratoire d'Informatique de Grenoble (UMR 5217), INRIA, CNRS, France
FOREWORD
========
This plugin provides tactics for rewriting universally quantified
equations, modulo associativity and commutativity of some operators.
INSTALLATION
============
opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq-aac-tactics
DOCUMENTATION
=============
Please refer to Tutorial.v for a succinct introduction on how to use
this plugin.
To understand the inner-working of the tactic, please refer to the
.mli files as the main source of information on each .ml
file. Alternatively, [make world] generates ocamldoc/coqdoc
documentation in directories doc/ and html/, respectively.
File Instances.v defines several instances for frequent use-cases of
this plugin, that should allow you to use it out-of-the-shelf. Namely,
we have instances for:
- Peano naturals (Import Instances.Peano)
- Z binary numbers (Import Instances.Z)
- N binary numbers (Import Instances.N)
- P binary numbers (Import Instances.P)
- Rationnal numbers (Import Instances.Q)
- Prop (Import Instances.Prop_ops)
- Booleans (Import Instances.Bool)
- Relations (Import Instances.Relations)
- All of the above (Import Instances.All)
ACKNOWLEDGEMENTS
================
We are grateful to Evelyne Contejean, Hugo Herbelin, Assia Mahboubi
and Matthieu Sozeau for highly instructive discussions.
This plugin took inspiration from the plugin tutorial "constructors",
distributed under the LGPL 2.1, copyrighted by Matthieu Sozeau
# AAC tactics
[![Travis][travis-shield]][travis-link]
[![Contributing][contributing-shield]][contributing-link]
[![Code of Conduct][conduct-shield]][conduct-link]
[![Gitter][gitter-shield]][gitter-link]
[![DOI][doi-shield]][doi-link]
[doi-shield]: https://zenodo.org/badge/DOI/10.1007/978-3-642-25379-9_14.svg
[doi-link]: https://doi.org/10.1007/978-3-642-25379-9_14
[travis-shield]: https://travis-ci.com/coq-community/aac-tactics.svg?branch=master
[travis-link]: https://travis-ci.com/coq-community/aac-tactics/builds
[contributing-shield]: https://img.shields.io/badge/contributions-welcome-%23f7931e.svg
[contributing-link]: https://github.com/coq-community/manifesto/blob/master/CONTRIBUTING.md
[conduct-shield]: https://img.shields.io/badge/%E2%9D%A4-code%20of%20conduct-%23f15a24.svg
[conduct-link]: https://github.com/coq-community/manifesto/blob/master/CODE_OF_CONDUCT.md
[gitter-shield]: https://img.shields.io/badge/chat-on%20gitter-%23c1272d.svg
[gitter-link]: https://gitter.im/coq-community/Lobby
This Coq plugin provides tactics for rewriting universally quantified
equations, modulo associativity and commutativity of some operator.
The tactics can be applied for custom operators by registering the
operators and their properties as type class instances. Many common
operator instances, such as for Z binary arithmetic and booleans, are
provided with the plugin.
More details about the project can be found in the paper
[Tactics for Reasoning modulo AC in Coq](https://arxiv.org/abs/1106.4448).
## Meta
- Author(s):
- Thomas Braibant (initial)
- Damien Pous (initial)
- Fabian Kunze
- Coq-community maintainer(s):
- Fabian Kunze ([**@fakusb**](https://github.com/fakusb))
- Karl Palmskog ([**@palmskog**](https://github.com/palmskog))
- License: [GNU Lesser General Public License v3.0 or later](LICENSE)
- Compatible Coq versions: Coq 8.9 (use the corresponding branch or release for other Coq versions)
- Compatible OCaml versions: all versions supported by Coq
- Additional dependencies: none
## Building and installation instructions
The easiest way to install the latest released version is via
[OPAM](https://opam.ocaml.org/doc/Install.html):
```shell
opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq-aac-tactics
```
To instead build and install manually, do:
``` shell
git clone https://github.com/coq-community/aac-tactics
cd aac-tactics
make # or make -j <number-of-cores-on-your-machine>
make install
```
After installation, the included modules are available under
the `AAC_tactics` namespace.
## Documentation
The following example shows an application of the tactics for reasoning over Z binary numbers:
```coq
Require Import AAC_tactics.AAC.
Require AAC_tactics.Instances.
Require Import ZArith.
Section ZOpp.
Import Instances.Z.
Variables a b c : Z.
Hypothesis H: forall x, x + Z.opp x = 0.
Goal a + b + c + Z.opp (c + a) = b.
aac_rewrite H.
aac_reflexivity.
Qed.
End ZOpp.
```
The file [Tutorial.v](theories/Tutorial.v) provides a succinct introduction
and more examples of how to use this plugin.
The file [Instances.v](theories/Instances.v) defines several type class instances
for frequent use-cases of this plugin, that should allow you to use it off-the-shelf.
Namely, it contains instances for:
- Peano naturals (`Import Instances.Peano.`)
- Z binary numbers (`Import Instances.Z.`)
- N binary numbers (`Import Instances.N.`)
- P binary numbers (`Import Instances.P.`)
- Rational numbers (`Import Instances.Q.`)
- Prop (`Import Instances.Prop_ops.`)
- Booleans (`Import Instances.Bool.`)
- Relations (`Import Instances.Relations.`)
- all of the above (`Import Instances.All.`)
To understand the inner workings of the tactics, please refer to
the `.mli` files as the main source of information on each `.ml` file.
## Acknowledgements
The initial authors are grateful to Evelyne Contejean, Hugo Herbelin,
Assia Mahboubi, and Matthieu Sozeau for highly instructive discussions.
The plugin took inspiration from the plugin tutorial "constructors" by
Matthieu Sozeau, distributed under the LGPL 2.1.
-Q theories AAC_tactics
-Q src AAC_tactics
-I src
-arg -w -arg +default
src/coq.mli
src/helper.mli
src/search_monad.mli
src/matcher.mli
src/theory.mli
src/print.mli
src/aac_rewrite.mli
src/coq.ml
src/helper.ml
src/search_monad.ml
src/matcher.ml
src/theory.ml
src/print.ml
src/aac_rewrite.ml
src/aac.ml4
src/aac_plugin.mlpack
theories/Utils.v
theories/AAC.v
theories/Instances.v
theories/Tutorial.v
theories/Caveats.v
aac-tactics (8.8.0+1.gbp069dc3b-1) unstable; urgency=medium
** SNAPSHOT build @069dc3bd125ca18f5712759d54edcf9addb4cdd4 **
* Team upload
* New upstream release
* Build an unreleased snapshot to support Coq 8.9 (Closes: 919463)
-- Benjamin Barenblat <bbaren@debian.org> Sun, 17 Feb 2019 20:29:23 -0500
aac-tactics (8.6.1-2) unstable; urgency=medium
* Recompile with OCaml 4.05.0
......
......@@ -4,15 +4,15 @@ Priority: optional
Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
Uploaders: Stéphane Glondu <glondu@debian.org>
Build-Depends:
debhelper (>= 9),
debhelper (>= 10),
dh-ocaml (>= 0.9~),
ocaml-nox (>= 3.11.1-3~),
coq (>= 8.4dfsg-2~),
ocaml-nox (>= 4.02.3),
coq (>= 8.9.0),
libcoq-ocaml-dev
Standards-Version: 3.9.8
Standards-Version: 4.3.0
Homepage: https://github.com/coq-contribs/aac-tactics
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ocaml-maint/packages/aac-tactics.git
Vcs-Git: https://anonscm.debian.org/git/pkg-ocaml-maint/packages/aac-tactics.git
Vcs-Browser: https://salsa.debian.org/ocaml-team/aac-tactics
Vcs-Git: https://salsa.debian.org/ocaml-team/aac-tactics.git
Package: libaac-tactics-ocaml
Section: ocaml
......
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Packaged-By: Stéphane Glondu <glondu@debian.org>
Packaged-Date: Mon, 29 Nov 2010 23:40:57 +0100
Source: http://sardes.inrialpes.fr/~braibant/aac_tactics/
Source: https://github.com/coq-community/aac-tactics
Upstream-Contact: Thomas Braibant, Damien Pous
Files: *
......@@ -10,6 +8,7 @@ License: LGPL-3+
Files: debian/*
Copyright: 2010, Stéphane Glondu <steph@glondu.net>
2019, Google LLC
License: LGPL-3+
License: LGPL-3+
......
[DEFAULT]
pristine-tar = True
filter-pristine-tar = True
filter = [".travis.yml"]
usr/lib/coq/user-contrib/AAC_tactics/*.cmi
*.mli usr/lib/coq/user-contrib/AAC_tactics/
src/*.mli usr/lib/coq/user-contrib/AAC_tactics/
# aac.cmo is a pack
libaac-tactics-ocaml-dev: ocaml-dangling-cmi usr/lib/coq/user-contrib/AAC_tactics/aac.cmi
libaac-tactics-ocaml-dev: ocaml-dangling-cmi usr/lib/coq/user-contrib/AAC_tactics/aac_plugin.cmi
-rectypes
-I /usr/lib/coq/kernel -I /usr/lib/coq/proofs -I /usr/lib/coq/pretyping -I /usr/lib/coq/engine
-I src
-I /usr/lib/coq/kernel -I /usr/lib/coq/lib -I /usr/lib/coq/proofs -I /usr/lib/coq/pretyping -I /usr/lib/coq/engine
--include debian/libaac-tactics-ocaml-dev/usr/lib/coq
usr/lib/coq/user-contrib/AAC_tactics/aac_plugin.cma
usr/lib/coq/user-contrib/AAC_tactics/aac_plugin.cmx
usr/lib/coq/user-contrib/AAC_tactics/aac_plugin.cmxa