Add proof-from-scratch layered generation - #80
Conversation
|
@munimthahmid Generator side is working, a few things I had in mind,
|
munimthahmid
left a comment
There was a problem hiding this comment.
@sukanya1426 I found some issues with the implementation. Can you check and fix them?
@sukanya1426 You can keep your copies for now. After this PR is merged, I will rebase #71 and make the generator import the shared constants.
No, we don't assume exactly two files. The prompt and read-only mounting handle any number of context files.
This is fine. The agent can use NAssumption inside the proof with BY NAssumption or a proof-level USE NAssumption.
Unnamed target theorems are fine. The checker does not require the target theorem to have a name. |
|
@munimthahmid Thanks for the feedbacks! Fixed them, can you please take a look again ? I also ran into another issue. TwoPhase_proof_line17 isn't really self-contained, its statement is just THEOREM Implementation, which points to THEOREM Implementation == Spec => A!Spec in TwoPhase.tla. This worked before because the dependencies still contained their theorems, but now the context modules don't, so the reference can't be resolved and the task gets dropped by the SANY gate. Would you prefer that I inline the actual statement (Spec => A!Spec) so the task is self-contained, or should I just retire it? |
There was a problem hiding this comment.
@sukanya1426 The previous issues are partly fixed, but the updated implementation still needs some changes. I left inline comments.
|
@munimthahmid Thanks! I've finished the changes on my end. I still need your call on TwoPhase_proof_line17, though. It's now being flagged instead of dropped, as you requested, so it stays in the manifest but still can't parse. That means every submission for it fails. Should we inline Spec => A!Spec, or retire it? |
|
@sukanya1426 Thanks, I am reviewing it. And yes, about the TwoPhase problem, I checked, and it seems like TwoPhase_proof_line17 is just another proof of the existing Implementation theorem in TwoPhase.tla. So we should remove the generated task. But we need to keep the original source file unchanged. Sorry, I forgot to mention it earlier. |
munimthahmid
left a comment
There was a problem hiding this comment.
@sukanya1426 Thanks for the updates. The previous issues are fixed. I found a few new issues in the updated code and left inline comments. Could you please check and fix them?
|
@munimthahmid The reviews were really on point xd. Thanks for catching those. I’ve fixed them all. Mind taking another look? :3 |
|
@munimthahmid The dataset now regenerates 232/233 tasks exactly. The only exception is Just noting this since the target was to preserve all 233 tasks. I think removing it is the cleaner option because it only mirrors |
|
@sukanya1426 The generator changes look good now. I’ll test #71 and #80 together locally. It would be great if you could do the same and run 3–5 real agent attempts on different task types. If everything works, we’ll merge #71 first. Then you will need to rebase #80 onto Once both PRs are merged, we can regenerate the dataset and add |
|
@munimthahmid sounds good. I will let you know after testing them locally. |
|
@Qian-Cheng-nju @sukanya1426 I tested #71 and #80 together locally. Here are the results. Dataset generation
Real agent testsI ran 5 agent attempts across different task types and model/reasoning combinations:
The agents only changed the allowed marker regions. The evaluator used the exact context from Remaining issue
It seems the current benchmark includes some no-proof tasks. We can either add a vetted allow-list so they are included by default, or keep only the 183 tasks with source proofs. Which way should we go? |
|
@Qian-Cheng-nju @munimthahmid I tested #71 and #80 together locally too. Dataset generation
Real agent tests
|
Let’s preserve the current 233 tasks by using the existing dataset/manifest as the default selection, without adding a new hard-coded allow-list. Thanks a lot! LGTM. |
Important
This is the producer side of #71. It does not regenerate
benchmark/proof-from-scratch/in place, that should land after #71 merges, since the evaluator still discovers tasks by filename heuristic today.What changed
Split each task into a read-only shared model, a read-only per-target definitions module, and an editable task module holding only the theorem scaffold and the agent's helper and proof regions.
Emit a
manifest.jsongiving every task its exact read-only context, so no task inherits a sibling's definitions and the evaluator never has to infer context from siblings.Keep original-proof definitions and module-level
USE/HIDEhints out of the read-only layers, and audit each generated layer for leaked proof artifacts and shared ownership.Give pure lemma targets a self-contained definitions layer instead of the shared model, carrying only the declarations they use.
Validation
Validated across 293 generated tasks, all load and parse under #71's manifest loader and region parser, all SANY-parse with only their manifest context, no proof artifacts leak, no
Defsis shared, and an honest proof with a helper lemma passestlapm.Gaps
17 existing tasks (
OpenAddressing,etcd_raft,GermanProtocol,EWD687a_proof) have nosource/counterpart and can't be generated, they need sources or hand-authored layers. Task count also depends on --allow-no-proof: 293 with it, against 227 in the current dataset.