let get_linfo name sgn =
let ptype = mk_linfo_type sgn in
let linfos = Logic_env.find_all_logic_functions name in
let info_ok info = Logic_utils.is_same_type info.l_var_info.lv_type ptype in
let rec find l = match l with [] -> None
| info::l -> if info_ok info then Some info else find l
in match find linfos with
| Some info -> info
| None ->
let name = match linfos with [] -> name
| _ -> incr get_linfo_cpt; (name ^ (string_of_int !get_linfo_cpt))
in
let linfo = make_logic_info name sgn in
Logic_utils.add_logic_function linfo;
linfo