Frama-C:
Plug-ins:
Libraries:

Frama-C API - Heterogeneous_table

  • since Carbon-20101201
type key
  • since Carbon-20101201
type 'a info
type t

Type of heterogeneous (hash)tables indexed by values of type Key.t. Type values ensure type safety.

val create : int -> t

create n creates a new table of initial size n.

val add : t -> key -> 'a ty -> 'a info -> unit

add tbl s ty v binds s to the value v in the table tbl. If the returned value is a closure whose the type of one of its argument was dynamically registered, then it may raise Incompatible_Type.

exception Unbound_value of string
exception Incompatible_type of string
val find : t -> key -> 'a ty -> 'a info

find tbl s ty returns the binding of s in the table tbl.

  • raises Incompatible_Type

    if ty was not the type value used to add the binding of s in tbl.

val iter : (key -> 'a ty -> 'a info -> unit) -> t -> unit
  • since Oxygen-20120901
val fold : (key -> 'a ty -> 'a info -> 'b -> 'b) -> t -> 'b -> 'b
  • since Fluorine-20130401