Question

Occasionally there is a lemma, where try0 crashes Isabelle/JEdit. Only kill -9 on the process id works then.

When I then call try in the same situation, Isabelle/JEdit crashes again.

Is it possible to invoke in this situation everything from try without running try0 (or otherwise omit all the proves try0 would call)?

(I did some google searches but could not find anything relevant.)

Was it helpful?

Solution

From isar-ref.pdf, page 267, it gives the following notes on try0 and try:

  • try0 attempts to prove a subgoal using a combination of standard proof methods (auto, simp, blast, etc.). Additional facts supplied via simp:, intro:, elim:, and dest: are passed to the appropriate proof methods.
  • try attempts to prove or disprove a subgoal using a combination of provers and disprovers (solve_direct, quickcheck, try0, sledgehammer, nitpick).

So if the description is complete in the Isar Reference manual, then try is try0 plus two provers, solve_direct and sledgehammer, and two counterexample finders, quickcheck and nitpick.

To not run the provers of try0, as far as I know, you would have to run solve_direct and sledgehammer individually.

If try0 is hanging the PIDE, then it's mostly likely going into a bad loop of some kind, where enabling Auto Methods in Plugin Options / Isabelle can also cause these loops, since it does something similar to try0.

There are two kind of loops that I've experienced, where I can only remember the 2nd one listed next as hanging the PIDE:

  1. simp rule loops caused by simp or methods that call simp, such as auto, force, fastforce, slowsimp, and bestsimp. To stop an infinite loop, I just have to delete the command.
  2. blast loops caused by auto calling blast. For these kind, it either happens immediately, or after I've let the command run for 5 seconds or so.

You can try to narrow down which automatic proof method is causing try0 and try to hang the PIDE.

You can get a list of the try0 methods used like this (I don't know if the list of provers it shows is complete):

lemma "False"
try0
(*Trying "simp", "auto", "fast", "fastforce", "force", "blast", "metis", 
  "linarith", and "presburger"...*)
oops

From that list, if apply(simp) is looping, you know there's a simp rule loop (or simp rules that take a long time to complete), which would make auto, fastforce and force loop, since they call simp.

If auto is looping, then it could be simp or blast, since auto can call each of those, so you can try apply(blast) to see if blast is the problem.

With Isabelle2013-2, for me, the hanging of the PIDE has been because of auto, because it calls blast. Supposedly, that has been fixed for the next release.

OTHER TIPS

I put this as a second answer, since it's different enough.

I was browsing through the repository changes, and that led me to the following Isabelle2013-2 ML files related to try and try0 (but don't get locked in completely, because I list other files to show things are changing):

The file try.ML gives this line of source:

val get_tools : theory -> tool list

I suppose, using ML, a person could get a list of the tools used by try, but if so, then it would probably correspond with the description given in the other answer from isar-ref.pdf.

Basically, there is try which calls other tools, sledgehammer which does its own special thing, where the use of try0 is part of its arsenal, solve_direct, and then fully automatic proof methods used by try0, which are listed in try0.ML.

The majority of automatic proof methods which are listed in try0.ML are referenced in isar-ref.pdf sections

  • 9.3 The Simplifier [187]
  • 9.4.4 Fully automated methods [211],
  • 12.7 Model Elimination and Resolution [263], and
  • 12.8 Algebraic reasoning via Gröbner bases [263].

Now for some changes that are coming down the pipe, taken from the latest files or changesets:

From the latest repository try0.ML, it gives the list of proof methods that try0 will try. If you look at the Isabelle2013-2 try0.ML above, you'll see that the list given in that file is the same list of methods shown in the other answer when trying to prove False.

Here, there are extra automatic proof methods that aren't currently being tried with Isabelle2013-2.

val full_attrs = (SOME "simp", SOME "intro", SOME "elim", SOME "dest");
val clas_attrs = (NONE, SOME "intro", SOME "elim", SOME "dest");
val simp_attrs = (SOME "add", NONE, NONE, NONE);
val metis_attrs = (SOME "", SOME "", SOME "", SOME "");
val no_attrs = (NONE, NONE, NONE, NONE);

(* name * ((all_goals, run_if_auto_try), (simp, intro, elim, dest) *)
val named_methods =
  [("simp", ((false, true), simp_attrs)),
   ("auto", ((true, true), full_attrs)),
   ("blast", ((false, true), clas_attrs)),
   ("metis", ((false, true), metis_attrs)),
   ("linarith", ((false, true), no_attrs)),
   ("presburger", ((false, true), no_attrs)),
   ("algebra", ((false, true), no_attrs)),
   ("fast", ((false, false), clas_attrs)),
   ("fastforce", ((false, false), full_attrs)),
   ("force", ((false, false), full_attrs)),
   ("meson", ((false, false), metis_attrs))]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top