coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Gregory Malecha <gmalecha AT gmail.com>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Some questions on interface with coqtop
- Date: Fri, 11 Dec 2015 12:51:39 -0800
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gmalecha AT gmail.com; spf=Pass smtp.mailfrom=gmalecha AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f172.google.com
- Ironport-phdr: 9a23:F0K3nRxyhqzlS3rXCy+O+j09IxM/srCxBDY+r6Qd0ewSIJqq85mqBkHD//Il1AaPBtWFraocw8Pt8IneGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2WVTerzWI4CIIHV2nbEwudrqzQtaapv/0/t7x0qWbWx9Piju5bOE6BzSNhiKViPMrh5B/IL060BrDrygAUe1XwWR1OQDbxE6ktY+YtaRu+CVIuv8n69UIEeCjJ/x5HvRkC2ENNHl9z8n2v1GXRgyWo3AYT28+kxxSAgGD4gusDbnrtS6vmfBw1y6ALIXTRLQ5UjSrp/NkTRbshSwHPhY29WjWjop7i6cN80HpnAB234OBONLdD/F5ZK6IOIpCHWc=
On Thu, Dec 10, 2015 at 4:26 PM, Jonathan Leivent <jonikelee AT gmail.com> wrote:
On 12/10/2015 06:54 PM, Epiphanie wrote:
...
Finally, I have questions about LTac. This language seems powerful enough
to perform interesting automation, however as a post on Galinium showed,
there seems to be some heavy restriction on it.
For instance, I cannot find a way to use the Search mechanic (vernacular
command) inside a tactic, or even to know the number of subgoal there is.
See: https://coq.inria.fr/bugs/show_bug.cgi?id=3945
I little while ago I wrote a small plugin that allows you to iterate over the theorems in a hint database. The code is available here:
It has versions that work in both 8.4pl6 and 8.5 (beta3). It is not an optimal implementation by any stretch of the imagination, but it may be sufficient for some purposes.
I skimmed through the code of SSReflect and they do it through caml plugin,
just like the said post suggested.
However, I found nothing in the documentation about how to write your own
Coq extension just like SSReflect does, and its consacred section on the
FAQ is left blank.
This is a source of continuous frustration and debate.
Ltac is actually quite a bit more powerful than one might expect - than even its developers anticipated. For example, it is possible to write an Ltac tactic that can know the number of subgoals. It is even possible to write an Ltac tactic that can label the subgoals with their relative numbers.
Still, for many purposes, there seems to be little alternative but to write an OCaml plugin. This appears to be because Ltac's ability to automate procedures is treated as very secondary to its direct interactive usage. Even though the ability to easily automate complex procedures would of course improve that direct interactive usage.
A few other plugins that I have written might help
- template-coq (https://github.com/gmalecha/template-coq) constructs a syntactic representation of Coq terms within Coq.
- coq-plugin-utils (https://github.com/gmalecha/coq-plugin-utils) has a few functions that I have found useful when writing Coq plugins, particularly ones that extend Ltac.
Thomas Braibant also wrote a timing plugin that is documented. I'm not certain if it is still compatible with 8.5
-- Jonathan
gregory malecha
- [Coq-Club] Some questions on interface with coqtop, Epiphanie, 12/11/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Jonathan Leivent, 12/11/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Gregory Malecha, 12/11/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Jonathan Leivent, 12/12/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Gregory Malecha, 12/12/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Épiphanie, 12/13/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Jonathan Leivent, 12/13/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Épiphanie, 12/13/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Gregory Malecha, 12/12/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Jonathan Leivent, 12/12/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Gregory Malecha, 12/11/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Jonathan Leivent, 12/11/2015
Archive powered by MHonArc 2.6.18.