summaryrefslogtreecommitdiff
path: root/Test/AbsHoudini/f1.bpl
diff options
context:
space:
mode:
authorGravatar Unknown <akashl@akash-desk.fareast.corp.microsoft.com>2012-11-05 15:52:27 +0530
committerGravatar Unknown <akashl@akash-desk.fareast.corp.microsoft.com>2012-11-05 15:52:27 +0530
commit8cc5d9cc9d455b42fc19881f29da47a08f10d8e1 (patch)
treeea6223c6b4ced1492e832f35d0229e25c86a06ab /Test/AbsHoudini/f1.bpl
parentda91e455665b6874af1af29aed37599247f5ece5 (diff)
Added Abstract Houdini: an implementation of Houdini based on abstract domains.
Currently only predicate-abstraction domain is supported.
Diffstat (limited to 'Test/AbsHoudini/f1.bpl')
-rw-r--r--Test/AbsHoudini/f1.bpl32
1 files changed, 32 insertions, 0 deletions
diff --git a/Test/AbsHoudini/f1.bpl b/Test/AbsHoudini/f1.bpl
new file mode 100644
index 00000000..5ea6797b
--- /dev/null
+++ b/Test/AbsHoudini/f1.bpl
@@ -0,0 +1,32 @@
+var g: int;
+
+procedure {:entrypoint} main()
+ modifies g;
+{
+ var x: int;
+ var c: bool;
+
+ g := 1;
+
+ if(c) {
+ g := g + 1;
+ } else {
+ g := 3;
+ }
+
+ call foo();
+
+ if(old(g) == 0) { g := 1; }
+}
+
+procedure foo()
+ modifies g;
+{
+ g := g + 1;
+}
+
+procedure {:template} summaryTemplate();
+ ensures g == old(g) + 1;
+ ensures g == old(g) + 2;
+ ensures g == old(g) + 3;
+ ensures {:pre} old(g) == 0;