coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] any Ltac2 examples out there?
- Date: Wed, 22 Apr 2020 00:16:12 -0400
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jasongross9 AT gmail.com; spf=Pass smtp.mailfrom=jasongross9 AT gmail.com; spf=None smtp.helo=postmaster AT mail-ed1-f49.google.com
- Ironport-phdr: 9a23:P4m3Vx/MO6HQlP9uRHKM819IXTAuvvDOBiVQ1KB41ukcTK2v8tzYMVDF4r011RmVBNidt6wP1LqempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffgVFiCCybL5zIxm7rwbcvdQKjIV/Lao81gHHqWZSdeRMwmNoK1OTnxLi6cq14ZVu7Sdete8/+sBZSan1cLg2QrJeDDQ9LmA6/9brugXZTQuO/XQTTGMbmQdVDgff7RH6WpDxsjbmtud4xSKXM9H6QawyVD+/6apgVR3mhzodNzMh/27XhM5/gqJVrhyiuhJx3ZLbbZqPO/ZiZK7QZ88WSXZDU8tXSidPApm8b4wKD+cZOehXtZL9p1wIrRCjBAesHuTvyiRThnTr2qA60f4uERrB3AwmENIOqnPUrM7uNKoWSu21w6zIwi/Cb/NSwzvy9I/IchU4rPyKQLl+f83RyUw1GAPEiFWdsYPlPzKJ1uQNrmiU9PBsWv6oi24irQx6vzuhxt80h4XXmo4YzkrI+CZ5zYovO9G0VE12bcSrHZZUsSyRKpF4Tdk4Q25yvSY30r0GtoC/fCgN0JknwgTQa/2Dc4SR/B3sSfudLS52hH9qfL+znRmy8U+nyu3zUsm7zkxGoTZCktnJrnwN1hrT5dabSvZl4EutxTKC2xrQ5+xEO0w4i7bXJp07zrM/kpcfqUHDETX3mEXygq+WbEIk+u2w5uTleLrmvZicN4l7igHkNaQugde/DOAjPwgBWmiU4+W81Ln58ULlR7VKi+U6krPFv5DCOcQbuqm5DhdJ3YYk8hazFiup0NAFnXYcN19FYxKGj43xO17UOvz4DPG/g06tkDhx3fzGMKfhUd3xKS3Il66kdrJg4QYIww0qiNtb+ph8C7cbIfu1VFWn5/LCCRpsEQWvxOCvJ896zZhWDWCGGaifP7nVqkTZzu0qKuiIIoQSvWCueLAe+/fygCphyhcmdq6z0M5PMSHqLrFdO0ycJEHUrJIEGGYOsBA5SbWz2lKHWD9XIX21WvBlv2xpOMedFY7GA7uVrvmB0SO8RMAEY2lHDhWBHS6tednVHfgLby2WL4lqlTlWDeH9Gb9k7gmnsUrB85QiNvDdo3RKupfq1dwz7OrWx0k/
Examples: I have some Ltac2 files in https://github.com/JasonGross/doctoral-thesis/tree/master/performance-experiments (see files with ltac2 in the names)
There's also two implementations of reification using a slightly older version of Ltac2 at https://github.com/mit-plv/reification-by-parametricity (see files starting with Ltac2)
I believe the exception-catching mechanism is Control.case (in https://github.com/coq/coq/blob/master/user-contrib/Ltac2/Control.v). It can catch exceptions from Control.zero, and the bit you were reading about uncatchable exceptions was probably talking about those raised by Control.throw.
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.