Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Ltac infinite loop (or at least very slow

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Ltac infinite loop (or at least very slow


chronological Thread 
  • From: Adam Chlipala <adam AT chlipala.net>
  • To: Kenneth Roe <kendroe AT hotmail.com>
  • Cc: Coq-Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Ltac infinite loop (or at least very slow
  • Date: Thu, 28 Jul 2011 20:08:00 -0400

Kenneth Roe wrote:
Now on to the next issue--the call to the tactic solvePick2Vars at the very end of the example I've attached seems to go into an infinite loop (or at least is very slow). Can anyone tell me what is happening?

Isn't your algorithm here exponential time, such that it shouldn't be surprising that the algorithm runs for a long while for n = 12? (Constant factors in Ltac aren't very good in the first place!)

Does auto implement backtracking? My impression was that it just keeps applying its rules until none are applicable.

Yes, [auto] does backtracking; no, [auto] doesn't keep applying rules until none are applicable. The depth argument to [auto] (which is mandatory and defaults to 5) determines the depth of the search tree, so there is always a cut-off point, even when further rules apply.

I just checked the manual and was surprised to see that, indeed, it is not at all clear there that [auto] backtracks! The hint is the text "Prolog-like resolution procedure."



Archive powered by MhonArc 2.6.16.

Top of Page