-
Notifications
You must be signed in to change notification settings - Fork 112
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
Actually parse structured program elements #777
Changes from all commits
bf35529
d6f0961
f52e6c1
af6c231
e0c1c7d
cc67990
3b8ee14
5d25c72
7a87d2d
5555600
d0a04e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,94 @@ | ||
// RUN: %boogie "%s" > "%t.plain" | ||
// RUN: %diff "%s.expect" "%t.plain" | ||
// RUN: %boogie -trackVerificationCoverage -trace "%s" > "%t.coverage" | ||
// RUN %OutputCheck "%s" --file-to-check="%t.coverage" | ||
// CHECK: Covered elements: a0, assert_a0, assert_r0, r0 | ||
// CHECK: Covered elements: sinv_not_1$established, sinv_not_1$maintained, sinv1$assume_in_body, sinv1$established, sinv1$maintained, sinv2$assume_in_body, sinv2$established, sinv2$maintained, spost, spre1 | ||
// CHECK: Covered elements: cont_assume_1, cont_assume_2 | ||
// CHECK: Covered elements: false_req | ||
// CHECK: Covered elements: cont_req_1, cont_req_2 | ||
// CHECK: Covered elements: assumeFalse | ||
// CHECK: Covered elements: tee0, tee1, ter0 | ||
// CHECK: Covered elements: call2_tee1, tee_not_1, tee0$call1$ensures, tee0$call2$ensures, tee1$call2$ensures, ter0$call1$requires, ter0$call2$requires, ter1, xy_sum | ||
// CHECK: Covered elements: a_gt_10, constrained, x_gt_10 | ||
// CHECK: Covered elements: cont_ens_abs$call_cont$ensures, xpos_abs$call_cont$requires, xpos_caller | ||
// CHECK: Elements covered by verification: a_gt_10, a0, assert_a0, assert_r0, assumeFalse, call2_tee1, constrained, cont_assume_1, cont_assume_2, cont_ens_abs$call_cont$ensures, cont_req_1, cont_req_2, false_req, r0, sinv_not_1$established, sinv_not_1$maintained, sinv1$assume_in_body, sinv1$established, sinv1$maintained, sinv2$assume_in_body, sinv2$established, sinv2$maintained, spost, spre1, tee_not_1, tee0, tee0$call1$ensures, tee0$call2$ensures, tee1, tee1$call2$ensures, ter0, ter0$call1$requires, ter0$call2$requires, ter1, x_gt_10, xpos_abs$call_cont$requires, xpos_caller, xy_sum | ||
// RUN: %OutputCheck "%s" --file-to-check="%t.coverage" | ||
// CHECK: Proof dependencies: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Side note: if you're checking for the literal output line-by-line without anything expected in between, it's more strict and probably more efficient to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, yeah, it would probably make sense for some (but not all) of these to be |
||
// CHECK: a0 | ||
// CHECK: assert_a0 | ||
// CHECK: assert_r0 | ||
// CHECK: r0 | ||
// CHECK: Proof dependencies: | ||
// CHECK: invariant sinv_not_1 established | ||
// CHECK: invariant sinv_not_1 maintained | ||
// CHECK: invariant sinv1 assumed in body | ||
// CHECK: invariant sinv1 established | ||
// CHECK: invariant sinv1 maintained | ||
// CHECK: invariant sinv2 assumed in body | ||
// CHECK: invariant sinv2 established | ||
// CHECK: invariant sinv2 maintained | ||
// CHECK: spost | ||
// CHECK: spre1 | ||
// CHECK: Proof dependencies: | ||
// CHECK: cont_assume_1 | ||
// CHECK: cont_assume_2 | ||
// CHECK: Proof dependencies: | ||
// CHECK: false_req | ||
// CHECK: Proof dependencies: | ||
// CHECK: cont_req_1 | ||
// CHECK: cont_req_2 | ||
// CHECK: Proof dependencies: | ||
// CHECK: assumeFalse | ||
// CHECK: Proof dependencies: | ||
// CHECK: tee0 | ||
// CHECK: tee1 | ||
// CHECK: ter0 | ||
// CHECK: Proof dependencies: | ||
// CHECK: call2_tee1 | ||
// CHECK: ensures clause tee0 from call call1 | ||
// CHECK: ensures clause tee0 from call call2 | ||
// CHECK: ensures clause tee1 from call call2 | ||
// CHECK: requires clause ter0 proved for call call1 | ||
// CHECK: requires clause ter0 proved for call call2 | ||
// CHECK: tee_not_1 | ||
// CHECK: ter1 | ||
// CHECK: xy_sum | ||
// CHECK: Proof dependencies: | ||
// CHECK: a_gt_10 | ||
// CHECK: constrained | ||
// CHECK: x_gt_10 | ||
// CHECK: Proof dependencies: | ||
// CHECK: ensures clause cont_ens_abs from call call_cont | ||
// CHECK: requires clause xpos_abs proved for call call_cont | ||
// CHECK: xpos_caller | ||
// CHECK: Proof dependencies of whole program: | ||
// CHECK: a_gt_10 | ||
// CHECK: a0 | ||
// CHECK: assert_a0 | ||
// CHECK: assert_r0 | ||
// CHECK: assumeFalse | ||
// CHECK: call2_tee1 | ||
// CHECK: constrained | ||
// CHECK: cont_assume_1 | ||
// CHECK: cont_assume_2 | ||
// CHECK: cont_req_1 | ||
// CHECK: cont_req_2 | ||
// CHECK: ensures clause cont_ens_abs from call call_cont | ||
// CHECK: ensures clause tee0 from call call1 | ||
// CHECK: ensures clause tee0 from call call2 | ||
// CHECK: ensures clause tee1 from call call2 | ||
// CHECK: false_req | ||
// CHECK: invariant sinv_not_1 established | ||
// CHECK: invariant sinv_not_1 maintained | ||
// CHECK: invariant sinv1 assumed in body | ||
// CHECK: invariant sinv1 established | ||
// CHECK: invariant sinv1 maintained | ||
// CHECK: invariant sinv2 assumed in body | ||
// CHECK: invariant sinv2 established | ||
// CHECK: invariant sinv2 maintained | ||
// CHECK: r0 | ||
// CHECK: requires clause ter0 proved for call call1 | ||
// CHECK: requires clause ter0 proved for call call2 | ||
// CHECK: requires clause xpos_abs proved for call call_cont | ||
// CHECK: spost | ||
// CHECK: spre1 | ||
// CHECK: tee_not_1 | ||
// CHECK: tee0 | ||
// CHECK: tee1 | ||
// CHECK: ter0 | ||
// CHECK: ter1 | ||
// CHECK: x_gt_10 | ||
// CHECK: xpos_caller | ||
// CHECK: xy_sum | ||
// RUN: %boogie -trackVerificationCoverage "%s" > "%t.coverage" | ||
// RUN: %diff "%s.expect" "%t.coverage" | ||
// RUN: %boogie -trackVerificationCoverage -typeEncoding:a -prune "%s" > "%t.coverage-a" | ||
|
@@ -21,8 +97,8 @@ | |
// RUN: %diff "%s.expect" "%t.coverage-p" | ||
// RUN: %boogie -trackVerificationCoverage -normalizeDeclarationOrder:1 -prune "%s" > "%t.coverage-d" | ||
// RUN: %diff "%s.expect" "%t.coverage-d" | ||
// RUN %boogie -trackVerificationCoverage -normalizeNames:1 -prune "%s" > "%t.coverage-n" | ||
// RUN %diff "%s.expect" "%t.coverage-n" | ||
// RUN: %boogie -trackVerificationCoverage -normalizeNames:1 -prune "%s" > "%t.coverage-n" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oof, I wish I had a concrete suggestion for how to catch this type of testing error. :P There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Me too! |
||
// RUN: %diff "%s.expect" "%t.coverage-n" | ||
// UNSUPPORTED: batch_mode | ||
|
||
procedure testRequiresAssign(n: int) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take it these two lines were the fundamental bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep.