diff options
author | mikebarnett <unknown> | 2009-07-15 21:03:41 +0000 |
---|---|---|
committer | mikebarnett <unknown> | 2009-07-15 21:03:41 +0000 |
commit | ce1c2de044c91624370411e23acab13b0381949b (patch) | |
tree | 592539996fe08050ead5ee210c973801611dde40 /Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl |
Initial set of files.
Diffstat (limited to 'Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl')
-rw-r--r-- | Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl b/Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl new file mode 100644 index 00000000..f1be4414 --- /dev/null +++ b/Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl @@ -0,0 +1,30 @@ +// simple assert
+procedure asserting() {
+ var x: int;
+
+ x := 0;
+
+ assert x == 1;
+}
+
+// invariant failing initially
+procedure loopInvInitiallyViolated(y: int) {
+ var x: int;
+
+ x := y;
+
+ while (true) invariant (x == 1); {
+ x := 1;
+ }
+}
+
+// invariant failing after iteration
+procedure loopInvMaintenanceViolated() {
+ var x: int;
+
+ x := 0;
+
+ while (true) invariant x == 0; {
+ x := 1;
+ }
+}
|