-
Notifications
You must be signed in to change notification settings - Fork 40
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
[sercomp] add goals mode to print some proof goal info #174
Conversation
I think you are "counting" the sentences wrong. IIRC bullets are considered as sentences on their own, thus you will have:
You can use the other records of the goals field to get info about the goal stack I think. |
9768443
to
2c9ca30
Compare
I changed the printing format to "X Y" where X is the number of goals and Y is the size of the stack, and "- -" if there is no goal and stack info. Here is the full output I get:
So there seems to be something wrong with |
That's bizarre, certainly I don't get that; but I ran it in 8.9; need to prepare a math-comp setup for 8.10. |
Here is another example without ssreflect/mathcomp and no bullets or other decoration. Require Import Arith.
Definition update {A} (st : nat -> A) (h : nat) (v : A) := fun (n : nat) => if Nat.eq_dec n h then v else st n.
Lemma update_nop : forall A (st : nat -> A) y v, st y = v -> update st y v y = st y.
intros; unfold update.
case Nat.eq_dec; subst.
auto.
auto.
Qed. The expected output is something like:
But instead I get:
However, |
As discussed today, the problem here is the let ndoc = { Stm.doc_type = Stm.VoDoc in_file in |
@palmskog , should this go into the 8.10 release? I think we can test the goals mode and use the |
2c9ca30
to
65b6c56
Compare
@ejgallego I want to include this into the 0.7.0 release, but I feel simply counting goals in a state is very limited and will not solve our use case. A better idea may be to actually print the goal structure in some form - I will experiment with this for a day or so and then we can make the final decision. |
Sounds good, you already have quite a lot of machinery in I think 0.7.0 will still take quite a few days so no rush, also we can do a 0.7.1 very quickly if you need more time. |
@palmskog any updates on this? Would postponing for 0.7.1 be a problem for you folks? |
@ejgallego I'm stuck on something else right now, so postponing to 0.7.1 is fine. |
Ok, thanks! I think I will release 0.7.0 tomorrow and just postpone the package manager work and this to 0.7.1 ; IMHO having a new version in OPAM is overdue. |
65b6c56
to
41d67fb
Compare
Still seemingly can't get the desired output for the example file ( |
Thanks for the update @palmskog , I'll have a look. |
In order for the goal information to be kept in the cache we need to use the `Interactive` initialization mode, `VioDoc` indeed won't work as it is basically `VoDoc` + lazy proof checking. I've also updated the changelog. We also improve a couple of indentation / coding spots.
IMHO this is ready to merge, maybe we should squash the commits tho. |
Also, I did make the document creation conditional on the mode, that should fix the error suite bug:
That's a funny one tho! I wonder if Coq |
This looks great, many thanks for looking into the problem. However, the output format is currently very simplistic, I'm going to dig in a bit a day or two and see if I can figure out something more general. The goal is to be able to deduce proof structure in some form, which "number of open goals" seems inadequate for. |
OK, thanks for the update @palmskog ; ping me if you want further review or just merge if not. I think I'll have time next week to implement a few items from the 0.7.1 milestone; then I guess we can release 0.7.1 and focus on 0.11.0 [for Coq 8.11] |
Removing from my to-merge list; please ping me again when this is ready. |
@palmskog , I'm removing the milestone as this is indeed targeting 0.11 which seems incorrect. I understand the actions here would be:
|
I'm trying to set up code for serialization via
sercomp
of some proof goal information, but am running into issues.Consider the following example (
pi.v
):Here, the second sentence results in one proof goal, while the third sentence results in three goals. So I would have expected that
sercomp --mode=goals pi.v
would print something like:But instead I get:
Is there anything obvious I'm doing wrong?