Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Debugging an apparently diverging Coq program

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Debugging an apparently diverging Coq program


Chronological Thread 
  • From: Théo Winterhalter <theo.winterhalter AT ens-cachan.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Debugging an apparently diverging Coq program
  • Date: Sat, 21 Sep 2019 09:42:02 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=theo.winterhalter AT ens-cachan.fr; spf=Pass smtp.mailfrom=theo.winterhalter AT ens-cachan.fr; spf=Pass smtp.helo=postmaster AT ariane2.ens-cachan.fr
  • Ironport-phdr: 9a23:EVYWAxyYWSMVtEDXCy+O+j09IxM/srCxBDY+r6Qd0uoXKvad9pjvdHbS+e9qxAeQG9mCsLQe0KGP6fqoGTRZp8rY6jZaKN0EfiRGoP1epxYnDs+BBB+zB9/RRAt+Iv5/UkR49WqwK0lfFZW2TVTTpnqv8WxaQU2nZkJ6KevvB4Hdkdm82fys9J3PeQVIgye2ba9vIBmsogjdq8cbjZF8Jqs/xRfFv2VEd/pLzm9sOV6fggzw68it8JJ96Shcp+4t+8tdWqjmYqo0SqBVAi47OG4v/s3rshfDTQqL5nQCV2gdjwRFDQvY4hzkR5n9qiT1uPZz1ymcJs32UKs7WS++4KdxSR/nkzkIOjgk+2zKkMNwjaZboBW8pxxjxoPffY+YOOZicq7bYNgVQndPXttKVyxZHIyzc5cPAeQGPeZdtYb9pl0Opga6CQSjAO7jzzlFjWL006InyeQsCQHI0xAvEd0BrXraotv1OrkQXu62y6fF1inDb+pT2Tvh6IjEbhIsrPeRVrxwa8rRzkwvGhvbgFWQs4vlOCua2eQMs2id8+pvS/ivi249pAF1vjig2N0sgZTOi4IJylDL6yJ5zJw7JN25Tk57fcCrEIFQty6AM4t2Xt0tQ3tztSkkzL0Gooe3czQQx5s7xx7QcfqHf5KG4hL5TeucJypzinxieLK6nRmy8E6gx/XgWcmzylZKqDRKkt3ItnwXyRPc99WHRuN8/kenwzaP1hrc5vtKIUAujabaJIMhzaQ2lpoJrETDHzb2mETsgKCKcUUk//Ck6+vmYrX6pp+cKpR7hhv/MqQpgsC/DuU4MhQOX2iG4uuwzqHs/Ur8QLhMk/Y4kbHZvYjHKckVpaO1GRFZ34g+5xqlEjur0tUVkWMHIV9KYB6LkpTlNlXULP32EfuzmUmgnTh3y/zcP7DsDJPAJWXZnrj7Z7Zy8UtcxRIzzd9B45JUDakML+jpWk/wrtPYCAE2PxKuz+n5DtV9zZoSVn6VDaCFMKPdq1mI6vghI+mWfIMVuTD9JOY55/P2kHM0l1wQcbO30ZYZdXy0BOlqLkeYbHb2gtoMHn8Gvg8kQ+zrjF2CXyRTZ3G3X68k+jE7CJypDYDZSoGjgbyB2ju7EYNMZmBGEF+MFWvoeJueW/oXdi2SJNRhniUYWre7V4Ah1QuhtAngx7ppNOrY4jcYuo771Nhp++3Tkgk/+iBzD8SEym2CU2V0nn4TSDItx6B+oUl9yk+Z3qRigvxYE8ZT5/JTXQsgO57c1b8yN9enUQXYO9yNVVyOQ9O8ADh3QMhi7cUJZhNBG1SluS/C2TanGb8ck6CGHtRg7qLR2D7uJsBhxmzG3a09gkMOT81UcGavja528U7dHdiawA2ii6+2ePFEj2b2/2CZwD/S7RgJAj41ar3MWDUkXmWTqN344k3YSLr3VOYqNBAEwseJKqJMLNPz3wwfGaXTfe/Gamf0oF+eQBaFwrTWN9jjYWQU2iiHTkUCiEUY9H2GPA54CD3z+juCXgwrLkrmZgbXycc7sGmyFxJmwgeRKkZo3Lq8/Fgbn67ERg==

