Frama-C:
Plug-ins:
Libraries:

Frama-C API - Key

The keys can be used to identify an element of a function. Have a look at the type t to know which kind of elements can be identified.

type key = private
  1. | SigKey of Signature.key
    (*

    key for an element of the function signature

    *)
  2. | VarDecl of Frama_c_kernel.Cil_types.varinfo
    (*

    variable declaration

    *)
  3. | Stmt of Frama_c_kernel.Cil_types.stmt
    (*

    any statement, except a call

    *)
  4. | CallStmt of Frama_c_kernel.Cil_types.stmt
    (*

    call statement

    *)
  5. | Label of Frama_c_kernel.Cil_types.stmt * Frama_c_kernel.Cil_types.label
    (*

    program label

    *)
  6. | SigCallKey of Frama_c_kernel.Cil_types.stmt * Signature.key
    (*

    key for an element of a call signature

    *)
include Frama_c_kernel.Datatype.S with type t = key
include Frama_c_kernel.Datatype.S_no_copy with type t = key
val name : string

Unique name of the datatype.

Datatype descriptor.

Packed version of the descriptor.

val reprs : t list

List of representants of the descriptor.

val equal : t -> t -> bool
val compare : t -> t -> int

Comparison: same spec than Stdlib.compare.

val hash : t -> int

Hash function: same spec than Hashtbl.hash.

val pretty : Stdlib.Format.formatter -> t -> unit

Pretty print each value in an user-friendly way.

val mem_project : (Frama_c_kernel.Project_skeleton.t -> bool) -> t -> bool

mem_project f x must return true iff there is a value p of type Project.t in x such that f p returns true.

val copy : t -> t

Deep copy: no possible sharing between x and copy x.

val param_key : int -> t
val implicit_in_key : Frama_c_kernel.Locations.Zone.t -> t
val entry_point : t
val top_input : t
val output_key : t
val out_from_key : Frama_c_kernel.Locations.Zone.t -> t
val decl_var_key : Frama_c_kernel.Cil_types.varinfo -> t
val call_input_key : Frama_c_kernel.Cil_types.stmt -> int -> t
val call_outret_key : Frama_c_kernel.Cil_types.stmt -> t
val call_ctrl_key : Frama_c_kernel.Cil_types.stmt -> t
val call_topin_key : Frama_c_kernel.Cil_types.stmt -> t
val stmt : t -> Frama_c_kernel.Cil_types.stmt option