Commit c27ee110 authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

minor

parent d6538090
......@@ -1896,33 +1896,32 @@ let f_map_simp fnT fnF f = f_label_copy f (match f.f_node with
let f_map_simp fnT = f_map_simp (protect fnT)
(** Proposition of another fold *)
(* Type in terms and formulae *)
let rec t_fold_ty fty s t =
let s = t_fold_unsafe (t_fold_ty fty) (f_fold_ty fty) s t in
let s = fty s t.t_ty in
(* Fold over types in terms and formulas *)
let rec t_fold_ty fty acc t =
let acc = t_fold_unsafe (t_fold_ty fty) (f_fold_ty fty) acc t in
let acc = fty acc t.t_ty in
match t.t_node with
| Teps fb ->
let vs,_,_ = fb in
fty s vs.vs_ty
| _ -> s
| Teps (vs,_,_) -> fty acc vs.vs_ty
| _ -> acc
and f_fold_ty fty s f =
let s = f_fold_unsafe (t_fold_ty fty) (f_fold_ty fty) s f in
and f_fold_ty fty acc f =
let acc = f_fold_unsafe (t_fold_ty fty) (f_fold_ty fty) acc f in
match f.f_node with
| Fquant (_,fq) ->
let (vsl,_,_,_) = fq in
List.fold_left (fun s vs -> fty s vs.vs_ty) s vsl
| _ -> s
| Fquant (_,(vsl,_,_,_)) ->
List.fold_left (fun acc vs -> fty acc vs.vs_ty) acc vsl
| _ -> acc
(* Fold over EXACTLY WHAT? in terms and formulas *)
let rec t_fold_sig fty s t =
let s = t_fold_unsafe (t_fold_sig fty) (f_fold_sig fty) s t in
let rec t_fold_sig fty acc t =
let acc = t_fold_unsafe (t_fold_sig fty) (f_fold_sig fty) acc t in
match t.t_node with
| Tapp (fs,tl) -> fty s fs (List.map (fun t -> t.t_ty) tl)
| _ -> s
| Tapp (fs,tl) -> fty acc fs (List.map (fun t -> t.t_ty) tl)
| _ -> acc
and f_fold_sig fty s f =
let s = f_fold_unsafe (t_fold_sig fty) (f_fold_sig fty) s f in
and f_fold_sig fty acc f =
let acc = f_fold_unsafe (t_fold_sig fty) (f_fold_sig fty) acc f in
match f.f_node with
| Fapp (fs,tl) -> fty s fs (List.map (fun t -> t.t_ty) tl)
| _ -> s
| Fapp (fs,tl) -> fty acc fs (List.map (fun t -> t.t_ty) tl)
| _ -> acc
......@@ -424,6 +424,7 @@ val list_map_cont : (('a -> 'b) -> 'c -> 'b) ->
('a list -> 'b) -> 'c list -> 'b
(** simplification map *)
val f_map_simp : (term -> term) -> (fmla -> fmla) -> fmla -> fmla
(** map/fold over free variables *)
......@@ -472,6 +473,7 @@ val f_ty_freevars : Stv.t -> fmla -> Stv.t
val t_equal_alpha : term -> term -> bool
val f_equal_alpha : fmla -> fmla -> bool
module Hterm_alpha : Hashtbl.S with type key = term
module Hfmla_alpha : Hashtbl.S with type key = fmla
......@@ -506,7 +508,8 @@ exception NoMatch
val t_match : term Mvs.t -> term -> term -> term Mvs.t
val f_match : term Mvs.t -> fmla -> fmla -> term Mvs.t
(** Proposition of another fold *)
(** fold over types in terms and formulas *)
val t_fold_ty : ('a -> ty -> 'a) -> 'a -> term -> 'a
val f_fold_ty : ('a -> ty -> 'a) -> 'a -> fmla -> 'a
......
......@@ -87,7 +87,7 @@ val ty_all : (ty -> bool) -> ty -> bool
val ty_any : (ty -> bool) -> ty -> bool
(** {3 symbol-wise map/fold} *)
(** visites every symbol of the type} *)
(** visits every symbol of the type} *)
val ty_s_map : (tysymbol -> tysymbol) -> ty -> ty
val ty_s_fold : ('a -> tysymbol -> 'a) -> 'a -> ty -> 'a
val ty_s_all : (tysymbol -> bool) -> ty -> bool
......
......@@ -13,7 +13,6 @@ val load : ?dirs:string list -> plugin -> unit
plugin named [plugin]. It add the extension .cmo or .cmxs to the
filename according to the compilation used for the main program *)
type plu =
(* not a plugin extension *)
| Plubad
......
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