coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Yannick Forster <yannick AT yforster.de>
- To: <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Maintaining a list of tactics
- Date: Mon, 27 Apr 2020 18:57:21 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=Pass smtp.pra=yannick AT yforster.de; spf=Pass smtp.mailfrom=yannick AT yforster.de; spf=None smtp.helo=postmaster AT vela.uberspace.de
- Ironport-phdr: 9a23:jsNshRVtI2ta4k/buD204x18MmfV8LGtZVwlr6E/grcLSJyIuqrYYxCEt8tkgFKBZ4jH8fUM07OQ7/m9HzFRqs/Z6zgrS99lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUhrwOhBoKevrB4Xck9q41/yo+53Ufg5EmCexbal9IRmrrQjdrMkbjI9tJqos1hfErGZDdvhLy29vOV+dhQv36N2q/J5k/SRQuvYh+NBFXK7nYak2TqFWASo/PWwt68LlqRfMTQ2U5nsBSWoWiQZHAxLE7B7hQJj8tDbxu/dn1ymbOc32Sq00WSin4qx2RhLklDsLOjgk+2zRl8d+jr9UoAi5qhJ/3YDaboKbO/hwfqzTYN0VSnZOU91LWCBdDYKxdZcDAvAfMetesoLzp0EOrRy7BQS0Buzg0DlIhnn33aIm0OQqDAHI3As6H9IVrHTbss/1P7oVXOG11qbIyzPDb/JK1jf+84XJch4hofaWXbJrbcre11MvGxnYgVqOsIHoOS6e2OoKs2ie9eVgVOSvhnYoqwFwvjivxtoshZLTio0JzVDE8CN0y5s2K92gUEN2Zd6pHIFNuyyVOYZ6WN4uTmN2tCog17ELvYC3cS4Xw5o93RHfceaIc42Q7xLjSumRJTB4iWp7eL2hgxa961KsyvDnWcaqylZKtTJFncPQuX8TzRDc99aIRuN8/kenxzmPyxje5+VELEwuiKbWJJAszqQtmpcRr0jPBDL6lUHogKOOc0Ur4Omo6+DpYrX8oZ+cMpd5iwHkPaQonMy/APg3MgsVUmmb9+S806fj/VblQLpUlP06iLTWv47CKcQBuqG5GxNV0pok6xunEzim180YkWAbI1JBZRKIlJPkO0rOIfD9FfewmU6gkDZtx/DcP73uGI/BLnbZkOSpQbEov0Vb0U84yc1Vz5NSELAIZvzpDBzfrtvdWy4wNQq1yOWvJtJnzZ8TQyrbE6afNqLZsneZ6OU1OPWBfskZtWCueLAe+/fygCphyhcmdq6z0M5PMSzqLrFdO0ycJEHUrJIZC25T5VgvQuvwk0GPS3hfaiTrBv9u1nQAEIujSLz7aMWtjbiGhXbpAJBSbyZbAF2WCm/hfIjCV/peMHvDcP8kqSQNUP2ac6Fk0BivsAHgzL8+dbjF9CoCro7uzp556r+KmA==
Dear all,
that's exactly the purpose of the smpl plugin by Sigurd Schneider, available here:
You can check other branches for other versions of Coq, and please let me know if something doesn't work for you.
I found that plugin tremendously useful in several projects and think that it should be more widely known :)
Best
Yannick
On 27 April 2020 18:52:25 Qinshi Wang <qinshiw AT cs.princeton.edu> wrote:
Dear Coq community,This is what I need in my project. I think it could be a problem for many people, not just me.
I have a tacticLtac my_tac := first [tac1 | tac2 ... ].I would like to add tactics to this list, like adding hints to a hint database, likeHint Extern tac : ...But auto only succeed when it can solve the goal, while I want it to try the tactics in the list and do not need to solve the goal. It is possible to add tactics by redefine my_tac, asLtac my_tac ::= first [tac1 | tac2 | ... | new_tac1].But it becomes troublesome, if two separated modules M1 and M2 adds their tactics to my_tac and another module M3 requires M1 and M2.
I tried Ltac2, and I find I can create a list of tactic and do first [tac_list]. But when I try to add another tactic to the list byLtac2 Set tac_list := new_tac :: tac_list.it does not work, maybe because Ltac2 does not allow top level side effect. I cannot redefine a top level definition by reading its old value. I am wondering if it is possible to allow top level side effect for Ltac2.
There is another application of maintaining a list of tactics. Before starting the core part of a tactic, it calls a preprocess procedure which is a list of tactics called in sequence, asLtac preprocess := tac1; tac2 ...It is also useful to add tactics to this list.Thanks,Qinshi WangPrinceton University
- [Coq-Club] Maintaining a list of tactics, Qinshi Wang, 04/27/2020
- Re: [Coq-Club] Maintaining a list of tactics, Yannick Forster, 04/27/2020
Archive powered by MHonArc 2.6.18.