Module Imandra_util.Util
Some simple utilities useful for Imandra
val failwithf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
Formatting wrapper to
failwith
Example:failwithf "%s bad term %a" "ohnoes" Term.print t
val join_path : (string * string) -> string
Revere of
split_path
val pp_hr : Stdlib.Format.formatter -> unit -> unit
val batch_banner : string
val print_banner : unit -> unit
Print banner
val flat_map : ('a -> 'b list) -> 'a list -> 'b list
val zip : 'a list -> 'b list -> ('a * 'b) list
Zip of the common prefix of the lists
val combine_hashes : int -> int -> int
val str_for_all : (char -> bool) -> string -> bool
val str_exists : (char -> bool) -> string -> bool
val sanitize_name : string -> string
module Lex_class : sig ... end
val remove_dups_with : (module CCHashtbl.S with type key = 'a) -> 'a list -> 'a list
val remove_dups_poly : 'a list -> 'a list
val map_c : ?base:int -> ('a -> int -> 'b) -> 'a list -> 'b list
Similar to
List
.mapi but with an initial offsetbase
val iter_c : ?base:int -> ('a -> int -> unit) -> 'a list -> unit
Similar to
List
.iteri but with an initial offsetbase
val list_of_hashtbl : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) list
val suggest_correction : ?dist:int -> string -> ((string -> unit) -> unit) -> string option
suggest_correction ?dist s seq
uses the sequenceseq
of 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 -> float
val gen_exists : ('a -> bool) -> 'a gen -> bool
val escape_dot : string -> string
Escaping for graphviz labels
val enable_warnings : unit -> unit
val disable_warnings : unit -> unit
val ptime_now : unit -> float
Use
ptime
to get a precise timestamp
module Stopwatch : sig ... end
module Str_map : CCMap.S with type Str_map.key = string
module Str_set : CCSet.S with type Str_set.elt = string
module Str_tbl : CCHashtbl.S with type Str_tbl.key = string
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
val gensym : unit -> string
val print_int : Stdlib.Format.formatter -> int -> unit
val print_float : Stdlib.Format.formatter -> float -> unit
val tweak_gc : unit -> unit
val len_filtered : ('a -> bool) -> 'a list -> int
val interpret_path : string -> string
val parse_tcp_addr : string -> (Unix.inet_addr * int, string) Stdlib.result
val time : (unit -> 'a) -> 'a