Hello,

I had some similar troubles. Some obligations might need to be proven using
Defined if they are likely to produce computations. This includes singleton
elimination, meaning that unfortunately sometimes proof terms produced by
omega or such will block computation.

To avoid computing all the unnecessary obligations, using `Eval lazy` instead
of compute might solve the problem. As opposed to the other, I would use as
much transparent things as possible.

Also, it may be that you wait for some equality to be refl, but Program often
use Jmeq_eq as an axiom.

There is also Equations which you can use without it adding axioms. It should
replace Program someday I expect.

> Le 21 sept. 2019 à 05:40, Xuanrui Qi
> <xuanrui AT cs.tufts.edu>
> a écrit :
>
> Hello all,
>
> This looks really weird to me.
>
>> `Program` often produces humongous functions
>
> While this is generally true, I'm not sure it's the case here. You can
> print the term and see that its size is not really humongous.
>
> I tried using `Function` instead of `Program Fixpoint` and changing the
> Defined into a Qed, but nothing changed. It could be the non-opaque
> obligations thing but I'm not entirely sure.
>
> It seems like a Coq bug to me now...
>
> Best,
> Xuanrui
>
> --
> Xuanrui Qi
>
> xuanrui AT cs.tufts.edu
> me AT xuanruiqi.com
> https://www.xuanruiqi.com
>
>
> On Sat, 2019-09-21 at 00:47 +0000, Jason -Zhong Sheng- Hu wrote:
>> I suspect that Solve Obligations closes proofs transparently, which
>> should consume much time to compute something irrelevant.
>>
>> https://coq.inria.fr/refman/addendum/program.html#coq:flag.transparent-obligations
>> Program — Coq 8.9.1 documentation
>> We present here the Program tactic commands, used to build certified
>> Coq programs, elaborating them from their algorithmic skeleton and a
>> rich specification .It can be thought of as a dual of Extraction.The
>> goal of Program is to program as in a regular functional programming
>> language whilst using as rich a specification as desired and proving
>> that the code meets the specification using the ...
>> coq.inria.fr
>>
>>> Controls whether all obligations should be declared as transparent
>> (the default), or if the system should infer which obligations can be
>> declared opaque.
>>
>> Thanks,
>> Jason Hu
>> https://hustmphrrr.github.io/
>> From:
>> coq-club-request AT inria.fr
>>
>> <coq-club-request AT inria.fr>
>> on behalf
>> of Abhishek Anand
>> <abhishek.anand.iitg AT gmail.com>
>> Sent: September 20, 2019 8:35 PM
>> To: coq-club
>> <coq-club AT inria.fr>
>> Subject: Re: [Coq-Club] Debugging an apparently diverging Coq program
>>
>> Perhaps they forgot to instantiate the atom type? the computation
>> would get stuck on (x == x'). `Program` often produces
>> humongous functions.
>>
>> -- Abhishek
>> http://www.cs.cornell.edu/~aa755/
>>
>>
>> On Fri, Sep 20, 2019 at 5:15 PM William J. Bowman <
>> wjb AT williamjbowman.com>
>> wrote:
>>> All,
>>>
>>> At the following URL is a model of a language with capture-avoiding
>>> substitution
>>> that a student wrote:
>>>
>>> https://gist.github.com/wilbowma/acf125222c64ff715a33b26a0ce8b4ab
>>>
>>> The program looks (to me) like it ought to terminate quickly, and
>>> it's proven
>>> terminating using Program, yet when we run the substitution
>>> function on a small
>>> example... coqtop eats about 20 GB of memory and doesn't terminate
>>> within 5
>>> minutes.
>>> I'm using Coq 8.9.1 on MacOS 10.14.2; the same behavior is also
>>> observed on
>>> Windows 10.
>>>
>>> I'd appreciate any help debugging this.
>>>
>>> --
>>> William J. Bowman
>




Archive powered by MHonArc 2.6.18.

Top of Page