class A { method m(i: int) returns (x: int) ensures x == i; { var j := 0; var v [v == i + j]; x := v; } method n() { var x := 0; var y := 1; var z := 2; } } class B refines A { transforms m(i: int) returns (x: int, y: int) ensures y == 0; { var t := 0; _ replaces v by { var v := i + j; call t, j := m(0); y := j; } _ } transforms n() { replaces * by { var x := 0; var y := x + 1; var z := 2*y; } } }