package frama-c

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include Frama_c_kernel.Datatype.Hashtbl_with_descr with type key = t
include Frama_c_kernel.FCHashtbl.S with type key = t
include Stdlib.Hashtbl.S with type key = t
type key = t
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Stdlib__Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_keys : 'a t -> key Stdlib.Seq.t
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val iter_sorted : ?cmp:(key -> key -> int) -> (key -> 'a -> unit) -> 'a t -> unit

Iter on the hashtbl, but respecting the order on keys induced by cmp. Use Stdlib.compare if cmp not given.

If the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

val fold_sorted : ?cmp:(key -> key -> int) -> (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b

Fold on the hashtbl, but respecting the order on keys induced by cmp. Use Stdlib.compare if cmp not given.

If the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

val iter_sorted_by_entry : cmp:((key * 'a) -> (key * 'a) -> int) -> (key -> 'a -> unit) -> 'a t -> unit
val fold_sorted_by_entry : cmp:((key * 'a) -> (key * 'a) -> int) -> (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b

Iter or fold on the hashtable, respecting the order on entries given by cmp. The table may contains several bindings for the same key.

val iter_sorted_by_value : cmp:('a -> 'a -> int) -> (key -> 'a -> unit) -> 'a t -> unit
val fold_sorted_by_value : cmp:('a -> 'a -> int) -> (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b

Iter or fold on the hashtable, respecting the order on entries given by cmp. The relative order for entries whose values is equal according to cmp, is not specified.

val find_opt : 'a t -> key -> 'a option
val find_def : 'a t -> key -> 'a -> 'a
val memo : 'a t -> key -> (key -> 'a) -> 'a

memo tbl k f returns the binding of k in tbl. If there is no binding, add the binding f k associated to k in tbl and return it.

  • since Chlorine-20180501
  • since Fluorine-20130401
module Key : Frama_c_kernel.Datatype.S with type t = key

Datatype for the keys of the hashtbl.

Build a datatype of the hashtbl according to the datatype of values in the hashtbl.

OCaml

Innovation. Community. Security.