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

Renamings.

parent 6578c30a
......@@ -74,19 +74,19 @@ class virtual ['self] map = object (self : 'self)
_ ->
('env -> 'term1 -> 'term2) ->
'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
x2, f env' t1
x2, visit_term env' t1
method private visit_def: 't1 't2 'u1 'u2 .
_ ->
('env -> 't1 -> 't2) ->
('env -> 'u1 -> 'u2) ->
'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 t2 = f (choose recursive env env') t1 in
let u2 = g env' u1 in
let t2 = visit_t (choose recursive env env') t1 in
let u2 = visit_u env' u1 in
recursive, x2, t2, u2
end
......@@ -106,9 +106,9 @@ class virtual ['self] endo = object (self : 'self)
_ ->
('env -> 'term -> 'term) ->
'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 t2 = f env' t1 in
let t2 = visit_term env' t1 in
if x1 == x2 && t1 == t2 then
this
else
......@@ -119,10 +119,10 @@ class virtual ['self] endo = object (self : 'self)
('env -> 't -> 't) ->
('env -> 'u -> 'u) ->
'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 t2 = f (choose recursive env env') t1 in
let u2 = g env' u1 in
let t2 = visit_t (choose recursive env env') t1 in
let u2 = visit_u env' u1 in
if x1 == x2 && t1 == t2 && u1 == u2 then
this
else
......@@ -149,19 +149,19 @@ class virtual ['self] reduce = object (self : 'self)
_ ->
('env -> 'term -> 'z) ->
'env -> ('bn, 'term) abs -> 'z
= fun _ f env (x, t) ->
= fun _ visit_term env (x, t) ->
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 .
_ ->
('env -> 't -> 'z) ->
('env -> 'u -> '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 zt = f (choose recursive env env') t in
let zu = self#restrict x (g env' u) in
let zt = visit_t (choose recursive env env') t in
let zu = self#restrict x (visit_u env' u) in
self#plus zt zu
end
......@@ -194,20 +194,20 @@ class virtual ['self] map2 = object (self : 'self)
_ ->
('env -> 'term1 -> 'term2 -> 'term3) ->
'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
x3, f env' t1 t2
x3, visit_term env' t1 t2
method private visit_def: 't1 'u1 't2 'u2 't3 'u3 .
_ ->
('env -> 't1 -> 't2 -> 't3) ->
('env -> 'u1 -> 'u2 -> 'u3) ->
'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();
let x3, env' = self#extend x1 x2 env in
let t3 = f (choose recursive1 env env') t1 t2 in
let u3 = g env' u1 u2 in
let t3 = visit_t (choose recursive1 env env') t1 t2 in
let u3 = visit_u env' u1 u2 in
recursive1, x3, t3, u3
end
......@@ -231,20 +231,20 @@ class virtual ['self] reduce2 = object (self : 'self)
_ ->
('env -> 'term1 -> 'term2 -> '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
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 .
_ ->
('env -> 't1 -> 't2 -> 'z) ->
('env -> 'u1 -> 'u2 -> '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();
let env' = self#extend x1 x2 env in
let zt = f (choose recursive1 env env') t1 t2 in
let zu = self#restrict x1 x2 (g env' u1 u2) in
let zt = visit_t (choose recursive1 env env') t1 t2 in
let zu = self#restrict x1 x2 (visit_u env' u1 u2) in
self#plus zt zu
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