-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sauto times out on reasonably small example #77
Comments
Thank you for this example, but even after a brief look I see it is probably one of the examples that "sauto" will have problems with. I would say the deeper reason is probably that this seems to be a "forward" proof, and the proof search procedure of sauto tries to construct the proof "backward" (a bit like eauto), which might be very inefficient here. Especially that there are many universally quantified existentials and disjunctions, so it will just try to eliminate them a bit "blindly" with backtracking. But that's not how lemmas are usually formulated in Coq libraries. Even though the "core" underlying proof search procedure of "sauto" is complete for a first-order fragment (without the many heuristics that make if effective on typical Coq problems), I don't expect "sauto" to solve really "difficult" first-order problems (or even some not-so-difficult ones). It's more like a "supercharged" version of "auto". You may also try "l: on", "q: on", "limit:" or "depth:", "exh:". Maybe it will work then. Especially "l: on" might (or might not) help, because it disables "einv:" and "sinv:" which may be a problem with many disjunctions. Though if the "hammer" tactic failed at proof reconstruction, you probably won't manage to find options that work. |
Thanks for the quick reply! I played a bit more with |
In fact, the following works, which suggests that forward reasoning is the problem: intro k. "sauto" takes 2sec here. The "fcrush" tactic also works, but takes a few moments (5sec). "fcrush" is essentially "sauto" with more heuristic forward reasoning. So "hammer" reconstruction might actually succeed if you increase proof reconstruction time limit. |
Ok, so if I do |
The slow runtime is indeed not acceptable in this case. I'll leave this issue open as an enhancement, because fixing this requires more fundamental work on efficient forward-reasoning proof search in sauto/hammer. |
I see, thanks 👍 I also tried to use the For now I pushed the few experiments I did to https://github.com/mit-plv/bedrock2/tree/coqhammer |
That's unsurprising, and to some extent unavoidable. If you add hypotheses to the context you increase the search space very fast - the problem is not even decidable. It is also possible to combine "sauto" with "firstorder" or any other tactic using the "finish:", "final:", "simp:", "solve:" options. This goal can be solved in 3sec by: qauto depth: 1 finish: (firstorder congruence). That's the fastest combination I've come up with, after fiddling for a few minutes. |
I ran into several issues with Coq's builtin
firstorder
tactic, so I was very excited when I saw the documentation of coqhammer's sauto tactic: A general proof search tactic that allows me to specify which lemmas to use, which inductives to split on, which constructors to use, etc seems to be exactly the tool I was looking for.So I tried it out on the following example (extracted to be standalone from a compiler correctness proof I'm working on):
However, this
sauto
invocation does not return within 30s.So I thought that maybe I'm not using the options correctly, and that the
hammer
plugin would tell me the right options to use, so I installedvampire
and ranhammer
:... but the way it invoked proof reconstruction failed as well (after ~20s or so).
On the other hand, the following script solves the goal quite quickly, which makes me think that this goal is "not so hard":
sauto
succeed on this goal?Coqhammer version: Latest commit (28200f8) on the
coq8.11
branchCoq version: 8.11.0
The text was updated successfully, but these errors were encountered: