summaryrefslogtreecommitdiff
path: root/Test/AbsHoudini/test1.bpl
diff options
context:
space:
mode:
Diffstat (limited to 'Test/AbsHoudini/test1.bpl')
-rw-r--r--Test/AbsHoudini/test1.bpl36
1 files changed, 36 insertions, 0 deletions
diff --git a/Test/AbsHoudini/test1.bpl b/Test/AbsHoudini/test1.bpl
new file mode 100644
index 00000000..e6ce06c9
--- /dev/null
+++ b/Test/AbsHoudini/test1.bpl
@@ -0,0 +1,36 @@
+var g: bool;
+
+procedure foo()
+modifies g;
+ensures b0 ==> (!old(g) ==> old(g) == g);
+{
+ call AcquireLock();
+ call ReleaseLock();
+}
+
+procedure AcquireLock()
+modifies g;
+ensures b1 ==> old(g) == g;
+{
+ g := true;
+}
+
+procedure ReleaseLock()
+modifies g;
+ensures b2 ==> old(g) == g;
+{
+ g := false;
+}
+
+procedure main()
+modifies g;
+{
+ g := false;
+ call foo();
+ assert !g;
+}
+
+const {:existential true} b0: bool;
+const {:existential true} b1: bool;
+const {:existential true } b2: bool;
+