Project

General

Profile

Download (442 Bytes) Statistics
| Branch: | Tag: | Revision:
1
node sub (in: int) returns (out: int);
2
(*@mode contract_sub (
3
     require in > 0 ;
4
     ensure out >= 0; );
5
*)
6
let
7
  out = 0 -> in + pre out ;
8
  -- Does not hold
9
  --%PROPERTY out >= 0 ;
10
tel
11

    
12
node top (in: int; clk: bool) returns (out: int);
13
(*@mode contract_top (
14
   require in >= 0 ;
15
   ensure out >= 0; --true -> out >= 0 ;
16
);
17
*)
18
var mem: int ;
19
let
20
  mem = 1 -> in + pre mem ;
21
  out = sub(mem) ;
22
  --%PROPERTY true -> out > pre out ;
23
tel
(14-14/14)