coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Robbert Krebbers <mailinglists AT robbertkrebbers.nl>
- To: Coq Club <coq-club AT inria.fr>
- Subject: [Coq-Club] Very slow failing apply
- Date: Thu, 17 Aug 2017 15:45:06 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mailinglists AT robbertkrebbers.nl; spf=None smtp.mailfrom=mailinglists AT robbertkrebbers.nl; spf=None smtp.helo=postmaster AT smtp1.science.ru.nl
- Ironport-phdr: 9a23:dlgoaR3fprQmDtiLsmDT+DRfVm0co7zxezQtwd8ZsegWLvad9pjvdHbS+e9qxAeQG96Eu7QZ06L/iOPJZy8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL3WbmHC57CYTFxPjLkI1Y72tQs+Bx/iwgsu14tX4ZxhCzG62Zqo3JxGrpy3QsNMXiM1sMPBi5AHOpy5yfO5cyHl0bXGJkhz2692rtMpm+iVUuvQu889bTb7SZaMyR7FCEDc8Pmo/6dfw8x/HG1jcrkAAW3kbx0IbSzPO6wv3C9Ko6nP3
Dear Coq Club,
I am experimenting with using dependently typed records (and canonical structures) to axiomatize a small hierarchy of logics (logic of bunched implications, with some extensions, like step-indexing via the later modality). The purpose of this hierarchy is to abstractly prove results about arbitrary logics and build tactics/proof automation for said logics.
I tried to represent my little hierarchy using a couple of approaches, namely:
1. Packed classes using mixins (as in Ssreflect)
2. Telescopes (as in CORN)
3. Packed classes without mixins
Unfortunately, using each of these approaches, I ran into issues with the apply tactic becoming very slow (exponential, or worse, in the size of the goal).
I have included simplified versions of all approaches as attachments. As you see, the third approach (file apply_bug.v) is the worst in terms of performance, but whenever I make the term big enough (but still much smaller than the kind of goals you will see in practice), the performance of all approaches becomes totally useless at some point.
Does anyone have an idea whether I am running into an actual efficiency bug of records in combination with the apply tactic or unification here, or whether I am in fact doing something very inefficient.
I noticed that when enabling primitive projections the performance programs go away entirely in my small examples (all uses of apply will fail within ~0.00 seconds). Unfortunately, in my actual development, primitive projections seem to cause other problems: canonical structure inference no longer works when they are enabled, and the Ssreflect rewrite tactic to fail unexpectedly. Are these problems known?
Suggestions on avoiding this issue are very welcome!
Thanks,
Robbert
Attachment:
apply_bug.v
Description: application/coq
Attachment:
apply_bug_mixins.v
Description: application/coq
Attachment:
apply_bug_telescopes.v
Description: application/coq
- [Coq-Club] Very slow failing apply, Robbert Krebbers, 08/17/2017
- Re: [Coq-Club] Very slow failing apply, Pierre-Marie Pédrot, 08/17/2017
- Re: [Coq-Club] Very slow failing apply, Robbert Krebbers, 08/17/2017
- Re: [Coq-Club] Very slow failing apply, Pierre-Marie Pédrot, 08/17/2017
- Re: [Coq-Club] Very slow failing apply, Robbert Krebbers, 08/17/2017
- Re: [Coq-Club] Very slow failing apply, Pierre-Marie Pédrot, 08/17/2017
- Re: [Coq-Club] Very slow failing apply, Robbert Krebbers, 08/18/2017
- Re: [Coq-Club] Very slow failing apply, Ralf Jung, 08/24/2017
- Re: [Coq-Club] Very slow failing apply, Robbert Krebbers, 08/18/2017
- Re: [Coq-Club] Very slow failing apply, Emilio Jesús Gallego Arias, 08/19/2017
- Re: [Coq-Club] Very slow failing apply, Pierre-Marie Pédrot, 08/17/2017
Archive powered by MHonArc 2.6.18.