Fix some FPs based on verus-cheat-examples from Chenyuan.#43
Fix some FPs based on verus-cheat-examples from Chenyuan.#43XuhengLi wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Can be executed as ``` cargo test --test verus_cheat_examples -- --nocapture ```
@microsoft-github-policy-service agree |
|
Hi Xuheng, thanks for taking a look. For 1 and 2 above: For 3, 4, 5: reporting them as unsafe is fine. Can we have output that indicates WHY or what part of the code led to the "unsafe" conclusion? As long as the output is more informative, it is all ok for case 3, 4, 5. For 6: One: with It would be great if this change can be regarded as safe. two: with This is the number one source of false positives in my experience. |
|
Hi Shan, I have added some information for 3, 4, 5 in the output for my own debugging. I will think about how to make lynette generate more friendly output so we can parse it in Python. For 6, that's a reasonable split! While the |
|
Regarding debugging information:
Regarding ghost variable thing: Thank you Xuheng! |
The patch fixed some false positives from Chenyuan's example.
But some remain unclear or tricky. Details below:
=== o-IR__marshal_v__impl2__lemma_serialize_injective-20251126-203400 (26 test cases) ===
The candidate added new proof-lemma functions with
unimplemented!()bodies.Can you let me know if this was intended and safe?
Similarly, the candidates are added with a
#[verifier::external_body]and addingunimplemented!()to the lemma.=== o-IR__marshal_v__impl3__lemma_serialize_injective-20251126-215955 (21 test cases) ===
[FAIL] fix-a4-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a5-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a6-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a8-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a9-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a10-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a11-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a12-uselemma-candidate-1.rs - disallowed changes
[FAIL] fix-a13-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a15-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a17-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a18-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a19-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a20-case_analysis-candidate-1.rs - disallowed changes
3. All of the examples failed for the same reason. I am not sure if this is safe or not -- what is the default type for
0? If it'su8, I think it's a relatively quick fix; otherwise, I think we should just make it unsafe.[FAIL] fix-a3-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a7-case_analysis-candidate-1.rs - disallowed changes
[FAIL] fix-a16-case_analysis-candidate-1.rs - disallowed changes
4. Pre/post-conditions are added to the lemma - is this allowed?
=== o-NR__theorem__lemma1_init-20251203-234417 (19 test cases) ===
[FAIL] fix-a18-postcondition_repair-candidate-1.rs - disallowed changes
5. Hmmmm, the content of the original files seems to be scratched...
=== o-OS__va_range__impl2_new-20251204-153754 (22 test cases) ===
[FAIL] fix-a1-postcondition_repair-candidate-1.rs - disallowed changes
[FAIL] fix-a11-seqsetmap-candidate-1.rs - disallowed changes
[FAIL] fix-a12-seqsetmap-candidate-1.rs - disallowed changes
[FAIL] fix-a17-uselemma-candidate-1.rs - disallowed changes
[FAIL] fix-a20-uselemma-candidate-1.rs - disallowed changes
[FAIL] fix-a3-seqsetmap-candidate-1.rs - disallowed changes
[FAIL] fix-a4-seqsetmap-candidate-1.rs - disallowed changes
[FAIL] fix-a5-seqsetmap-candidate-1.rs - disallowed changes
[FAIL] fix-a6-seqsetmap-candidate-1.rs - disallowed changes
[FAIL] fix-a8-seqsetmap-candidate-1.rs - disallowed changes
6. This one is tricky. Semantically, they are equivalent wrt the exec portion but much more efforts are needed
from a checker's PoV to establish the equivalence...