forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[move-prover] Implement opaque spec var updates.
This completes the implementation of the `update` condition to also work if used in opaque functions. Closes: aptos-labs#9180
- Loading branch information
1 parent
126aaf7
commit 8d472a6
Showing
4 changed files
with
241 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
language/move-prover/tests/sources/functional/global_vars.no_opaque_exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
Move prover returns: exiting with boogie verification errors | ||
error: post-condition does not hold | ||
┌─ tests/sources/functional/global_vars.move:41:9 | ||
│ | ||
41 │ ensures sum_of_T == 2; | ||
│ ^^^^^^^^^^^^^^^^^^^^^^ | ||
│ | ||
= at tests/sources/functional/global_vars.move:37: call_add_sub_invalid | ||
= at tests/sources/functional/global_vars.move:38: call_add_sub_invalid | ||
= at tests/sources/functional/global_vars.move:17: add | ||
= at tests/sources/functional/global_vars.move:18: add | ||
= at tests/sources/functional/global_vars.move:20 | ||
= at tests/sources/functional/global_vars.move:24: sub | ||
= at tests/sources/functional/global_vars.move:25: sub | ||
= at tests/sources/functional/global_vars.move:27 | ||
= at tests/sources/functional/global_vars.move:17: add | ||
= at tests/sources/functional/global_vars.move:18: add | ||
= at tests/sources/functional/global_vars.move:20 | ||
= at tests/sources/functional/global_vars.move:39: call_add_sub_invalid | ||
= at tests/sources/functional/global_vars.move:41 | ||
|
||
error: precondition does not hold at this call | ||
┌─ tests/sources/functional/global_vars.move:101:9 | ||
│ | ||
101 │ requires access_verified; | ||
│ ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
│ | ||
= at tests/sources/functional/global_vars.move:109: do_privileged_invalid | ||
= _s = <redacted> | ||
= at tests/sources/functional/global_vars.move:101 | ||
|
||
error: post-condition does not hold | ||
┌─ tests/sources/functional/global_vars.move:137:9 | ||
│ | ||
137 │ ensures type_has_property<u64>; | ||
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
│ | ||
= at tests/sources/functional/global_vars.move:133: expect_property_of_u64_invalid | ||
= at tests/sources/functional/global_vars.move:134: expect_property_of_u64_invalid | ||
= at tests/sources/functional/global_vars.move:121: give_property_to | ||
= at tests/sources/functional/global_vars.move:123 | ||
= at tests/sources/functional/global_vars.move:135: expect_property_of_u64_invalid | ||
= at tests/sources/functional/global_vars.move:137 | ||
|
||
error: global memory invariant does not hold | ||
┌─ tests/sources/functional/global_vars.move:174:5 | ||
│ | ||
174 │ invariant global<R>(@0).v <= limit; | ||
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
│ | ||
= at tests/sources/functional/global_vars.move:196: limit_change_invalid | ||
= s = <redacted> | ||
= at tests/sources/functional/global_vars.move:197: limit_change_invalid | ||
= at tests/sources/functional/global_vars.move:176: publish | ||
= s = <redacted> | ||
= at tests/sources/functional/global_vars.move:177: publish | ||
= at tests/sources/functional/global_vars.move:178: publish | ||
= at tests/sources/functional/global_vars.move:198: limit_change_invalid | ||
= at tests/sources/functional/global_vars.move:200 | ||
= at tests/sources/functional/global_vars.move:174 | ||
|
||
error: post-condition does not hold | ||
┌─ tests/sources/functional/global_vars.move:76:9 | ||
│ | ||
76 │ ensures sum_of_T == 2; | ||
│ ^^^^^^^^^^^^^^^^^^^^^^ | ||
│ | ||
= at tests/sources/functional/global_vars.move:72: opaque_call_add_sub_invalid | ||
= at tests/sources/functional/global_vars.move:73: opaque_call_add_sub_invalid | ||
= at tests/sources/functional/global_vars.move:48: opaque_add | ||
= at tests/sources/functional/global_vars.move:49: opaque_add | ||
= at tests/sources/functional/global_vars.move:53 | ||
= at tests/sources/functional/global_vars.move:57: opaque_sub | ||
= at tests/sources/functional/global_vars.move:58: opaque_sub | ||
= at tests/sources/functional/global_vars.move:62 | ||
= at tests/sources/functional/global_vars.move:48: opaque_add | ||
= at tests/sources/functional/global_vars.move:49: opaque_add | ||
= at tests/sources/functional/global_vars.move:53 | ||
= at tests/sources/functional/global_vars.move:74: opaque_call_add_sub_invalid | ||
= at tests/sources/functional/global_vars.move:76 | ||
|
||
error: post-condition does not hold | ||
┌─ tests/sources/functional/global_vars.move:161:9 | ||
│ | ||
161 │ ensures type_has_property<u64>; | ||
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
│ | ||
= at tests/sources/functional/global_vars.move:157: opaque_expect_property_of_u64_invalid | ||
= at tests/sources/functional/global_vars.move:158: opaque_expect_property_of_u64_invalid | ||
= at tests/sources/functional/global_vars.move:144: opaque_give_property_to | ||
= at tests/sources/functional/global_vars.move:147 | ||
= at tests/sources/functional/global_vars.move:159: opaque_expect_property_of_u64_invalid | ||
= at tests/sources/functional/global_vars.move:161 | ||
|
||
error: global memory invariant does not hold | ||
┌─ tests/sources/functional/global_vars.move:174:5 | ||
│ | ||
174 │ invariant global<R>(@0).v <= limit; | ||
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
│ | ||
= at tests/sources/functional/global_vars.move:188: update_invalid | ||
= at tests/sources/functional/global_vars.move:189: update_invalid | ||
= at tests/sources/functional/global_vars.move:174 |