Module PdgIndex.FctIndex

module FctIndex: sig .. end
Mapping between the function elements we are interested in and some information. Used for instance to associate the nodes with the statements, or the marks in a slice.

type ('node_info, 'call_info) t = {
   mutable sgn : 'node_info PdgIndex.Signature.t; (*calls signatures*)
   mutable calls : (Cil_types.stmt * ('call_info option * 'node_info PdgIndex.Signature.t)) list; (*everything else*)
   other : 'node_info PdgIndex.H.t;
}
this type is used to build indexes between program objects and some information such as the PDG nodes or the slicing marks.
val t_descr : ni:Structural_descr.t -> ci:Structural_descr.t -> Structural_descr.t
Structural destructor for unmarshaling
val sgn : ('a, 'b) t -> 'a PdgIndex.Signature.t
get the information stored for the function signature
val create : int -> ('a, 'b) t
val copy : ('a, 'b) t -> ('a, 'b) t
just copy the mapping
val merge_info_calls : (Cil_types.stmt * ('a option * 'b PdgIndex.Signature.t)) list ->
(Cil_types.stmt * ('a option * 'b PdgIndex.Signature.t)) list ->
('b -> 'b -> 'b) ->
('a -> 'a -> 'a) ->
(Cil_types.stmt * ('a option * 'b PdgIndex.Signature.t)) list
val merge : ('a, 'b) t ->
('a, 'b) t ->
('a -> 'a -> 'a) -> ('b -> 'b -> 'b) -> ('a, 'b) t
merge the two indexes using given functions merge_a and merge_b. These function are _not_ called when an element is in one index, but not the other. It is assumed that merge_x x bot = x.
val add_info_call : ('a, 'b) t -> Cil_types.stmt -> 'b -> replace:bool -> unit
val add_info_call_key : ('a, 'b) t ->
PdgIndex.Key.key -> 'b -> replace:bool -> unit
val add_info_sig_call : (Cil_types.stmt * ('a option * 'b PdgIndex.Signature.t)) list ->
Cil_types.stmt ->
PdgIndex.Signature.key ->
'b -> bool -> (Cil_types.stmt * ('a option * 'b PdgIndex.Signature.t)) list
val find_call : ('a, 'b) t ->
Cil_types.stmt -> 'b option * 'a PdgIndex.Signature.t
find the information stored for the call and its signature
val find_call_key : ('a, 'b) t ->
PdgIndex.Key.key -> 'b option * 'a PdgIndex.Signature.t
val find_info_call : ('a, 'b) t -> Cil_types.stmt -> 'b
find the information stored for the call
val find_info_call_key : ('a, 'b) t -> PdgIndex.Key.key -> 'b
val find_info_sig_call : ('a, 'b) t ->
Cil_types.stmt -> PdgIndex.Signature.key -> 'a
val find_all_info_sig_call : ('a, 'b) t -> Cil_types.stmt -> 'a list
val add_replace : ('a, 'b) t -> PdgIndex.H.key -> 'a -> bool -> unit
val add : ('a, 'b) t -> PdgIndex.H.key -> 'a -> unit
store the information for the key.

store the information for the key. Replace the previously stored information if any.
Raises AddError if there is already something stored.

val add_or_replace : ('a, 'b) t -> PdgIndex.H.key -> 'a -> unit
val length : ('a, 'b) t -> int
val find_info : ('a, 'b) t -> PdgIndex.H.key -> 'a
find the information stored for the key. Cannot be used for Key.CallStmt keys because the type of the stored information is not the same. See find_call instead.
val find_all : ('a, 'b) t -> PdgIndex.H.key -> 'a list
same than find_info except for call statements for which it gives the list of all the information in the signature of the call.
val find_label : ('a, 'b) t -> Cil_datatype.Label.t -> 'a
Similar to find_info for a label
val fold_calls : (Cil_types.stmt -> 'a option * 'b PdgIndex.Signature.t -> 'c -> 'c) ->
('b, 'a) t -> 'c -> 'c
val fold : (PdgIndex.H.key -> 'a -> 'b -> 'b) ->
('a, 'c) t -> 'b -> 'b