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
| SigKey of Signature.key
(*key for an element of the function signature
*)| VarDecl of Frama_c_kernel.Cil_types.varinfo
(*variable declaration
*)| Stmt of Frama_c_kernel.Cil_types.stmt
(*any statement, except a call
*)| CallStmt of Frama_c_kernel.Cil_types.stmt
(*call statement
*)| Label of Frama_c_kernel.Cil_types.stmt * Frama_c_kernel.Cil_types.label
(*program label
*)| 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 descr : t Frama_c_kernel.Descr.t
Datatype descriptor.
val packed_descr : Frama_c_kernel.Structural_descr.pack
Packed version of the descriptor.
val reprs : t list
List of representants of the descriptor.
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 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 label_key : Frama_c_kernel.Cil_types.stmt -> Frama_c_kernel.Cil_types.label -> t
val stmt_key : Frama_c_kernel.Cil_types.stmt -> t
val call_key : Frama_c_kernel.Cil_types.stmt -> t
val call_input_key : Frama_c_kernel.Cil_types.stmt -> int -> t
val call_output_key : Frama_c_kernel.Cil_types.stmt -> Frama_c_kernel.Locations.Zone.t -> 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
val call_from_id : Frama_c_kernel.Cil_types.stmt -> Frama_c_kernel.Cil_types.stmt