oldify.mlw 544 Bytes
Newer Older
1
module M
2

3
  use import module ref.Ref
4

5
  logic q1 int int int
6

7
  parameter r : ref int
8

9
  parameter f1 : y:int ->
10
             {} unit writes r { q1 !r (old !r) y }
11

12
  let g1 () = {} f1 !r { q1 !r (old !r) (old !r) }
13

14 15
  logic foo int : int
  logic q int int int
16

17 18
  parameter f : t:ref int -> x:int ->
             {} unit writes t { q !t (old !t) x }
19

20 21 22
  let g (t:ref int) =
    {}
    f t (foo !t)
23
    { q !t (old !t) (foo (old !t)) }
24

25
end
26 27

(*
28
Local Variables:
29
compile-command: "unset LANG; make -C ../../.. bench/programs/good/oldify"
30
End:
31
*)