summaryrefslogtreecommitdiff
path: root/Test/snapshots/Snapshots39.v2.bpl
blob: 4bdc4b6ec0d7a9e76d61d638e55efa630121c311 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
procedure {:checksum "-1"} Callee();

implementation {:id "Callee"} {:checksum "2"} Callee()
{
    var r: int;

    call r := Sum(42);
    assert r != 0;
    assert r == (42 * 43) div 2;
}

procedure {:checksum "3"} Sum(n: int) returns (r: int);
  requires 0 <= n;
  ensures r == (n * (n + 1)) div 2;