
use int.Int

type t = { mutable c : int }

val z: t

let g (x: int)
  writes { z.c }
  ensures { z.c > old z.c }
  ensures { result = x + 1 }
= z.c <- z.c + 1;
  x + 1

let f () =
  z.c <- 0;
  let w = g 2 + 3 in
  assert { z.c = 1 }
