nettoyagae interface Transform

parent 87a0b0f9
......@@ -82,11 +82,11 @@ let fold ?clear f_fold v_empty =
let fold_map ?clear f_fold v_empty =
let v_empty = v_empty,init_context in
let f_fold ctxt (env,ctxt2) = f_fold ctxt ctxt2 env in
let f_fold ctxt env_ctxt2 = f_fold ctxt env_ctxt2 in
conv_res (fold ?clear f_fold v_empty) snd
let map ?clear f_map =
fold_map ?clear (fun ctxt1 ctxt2 () -> (),f_map ctxt1 ctxt2) ()
fold_map ?clear (fun ctxt1 ctxt2 -> (), f_map ctxt1 (snd ctxt2)) ()
let map_concat ?clear f_elt =
let f_elt ctxt0 ctxt =
......@@ -126,7 +126,7 @@ let fold_context_of_decl f ctxt env ctxt_done d =
let env,decls = f ctxt env d in
env,List.fold_left add_decl ctxt_done decls
let split_goals =
let split_goals () =
let f ctxt0 (ctxt,l) =
let decl = ctxt0.ctxt_decl in
match decl.d_node with
......
......@@ -52,7 +52,7 @@ val fold :
val fold_map :
?clear:(unit -> unit) ->
(context -> context -> 'a -> ('a * context)) -> 'a ->
(context -> 'a * context -> 'a * context) -> 'a ->
context t
val map :
......@@ -80,6 +80,7 @@ val elt :
| Ouse of theory
| Oclone of (ident * ident) list
*)
(*
val elt_of_oelt :
ty:(ty_decl -> ty_decl) ->
logic:(logic_decl -> logic_decl) ->
......@@ -89,16 +90,13 @@ val elt_of_oelt :
clone:(theory -> (ident * ident) list -> decl list) ->
(decl -> decl list)
val fold_context_of_decl:
(context -> 'a -> decl -> 'a * decl list) ->
context -> 'a -> context -> decl -> ('a * context)
*)
(* Utils *)
val unit_tag : unit -> int
val split_goals : context list t
val extract_goals : (Ident.ident * Term.fmla * context) list t
val split_goals : unit -> context list t
val identity : context t
......@@ -92,7 +92,7 @@ let type_file env file =
Typing.add_from_file env file
let extract_goals ctxt =
Transform.apply Transform.split_goals ctxt
Transform.apply (Transform.split_goals ()) ctxt
let transform env l =
let l = List.map
......
......@@ -66,7 +66,7 @@ and replacep env f =
and substt env d = t_map (replacet env) (replacep env) d
and substp env d = f_map (replacet env) (replacep env) d
let fold isnotinlinedt isnotinlinedf ctxt0 ctxt env =
let fold isnotinlinedt isnotinlinedf ctxt0 (env, ctxt) =
(* Format.printf "I see : %a@\n%a@\n" Pretty.print_decl d print_env env;*)
let d = ctxt0.ctxt_decl in
match d.d_node with
......
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