coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Talia Ringer <tringer AT cs.washington.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Using SerAPI in a plugin
- Date: Wed, 8 Sep 2021 00:43:20 -0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=tringer AT cs.washington.edu; spf=Pass smtp.mailfrom=tringer AT cs.washington.edu; spf=None smtp.helo=postmaster AT mx5.cs.washington.edu
- Ironport-hdrordr: A9a23:Y/9rT6v20WMIFnRaDt423DcK7skDr9V00zEX/kB9WHVpm62j+/xG+c5x6faaslkssQ4b9+xoVJPgfZr3z/5ICPAqTNSftVDdyQmVxeJZnO7fKkPbaknDH7VmpMBdmsFFYbXN5D5B/KDHCWKDfurIruPszEhd792utkuFNTsaE52JZGxCe32m+sccfng9OXKBf6Dsm/Z6mw==
- Ironport-phdr: A9a23:vL7LqxzNlQreCbHXCzIDylBlVkEcU1XcAAcZ59Idhq5Udez7ptK+ZhSZtKwm0QCBdL6YwsoMs/DRvaHkVD5Iyre6m1dGTqZxUQQYg94dhQ0qDZ3NI0T6KPn3c35yR5waBxdq8H6hLEdaBtv1aUHMrX2u9z4SHQj0ORZoKujvFYPekdi72/q29pHObAlFhDiwaq5uIRurqgncqtMYipZ4JKYrzRvJrHpIe+BIym5tOFmegRXy6Nqu8ZB66yhftO4v+MBGUaXhYqQ3VqdYAyg8M2A0/8Lkqx/ORhaS63QGU2UWlh1IAxXZ7Bz/Q5z8vDf2uvZ71SKHO8D9ULI6Vim476pzRxDohiUIOT43/m/Ul8J+kr5UrQm7qBBj2YPZep2ZOOZ8c67bYNgURXBBXsFUVyFZHI2zdY8PD+sbMu1Fs4f9pl0OrRSgCgm2GejizSNIhmX33a083OQuDxvG0Rc8ENIVqnjVos/6NLwSUeC0yqnIwinDb/RQ2Tvn9ofHbw0hrOiKULltfsXf1VMhGBnZjlWMt4PlJTWV2/wQv2SH7+RuW/+jhmoppg1sozWix8khh4bHiIwV1F3K+iR0zYIpKNCkSEN2fdGpHpVMuiyZK4d7QM0sTmJstSs7zLANpJC1fC8PyJs9xh7fbeSKc4eJ4hL/VOaRPCx3iGh5d7K4gha/91WrxO7kVsSszVpGsClInsPSunwR1BHf8NaLRuFy80quwTqDyRzf5+VeLU03lafXMYMtz78xm5YJvknOESn7k1jsgqCMbEUr4O2o5vznYrr4op+cMJd5igTxM6kugMCwHf84PhIAXmeB4uS81Lzj/Uv2QLVWif02lLPVv47HKsQGvqK5AglV3Zg/6xunEjuqztcVkWMZIF5Zex+LlZblN0vBLf33Ffu/hk6jkDZvx/DIJL3hBZDNI2DfkLf7fLZ97UFcxxQpzd1E+51UEasNIfzpVU/qtNzYDxk5MwOow+bgDtVxzJ0RVn+SAqOBKqPdrUeI5v4zI+mLfIIapDH9K+E86/HyiX85hEQScLKy3ZoXbXC4Bu5pL1+YYXrqmNcBEH0FshAwTOzw2xW+VmtYYG/3VKYh7Bk6DpinBMHNXNODmruEiRuyGpxfLlpHDF+BCz+8a5+FXfgBcgqZOYl+mycEVL6uV4gnkxyiqVmpmPJcMuPI93hA5trY399v6riL/fnT3TlkUoKWyCeSRnp0n2UHWzgwmq1zvB4lor9m+aNjxeNRDtxS4fxVVQF8OJLBnbQS4z/aURmHYd6SSFegTcmhB3c8Qs9jmrcz
With dune, Coq's libraries are split into sub-libraries, such as 'coq.plugins.ltac'. When you need to use a particular API file, you check which library it is in (by opening the dune file in the directory of that file), and add that library as a dep. The repo I linked does this with 'coq.plugins.ltac'.
On 08/09/2021 02:50, Talia Ringer wrote:
Thanks, with Dune though I can't even get my Coq plugin without SerAPI to load Constr, Environ, and other necessary modules. I have no idea what I'm supposed to depend on to get those.
On Tue, Sep 7, 2021 at 7:47 PM Lasse Blaauwbroek <lasse AT blaauwbroek.eu> wrote:
I have an example plugin that does exactly this here: https://github.com/LasseBlaauwbroek/serapi-example
I think I built this again 8.11 at the time, but I'm not sure (I didn't try to recompile the plugin before this email). Word of warning: Using SerAPI in a Coq plugin can be rather difficult due to its dependencies.
Lasse
On 08/09/2021 02:30, Talia Ringer wrote:
Hi all,
Have any of you gotten plugins that call out to SerAPI working, especially on Coq 8.9 (I am bound to 8.9 because of a dependency)? If so, I'd really love to see some example plugins. This is a major blocker for me and a student on a project.
I'm open to any build system at this point, but I haven't managed to get Dune working even without SerAPI---it gives me a bunch of errors failing to find Constr, Environ, and so on. The Dune tutorial didn't seem to address those errors. I don't know where to find the list of Coq libraries I can try to depend on from within a Dune project.
Without using Dune, using the normal _CoqProject and so on, I can get it to build if I build from source, which is already hacky. But then it fails to load:
File "./theories/Plib.v", line 1, characters 0-25:
Error:
while loading /home/talia/coq-plugin-lib/src/plib.cmxs:
error loading shared library: /home/talia/coq-plugin-lib/src/plib.cmxs: undefined symbol: camlPlib__Serapi_goals__anon_fn$5bcoq$2dserapi$2fserapi$2fserapi_goals$2eml$3a66$2c31$2d$2d47$5d_175_closure
Help with either of these paths would be strongly appreciated.
Talia
- [Coq-Club] Using SerAPI in a plugin, Talia Ringer, 09/08/2021
- Re: [Coq-Club] Using SerAPI in a plugin, Jason Gross, 09/08/2021
- Re: [Coq-Club] Using SerAPI in a plugin, Lasse Blaauwbroek, 09/08/2021
- Re: [Coq-Club] Using SerAPI in a plugin, Talia Ringer, 09/08/2021
- Re: [Coq-Club] Using SerAPI in a plugin, Lasse Blaauwbroek, 09/08/2021
- Re: [Coq-Club] Using SerAPI in a plugin, Talia Ringer, 09/08/2021
- Re: [Coq-Club] Using SerAPI in a plugin, Talia Ringer, 09/08/2021
- Re: [Coq-Club] Using SerAPI in a plugin, Talia Ringer, 09/22/2021
- Re: [Coq-Club] Using SerAPI in a plugin, Talia Ringer, 09/08/2021
- Re: [Coq-Club] Using SerAPI in a plugin, Talia Ringer, 09/08/2021
- Re: [Coq-Club] Using SerAPI in a plugin, Lasse Blaauwbroek, 09/08/2021
- Re: [Coq-Club] Using SerAPI in a plugin, Talia Ringer, 09/08/2021
Archive powered by MHonArc 2.6.19+.