module Extlib:sig..end
This module does not depend of any of frama-c module.
Consult the Plugin Development Guide for additional details.
val nop : 'a -> unitval id : 'a -> 'aval adapt_filename : string -> stringval max_cpt : int -> int -> intmax_cpt t1 t2 returns the maximum of t1 and t2 wrt the total ordering
induced by tags creation. This ordering is defined as follow: forall tags t1
t2, t1 <= t2 iff t1 is before t2 in the finite sequence 0; 1; ..; max_int;
min_int; min_int-1; -1val number_to_color : int -> intexception Unregistered_function of string
val mk_labeled_fun : string -> 'aUnregistered_function when not properly initializedval mk_fun : string -> ('a -> 'b) Pervasives.refUnregistered_function when not properly initializedval ($) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'cval swap : ('a -> 'b -> 'c) -> 'b -> 'a -> 'cval uncurry : ('a -> 'b -> 'c) -> 'a * 'b -> 'c
val iter_uncurry2 : (('a -> 'b -> unit) -> 'c -> unit) -> ('a * 'b -> unit) -> 'c -> unitval as_singleton : 'a list -> 'aInvalid_argument on a non singleton list.val last : 'a list -> 'aInvalid_argument on an empty listval filter_out : ('a -> bool) -> 'a list -> 'a listval replace : ('a -> 'a -> bool) -> 'a -> 'a list -> 'a listreplace cmp x l replaces the first element y of l such that
cmp x y is true by x. If no such element exists, x is added
at the tail of l.val filter_map : ('a -> bool) -> ('a -> 'b) -> 'a list -> 'b list
val filter_map' : ('a -> 'b) -> ('b -> bool) -> 'a list -> 'b listfilter and map.val product_fold : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'aproduct f acc l1 l2 is similar to fold_left f acc l12 with l12 the
list of all pairs of an elt of l1 and an elt of l2val product : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c listproduct f l1 l2 applies f to all the pairs of an elt of l1 and
an element of l2.val find_index : ('a -> bool) -> 'a list -> intNot_found if no element in the list matches the conditionval list_compare : ('a -> 'a -> int) -> 'a list -> 'a list -> intval list_of_opt : 'a option -> 'a listval opt_of_list : 'a list -> 'a optionInvalid_argument on lists with more than one argumentval find_opt : ('a -> 'b option) -> 'a list -> 'bfind_option p l returns the value p e, e being the first
element of l such that p e is not None. Raise Not_found if there
is no such value the list l.val iteri : (int -> 'a -> unit) -> 'a list -> unitval mapi : (int -> 'a -> 'b) -> 'a list -> 'b listval has_some : 'a option -> booltrue iff its argument is Some xval may : ('a -> unit) -> 'a option -> unitmay f v applies f to x if v = Some(x)val opt_conv : 'a -> 'a option -> 'aopt_conv default v returns default if v is None and a if
v is Some aval may_map : ('a -> 'b) -> ?dft:'b -> 'a option -> 'bmay_map f ?dft x applies f to the value of x if exists. Otherwise
returns the default value dft.
Assume that either x or dft is defined.val opt_map : ('a -> 'b) -> 'a option -> 'b option
val opt_fold : ('a -> 'b -> 'b) -> 'a option -> 'b -> 'bval merge_opt : ('a -> 'b -> 'b -> 'b) -> 'a -> 'b option -> 'b option -> 'b optionmerge f k a b returnsNone if both a and b are NoneSome a' (resp. b' if b (resp a) is None
and a (resp. b) is Somef k a' b' if both a and b are Someval opt_bind : ('a -> 'b option) -> 'a option -> 'b optionopt_bind f x returns None if x is None and f y if is Some y
(monadic bind)val opt_filter : ('a -> bool) -> 'a option -> 'a option
val the : 'a option -> 'aInvalid_argument if the value is none.val find_or_none : ('a -> 'b) -> 'a -> 'b option
val opt_equal : ('a -> 'a -> bool) -> 'a option -> 'a option -> bool
val opt_compare : ('a -> 'a -> int) -> 'a option -> 'a option -> intval opt_hash : ('a -> int) -> 'a option -> intval xor : bool -> bool -> boolval string_prefix : ?strict:bool -> string -> string -> boolstring_prefix ~strict p s returns true if and only if p is a
prefix of the string s. If strict is true, the prefix must be strict
(that is, s must moreover be strictly longer than p. strict
is false by default.val string_del_prefix : ?strict:bool -> string -> string -> string optionstring_del_prefix ~strict p s returns None if p is not a prefix of
s and Some s1 iff s=p^s1.val string_split : string -> int -> string * stringstring_split s i returns the beginning of s up to char i-1 and the
end of s starting from char i+1Invalid_argument if i is not in the range [0,(length s -1)]val make_unique_name : (string -> bool) -> ?sep:string -> ?start:int -> string -> int * stringmake_unique_name mem s returns (0, s) when (mem s)=false
otherwise returns (n,new_string) such that new_string is
derived from (s,sep,start) and (mem new_string)=false and n<>0val getperfcount : unit -> int
val getperfcount1024 : unit -> int
val time : ?msg:string -> ('a -> 'b) -> 'a -> 'b
val time1024 : ?msg:string -> ('a -> 'b) -> 'a -> 'b
val address_of_value : 'a -> intval try_finally : finally:(unit -> unit) -> ('a -> 'b) -> 'a -> 'bval cleanup_at_exit : string -> unitcleanup_at_exit file indicates that file must be removed when the
program exits (except if exit is caused by a signal).
If file does not exist, nothing happens.exception Temp_file_error of string
val temp_file_cleanup_at_exit : ?debug:bool -> string -> string -> stringFilename.temp_file except that the temporary file will be
deleted at the end of the execution (see above), unless debug is set
to true, in which case a message with the name of the kept file will be
printed.Temp_file_error if the temp file cannot be created.val temp_dir_cleanup_at_exit : ?debug:bool -> string -> stringTemp_file_error if the temp dir cannot be created.val safe_remove : string -> unitval safe_remove_dir : string -> unit
val terminate_process : int -> unitval usleep : int -> unitn microseconds.
See man usleep for details.
Should not be used under Win32.val compare_basic : 'a -> 'a -> intPervasives.compare, as this makes
it easier to find incorrect uses of the latterval pretty_position : Format.formatter -> Lexing.position -> unit