diff options
author | stefanheule <unknown> | 2012-02-25 03:31:54 -0800 |
---|---|---|
committer | stefanheule <unknown> | 2012-02-25 03:31:54 -0800 |
commit | 2b9a97c7197244afea26bd8fa8f55bd811bf0a2a (patch) | |
tree | 9adaf4bbc11a784ec0ff41bb145d9ffd97326b11 /Chalice | |
parent | 1a6556873b92f341d46da81f84adbb6afb6c2b69 (diff) |
Chalice: Add testcase for mutually recursive predicates (failed before the last commit).
Diffstat (limited to 'Chalice')
-rw-r--r-- | Chalice/tests/predicates/mutual-dependence.chalice | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Chalice/tests/predicates/mutual-dependence.chalice b/Chalice/tests/predicates/mutual-dependence.chalice new file mode 100644 index 00000000..a0939607 --- /dev/null +++ b/Chalice/tests/predicates/mutual-dependence.chalice @@ -0,0 +1,24 @@ +class Cell {
+ var value: int;
+ var next: Cell;
+
+ predicate p { q }
+ predicate q { acc(value) && acc(next) && (next != null ==> next.p) }
+
+ method test()
+ requires acc(this.*)
+ {
+ value := 1
+ next := null
+ fold q
+ fold p
+ call void()
+ assert unfolding p in unfolding q in value == 1 // ERROR: should not verify
+ }
+
+ method void()
+ requires p
+ ensures p
+ {}
+
+}
|