Commit 3ced3345 authored by POTTIER Francois's avatar POTTIER Francois

Renamings.

parent 6578c30a
...@@ -74,19 +74,19 @@ class virtual ['self] map = object (self : 'self) ...@@ -74,19 +74,19 @@ class virtual ['self] map = object (self : 'self)
_ -> _ ->
('env -> 'term1 -> 'term2) -> ('env -> 'term1 -> 'term2) ->
'env -> ('bn1, 'term1) abs -> ('bn2, 'term2) abs 'env -> ('bn1, 'term1) abs -> ('bn2, 'term2) abs
= fun _ f env (x1, t1) -> = fun _ visit_term env (x1, t1) ->
let x2, env' = self#extend x1 env in let x2, env' = self#extend x1 env in
x2, f env' t1 x2, visit_term env' t1
method private visit_def: 't1 't2 'u1 'u2 . method private visit_def: 't1 't2 'u1 'u2 .
_ -> _ ->
('env -> 't1 -> 't2) -> ('env -> 't1 -> 't2) ->
('env -> 'u1 -> 'u2) -> ('env -> 'u1 -> 'u2) ->
'env -> ('bn1, 't1, 'u1) def -> ('bn2, 't2, 'u2) def 'env -> ('bn1, 't1, 'u1) def -> ('bn2, 't2, 'u2) def
= fun _ f g env (recursive, x1, t1, u1) -> = fun _ visit_t visit_u env (recursive, x1, t1, u1) ->
let x2, env' = self#extend x1 env in let x2, env' = self#extend x1 env in
let t2 = f (choose recursive env env') t1 in let t2 = visit_t (choose recursive env env') t1 in
let u2 = g env' u1 in let u2 = visit_u env' u1 in
recursive, x2, t2, u2 recursive, x2, t2, u2
end end
...@@ -106,9 +106,9 @@ class virtual ['self] endo = object (self : 'self) ...@@ -106,9 +106,9 @@ class virtual ['self] endo = object (self : 'self)
_ -> _ ->
('env -> 'term -> 'term) -> ('env -> 'term -> 'term) ->
'env -> ('bn, 'term) abs -> ('bn, 'term) abs 'env -> ('bn, 'term) abs -> ('bn, 'term) abs
= fun _ f env ((x1, t1) as this) -> = fun _ visit_term env ((x1, t1) as this) ->
let x2, env' = self#extend x1 env in let x2, env' = self#extend x1 env in
let t2 = f env' t1 in let t2 = visit_term env' t1 in
if x1 == x2 && t1 == t2 then if x1 == x2 && t1 == t2 then
this this
else else
...@@ -119,10 +119,10 @@ class virtual ['self] endo = object (self : 'self) ...@@ -119,10 +119,10 @@ class virtual ['self] endo = object (self : 'self)
('env -> 't -> 't) -> ('env -> 't -> 't) ->
('env -> 'u -> 'u) -> ('env -> 'u -> 'u) ->
'env -> ('bn, 't, 'u) def -> ('bn, 't, 'u) def 'env -> ('bn, 't, 'u) def -> ('bn, 't, 'u) def
= fun _ f g env ((recursive, x1, t1, u1) as this) -> = fun _ visit_t visit_u env ((recursive, x1, t1, u1) as this) ->
let x2, env' = self#extend x1 env in let x2, env' = self#extend x1 env in
let t2 = f (choose recursive env env') t1 in let t2 = visit_t (choose recursive env env') t1 in
let u2 = g env' u1 in let u2 = visit_u env' u1 in
if x1 == x2 && t1 == t2 && u1 == u2 then if x1 == x2 && t1 == t2 && u1 == u2 then
this this
else else
...@@ -149,19 +149,19 @@ class virtual ['self] reduce = object (self : 'self) ...@@ -149,19 +149,19 @@ class virtual ['self] reduce = object (self : 'self)
_ -> _ ->
('env -> 'term -> 'z) -> ('env -> 'term -> 'z) ->
'env -> ('bn, 'term) abs -> 'z 'env -> ('bn, 'term) abs -> 'z
= fun _ f env (x, t) -> = fun _ visit_term env (x, t) ->
let env' = self#extend x env in let env' = self#extend x env in
self#restrict x (f env' t) self#restrict x (visit_term env' t)
method private visit_def: 't 'u . method private visit_def: 't 'u .
_ -> _ ->
('env -> 't -> 'z) -> ('env -> 't -> 'z) ->
('env -> 'u -> 'z) -> ('env -> 'u -> 'z) ->
'env -> ('bn, 't, 'u) def -> 'z 'env -> ('bn, 't, 'u) def -> 'z
= fun _ f g env (recursive, x, t, u) -> = fun _ visit_t visit_u env (recursive, x, t, u) ->
let env' = self#extend x env in let env' = self#extend x env in
let zt = f (choose recursive env env') t in let zt = visit_t (choose recursive env env') t in
let zu = self#restrict x (g env' u) in let zu = self#restrict x (visit_u env' u) in
self#plus zt zu self#plus zt zu
end end
...@@ -194,20 +194,20 @@ class virtual ['self] map2 = object (self : 'self) ...@@ -194,20 +194,20 @@ class virtual ['self] map2 = object (self : 'self)
_ -> _ ->
('env -> 'term1 -> 'term2 -> 'term3) -> ('env -> 'term1 -> 'term2 -> 'term3) ->
'env -> ('bn1, 'term1) abs -> ('bn2, 'term2) abs -> ('bn3, 'term3) abs 'env -> ('bn1, 'term1) abs -> ('bn2, 'term2) abs -> ('bn3, 'term3) abs
= fun _ f env (x1, t1) (x2, t2) -> = fun _ visit_term env (x1, t1) (x2, t2) ->
let x3, env' = self#extend x1 x2 env in let x3, env' = self#extend x1 x2 env in
x3, f env' t1 t2 x3, visit_term env' t1 t2
method private visit_def: 't1 'u1 't2 'u2 't3 'u3 . method private visit_def: 't1 'u1 't2 'u2 't3 'u3 .
_ -> _ ->
('env -> 't1 -> 't2 -> 't3) -> ('env -> 't1 -> 't2 -> 't3) ->
('env -> 'u1 -> 'u2 -> 'u3) -> ('env -> 'u1 -> 'u2 -> 'u3) ->
'env -> ('bn1, 't1, 'u1) def -> ('bn2, 't2, 'u2) def -> ('bn3, 't3, 'u3) def 'env -> ('bn1, 't1, 'u1) def -> ('bn2, 't2, 'u2) def -> ('bn3, 't3, 'u3) def
= fun _ f g env (recursive1, x1, t1, u1) (recursive2, x2, t2, u2) -> = fun _ visit_t visit_u env (recursive1, x1, t1, u1) (recursive2, x2, t2, u2) ->
if recursive1 <> recursive2 then VisitorsRuntime.fail(); if recursive1 <> recursive2 then VisitorsRuntime.fail();
let x3, env' = self#extend x1 x2 env in let x3, env' = self#extend x1 x2 env in
let t3 = f (choose recursive1 env env') t1 t2 in let t3 = visit_t (choose recursive1 env env') t1 t2 in
let u3 = g env' u1 u2 in let u3 = visit_u env' u1 u2 in
recursive1, x3, t3, u3 recursive1, x3, t3, u3
end end
...@@ -231,20 +231,20 @@ class virtual ['self] reduce2 = object (self : 'self) ...@@ -231,20 +231,20 @@ class virtual ['self] reduce2 = object (self : 'self)
_ -> _ ->
('env -> 'term1 -> 'term2 -> 'z) -> ('env -> 'term1 -> 'term2 -> 'z) ->
'env -> ('bn1, 'term1) abs -> ('bn2, 'term2) abs -> 'z 'env -> ('bn1, 'term1) abs -> ('bn2, 'term2) abs -> 'z
= fun _ f env (x1, t1) (x2, t2) -> = fun _ visit_term env (x1, t1) (x2, t2) ->
let env' = self#extend x1 x2 env in let env' = self#extend x1 x2 env in
self#restrict x1 x2 (f env' t1 t2) self#restrict x1 x2 (visit_term env' t1 t2)
method private visit_def: 't1 'u1 't2 'u2 . method private visit_def: 't1 'u1 't2 'u2 .
_ -> _ ->
('env -> 't1 -> 't2 -> 'z) -> ('env -> 't1 -> 't2 -> 'z) ->
('env -> 'u1 -> 'u2 -> 'z) -> ('env -> 'u1 -> 'u2 -> 'z) ->
'env -> ('bn1, 't1, 'u1) def -> ('bn2, 't2, 'u2) def -> 'z 'env -> ('bn1, 't1, 'u1) def -> ('bn2, 't2, 'u2) def -> 'z
= fun _ f g env (recursive1, x1, t1, u1) (recursive2, x2, t2, u2) -> = fun _ visit_t visit_u env (recursive1, x1, t1, u1) (recursive2, x2, t2, u2) ->
if recursive1 <> recursive2 then VisitorsRuntime.fail(); if recursive1 <> recursive2 then VisitorsRuntime.fail();
let env' = self#extend x1 x2 env in let env' = self#extend x1 x2 env in
let zt = f (choose recursive1 env env') t1 t2 in let zt = visit_t (choose recursive1 env env') t1 t2 in
let zu = self#restrict x1 x2 (g env' u1 u2) in let zu = self#restrict x1 x2 (visit_u env' u1 u2) in
self#plus zt zu self#plus zt zu
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment