Frama-C:
Plug-ins:
Libraries:

Frama-C API - Open

Opens an internal tree module into an external one.

Parameters

module Shape : Shape
module Data : Internal with type 'a structure := 'a Shape.structure

Signature

val mem : 'a Shape.key -> bool

Tests whether a key belongs to the module.

val get : 'a Shape.key -> (Data.t -> 'a) option

For a key of type k key:

  • if the values of type t contain a subpart of type k from a module identified by the key, then get key returns an accessor for it.
  • otherwise, get key returns None.
val set : 'a Shape.key -> 'a -> Data.t -> Data.t

For a key of type k key:

  • if the values of type t contain a subpart of type k from a module identified by the key, then set key v t returns the value t in which this subpart has been replaced by v.
  • otherwise, set key _ is the identity function.

Iterators on the components of a structure.

type polymorphic_iter_fun = {
  1. iter : 'a. 'a Shape.key -> 'a Shape.data -> 'a -> unit;
}
val iter : polymorphic_iter_fun -> Data.t -> unit
type 'b polymorphic_fold_fun = {
  1. fold : 'a. 'a Shape.key -> 'a Shape.data -> 'a -> 'b -> 'b;
}
val fold : 'b polymorphic_fold_fun -> Data.t -> 'b -> 'b
type polymorphic_map_fun = {
  1. map : 'a. 'a Shape.key -> 'a Shape.data -> 'a -> 'a;
}