diff options
author | Checkmate50 <dgeisler50@gmail.com> | 2016-06-06 23:14:18 -0600 |
---|---|---|
committer | Checkmate50 <dgeisler50@gmail.com> | 2016-06-06 23:14:18 -0600 |
commit | d652155ae013f36a1ee17653a8e458baad2d9c2c (patch) | |
tree | 067d600fe3cd1723afc11682935f0123a1eab653 /Test/test2/LambdaOldExpressions.bpl | |
parent | d7fc0deb2ca6d7ebee094b6ea5430d9b41f163ec (diff) |
Merging complete. Everything looks good *crosses fingers*
Diffstat (limited to 'Test/test2/LambdaOldExpressions.bpl')
-rw-r--r-- | Test/test2/LambdaOldExpressions.bpl | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/Test/test2/LambdaOldExpressions.bpl b/Test/test2/LambdaOldExpressions.bpl index e865f4ab..24ce498d 100644 --- a/Test/test2/LambdaOldExpressions.bpl +++ b/Test/test2/LambdaOldExpressions.bpl @@ -1,63 +1,63 @@ -// RUN: %boogie -noinfer "%s" > "%t"
-// RUN: %diff "%s.expect" "%t"
-var b: bool;
-
-
-procedure p0();
- requires b;
- modifies b;
- ensures (lambda x: bool :: {:MyAttr "put an attr here", !b} old(b))[true];
- ensures !(lambda x: bool :: {:AnotherAttr "yes, why not", b} {:ABC b, b, old(b)} b)[true];
-
-implementation p0()
-{
- b := !b;
- assert (lambda x: bool :: old(b))[true];
- assert !(lambda x: bool :: b)[true];
-}
-
-
-procedure p1();
- requires !b;
- modifies b;
- ensures (lambda x: bool :: old(b))[true]; // error
-
-implementation p1()
-{
- b := !b;
- assert !(lambda x: bool :: old(b))[true];
-}
-
-
-procedure p2();
- requires b;
- modifies b;
- ensures (lambda x: bool :: old(b) != b)[true];
-
-implementation p2()
-{
- b := !b;
- assert (lambda x: bool :: old(b) != b)[true];
-}
-
-
-procedure p3();
- requires b;
- modifies b;
- ensures (lambda x: int :: old(old(b)) != b)[15];
-
-implementation p3()
-{
- b := !b;
- assert (lambda x: int :: old(old(b)) != b)[15];
-}
-
-// Note that variables (inside and outside old expressions) mentioned
-// in attributes (even if they are not mentioned in the body of the
-// lambda) are also picked up by the auto-generated lambda functions,
-// so that the attributes can be copied to the function and axiom.
-var h: int;
-procedure TestAttributeParameters()
- ensures (lambda x: int :: {:MyAttribute old(h), h} x < 100)[23];
-{
-}
+// RUN: %boogie -noinfer "%s" > "%t" +// RUN: %diff "%s.expect" "%t" +var b: bool; + + +procedure p0(); + requires b; + modifies b; + ensures (lambda x: bool :: {:MyAttr "put an attr here", !b} old(b))[true]; + ensures !(lambda x: bool :: {:AnotherAttr "yes, why not", b} {:ABC b, b, old(b)} b)[true]; + +implementation p0() +{ + b := !b; + assert (lambda x: bool :: old(b))[true]; + assert !(lambda x: bool :: b)[true]; +} + + +procedure p1(); + requires !b; + modifies b; + ensures (lambda x: bool :: old(b))[true]; // error + +implementation p1() +{ + b := !b; + assert !(lambda x: bool :: old(b))[true]; +} + + +procedure p2(); + requires b; + modifies b; + ensures (lambda x: bool :: old(b) != b)[true]; + +implementation p2() +{ + b := !b; + assert (lambda x: bool :: old(b) != b)[true]; +} + + +procedure p3(); + requires b; + modifies b; + ensures (lambda x: int :: old(old(b)) != b)[15]; + +implementation p3() +{ + b := !b; + assert (lambda x: int :: old(old(b)) != b)[15]; +} + +// Note that variables (inside and outside old expressions) mentioned +// in attributes (even if they are not mentioned in the body of the +// lambda) are also picked up by the auto-generated lambda functions, +// so that the attributes can be copied to the function and axiom. +var h: int; +procedure TestAttributeParameters() + ensures (lambda x: int :: {:MyAttribute old(h), h} x < 100)[23]; +{ +} |