coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Tej Chajed <tchajed AT mit.edu>
- To: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] any Ltac2 examples out there?
- Date: Wed, 22 Apr 2020 09:23:01 -0500
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=tchajed AT mit.edu; spf=Pass smtp.mailfrom=tchajed AT mit.edu; spf=None smtp.helo=postmaster AT outgoing.mit.edu
- Ironport-phdr: 9a23:BIoyrhQ54XedU//3KfnBXmi/utpsv+yvbD5Q0YIujvd0So/mwa69ZhCN2/xhgRfzUJnB7Loc0qyK6v2mBTNLv8fJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRW7oR/eu8QUjodvK6I8wQbVr3VVfOhb2XlmLk+JkRbm4cew8p9j8yBOtP8k6sVNT6b0cbkmQLJBFDgpPHw768PttRnYUAuA/WAcXXkMkhpJGAfK8hf3VYrsvyTgt+p93C6aPdDqTb0xRD+v4btnRAPuhSwaMTMy7WPZhdFqjK9Drx2hqR5wzY7abo+WKfRwYL/ScMgASmZdRMtcTTBNDp++YoYJEuEPPfxYr474p1YWsxWxGwusD/7xxz9InHD237M13Pk8GgzBwAwvA9IOv27WrNrrKagfSuW1zKjUzTnZcfxZxCr95ZHOfxs8r/+MWrdwftDQyUkpDw7FgVSQqZDlPzOIzesBqXSU7+1lVe+plmUpqBlxryCyysovkIXEgpgZxk7H+Clj3Yo5OMW0RFBnbdOgCpddtCGXO5FrTs4jX21kojs2x74atZO9YSME0o4oxwTFZPyCa4WI4gzsVOKWITpgg3JlZa6/hxm18UihzO38WdO40FNLripZiNXDqG0C1wHL5siGTPty4Fuh1C6S2w3Q8O1JJVo4mbTYJpI737I8i4IfsUHZES/3nEX2grWWdkIh+uWw9+TofrXmqYWeN4Bqlw7zKaEums2jAegiLAcBQnWb9fym1LL/5U35XKlKjvoun6bFt5DaPN0XqbK9Aw9IyYku8A2/Djej0NQAh3YLNlNFeBSdj4joIV7COv74De3sy2irxTxs3rXNOqDrSsHGKWGGm7P8d5587VRdwUw914YMyYhTD+Q9LfC7cU/4ttHURkslOAy9wevrINB8ysUTVX/ZUfzRC7/brVLdvrFnGOKLfoJA4G+gechg3ObniDoCoXFYfaSt2sJHOnelAvthIkOWJ3/tnpEMHXpY5lNiHtyvs0WLVHtoX1j3R7g1t2M+CZ7gAIveFNj00e6xmRyjF5gTXVhoT1WFEHPmbYKBCqUJaT7UL8N8wGUJ
I've written an Ltac2 tutorial with a handful of examples and detailed explanations. I also have a repo for Ltac2 experiments with slightly bigger examples but less documentation.
I haven't really used the backtracking support, although it looks cool; I'd recommend reading user-contrib/Ltac2/Pattern.v in the Coq sources to see how `match! goal with` and `match! constr:(...) with` are implemented, which is based on the Control.plus, Control.case, and Control.zero primitives.
I've read through the Ltac2 section of the 8.11 refman, and still have
many qeustions. Perhaps seeing some examples would help. Is there
somewhere I can find some links to Ltac2 examples?
The Ltac2 section appears to have been targeted in spots to Coq devs
with Ocaml knowledge. At one point it says: "We recall that the
Proofview.tactic monad is essentially a IO monad together with
backtracking state representing the proof state." There are
several other cases of this - so without the Coq Ocaml internals
background info, I'm left with many holes in my understanding.
There are also apparent inconsistencies, or at least omissions, in the
refman. At the end, it says: "Ltac2 features a proper
exception-catching mechanism. For this reason, the Ltac1 mechanism
relying on fail taking integers, and tacticals decreasing it, has been
removed. Now exceptions are preserved by all tacticals, and it is your
duty to catch them and re-raise them as needed." But I don't see any
catch mechanism described. Indeed, at an earlier point, it says:
"There is currently no way to catch such an exception, which is a
deliberate design choice. Eventually there might be a way to catch it
and destroy all backtrack and return values."
- [Coq-Club] any Ltac2 examples out there?, jonikelee AT gmail.com, 04/22/2020
- Re: [Coq-Club] any Ltac2 examples out there?, Jason Gross, 04/22/2020
- Re: [Coq-Club] any Ltac2 examples out there?, jonikelee AT gmail.com, 04/22/2020
- Re: [Coq-Club] any Ltac2 examples out there?, jonikelee AT gmail.com, 04/22/2020
- Re: [Coq-Club] any Ltac2 examples out there?, jonikelee AT gmail.com, 04/22/2020
- Re: [Coq-Club] any Ltac2 examples out there?, Tej Chajed, 04/22/2020
- Re: [Coq-Club] any Ltac2 examples out there?, jonikelee AT gmail.com, 04/22/2020
- [Coq-Club] Ltac2 retraction bug?, jonikelee AT gmail.com, 04/22/2020
- Re: [Coq-Club] Ltac2 retraction bug?, Maximilian Wuttke, 04/22/2020
- Re: [Coq-Club] Ltac2 retraction bug?, Pierre Courtieu, 04/23/2020
- Re: [Coq-Club] Ltac2 retraction bug?, jonikelee AT gmail.com, 04/23/2020
- Re: [Coq-Club] Ltac2 retraction bug?, Pierre Courtieu, 04/23/2020
- Re: [Coq-Club] Ltac2 retraction bug?, Maximilian Wuttke, 04/22/2020
- Re: [Coq-Club] any Ltac2 examples out there?, Jason Gross, 04/22/2020
Archive powered by MHonArc 2.6.18.