Module Imandra_util.Util
Some simple utilities useful for Imandra
val failwithf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'aFormatting wrapper to
failwithExample:failwithf "%s bad term %a" "ohnoes" Term.print t
val join_path : (string * string) -> stringRevere of
split_path
val pp_hr : Stdlib.Format.formatter -> unit -> unitval batch_banner : stringval print_banner : unit -> unitPrint banner
val flat_map : ('a -> 'b list) -> 'a list -> 'b listval zip : 'a list -> 'b list -> ('a * 'b) listZip of the common prefix of the lists
val combine_hashes : int -> int -> intval str_for_all : (char -> bool) -> string -> boolval str_exists : (char -> bool) -> string -> boolval sanitize_name : string -> string
module Lex_class : sig ... endval remove_dups_with : (module CCHashtbl.S with type key = 'a) -> 'a list -> 'a listval remove_dups_poly : 'a list -> 'a listval map_c : ?base:int -> ('a -> int -> 'b) -> 'a list -> 'b listSimilar to
List.mapi but with an initial offsetbase
val iter_c : ?base:int -> ('a -> int -> unit) -> 'a list -> unitSimilar to
List.iteri but with an initial offsetbase
val list_of_hashtbl : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) listval suggest_correction : ?dist:int -> string -> ((string -> unit) -> unit) -> string optionsuggest_correction ?dist s sequses the sequenceseqof available items to suggest corrections to some failing querys. It returns a string with suggestions, orNone.- parameter dist
max distance acceptable for a suggestion
val q_to_float : Q.t -> floatval gen_exists : ('a -> bool) -> 'a gen -> boolval escape_dot : string -> stringEscaping for graphviz labels
val enable_warnings : unit -> unitval disable_warnings : unit -> unitval ptime_now : unit -> floatUse
ptimeto get a precise timestamp
module Stopwatch : sig ... endmodule Str_map : CCMap.S with type Str_map.key = stringmodule Str_set : CCSet.S with type Str_set.elt = stringmodule Str_tbl : CCHashtbl.S with type Str_tbl.key = stringmodule Int_tbl : CCHashtbl.S with type Int_tbl.key = intmodule Int_set : CCSet.S with type Int_set.elt = intmodule Int_map : CCMap.S with type Int_map.key = intval gensym : unit -> stringval print_int : Stdlib.Format.formatter -> int -> unitval print_float : Stdlib.Format.formatter -> float -> unitval tweak_gc : unit -> unitval len_filtered : ('a -> bool) -> 'a list -> intval interpret_path : string -> stringval parse_tcp_addr : string -> (Unix.inet_addr * int, string) Stdlib.resultval time : (unit -> 'a) -> 'a