coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: Math Prover <mathprover AT gmail.com>
- Cc: Kenneth Adam Miller <kennethadammiller AT gmail.com>, coq-club Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] coverage tool
- Date: Fri, 21 Jun 2013 14:57:21 -0400
Math Prover: If lem_X is used as a hint by auto/crush, then it must appear somewhere else in a "Hint" statement, except in the case that it is declared as an Instance rather than as a Definition or Lemma (in which case it is automatically added to the typeclass_instances database).
I think the python scripts I wrote to minimize a buggy file (at https://github.com/JasonGross/coq-bug-finder) can be used for this. In particular, it shouldn't take me more than 0.5-2 hours to write a script that will print out all of the definitions, lemmas, etc. of all files included into a particular file which are not referenced after some point. (Note that it only checks things by name, and so if you have overlapping names, it might get confused. It's also recursive, in that if you have Lemma A referencing
Lemma B, but Lemma A is unreferenced, then Lemma B also counts as unreferenced, unless Lemma A appears after the cut-off point. If you want, I can change this, too.) If you want me to, I can do this in the next few days, or you can try it yourself (the relevant bit is "try_remove_definitions" in find-bug.py). If you want me to do it, I'd need a clearer idea of what you want to do, and possibly an example repository (for example, it currently doesn't deal well with nested directory structure).
Lemma B, but Lemma A is unreferenced, then Lemma B also counts as unreferenced, unless Lemma A appears after the cut-off point. If you want, I can change this, too.) If you want me to, I can do this in the next few days, or you can try it yourself (the relevant bit is "try_remove_definitions" in find-bug.py). If you want me to do it, I'd need a clearer idea of what you want to do, and possibly an example repository (for example, it currently doesn't deal well with nested directory structure).
-Jason
On Fri, Jun 21, 2013 at 9:38 AM, Math Prover <mathprover AT gmail.com> wrote:
I think the problem here is
Therefore, an emacs module that merely parses the *.v file won't
> "I put lemmas in hint databases"
suffice, because it's possible that there is some Lemma lem_X, where:
*) the name lem_X does not appear anywhere else
*) however lem_X is used as as rewrite/resolve hint used by auto/crush
On Fri, Jun 21, 2013 at 6:35 AM, Kenneth Adam Miller
<kennethadammiller AT gmail.com> wrote:
> You could write a definition for the coq language using Semantic in Emacs
>
> http://www.gnu.org/software/emacs/manual/html_node/emacs/Semantic.html
>
> Semantic goes the extra mile in extensible and configurable editors like
> Emacs by striving to rigorously understand the language and its syntax. So
> if you wrote that, not only would you be helping the open source community,
> but you would also provide yourself with a way to colorize all the
> un-referenced definitions/theorems in a module. And if you can colorize
> them, you can put it into a configurable script!
>
>
> On Thu, Jun 20, 2013 at 3:00 PM, Duckki Oe <duckki AT mit.edu> wrote:
>>
>> Hi,
>>
>> Is there a tool that can detect unreferenced definitions/theorems in a
>> module (or modules)? I'd like to clean up my modules and remove unnecessary
>> lemmas. But, I put lemmas in hint databases and it'll be very time consuming
>> to manually test if every single lemma is used. Thanks!
>>
>> -- Duckki
>>
>>
>
- [Coq-Club] coverage tool, Duckki Oe, 06/20/2013
- Re: [Coq-Club] coverage tool, Kenneth Adam Miller, 06/21/2013
- Re: [Coq-Club] coverage tool, Math Prover, 06/21/2013
- Re: [Coq-Club] coverage tool, Jason Gross, 06/21/2013
- Re: [Coq-Club] coverage tool, Nuno Gaspar, 06/21/2013
- Re: [Coq-Club] coverage tool, Jason Gross, 06/21/2013
- Re: [Coq-Club] coverage tool, Duckki Oe, 06/23/2013
- Re: [Coq-Club] coverage tool, Harley D. Eades III, 06/24/2013
- Re: [Coq-Club] coverage tool, Nuno Gaspar, 06/24/2013
- Re: [Coq-Club] coverage tool, Jason Gross, 06/24/2013
- Re: [Coq-Club] coverage tool, Duckki Oe, 06/23/2013
- Re: [Coq-Club] coverage tool, Jason Gross, 06/21/2013
- Re: [Coq-Club] coverage tool, Nuno Gaspar, 06/21/2013
- Re: [Coq-Club] coverage tool, Jason Gross, 06/21/2013
- Re: [Coq-Club] coverage tool, Math Prover, 06/21/2013
- Re: [Coq-Club] coverage tool, Kenneth Adam Miller, 06/21/2013
Archive powered by MHonArc 2.6.18.