summaryrefslogblamecommitdiff
path: root/tests/source/jeannet.scade
blob: 9fca06091d2cb1678ac546fe13596c08aac563d5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                   
node test() returns(x, y, probe z: int; a, b: bool)
var px, py: int;
let
  a = false -> pre b;
  b = true -> not pre a;

  px = pre x;
  py = pre y;

  x = 0 -> (if a = b then px + 1 else px);
  y = 0 -> (if a = b then py else py + 1);

  z = x - y;

  guarantee g1: x >= y;
tel