module CallInfo: sig
.. end
Manage the information related to a function call in a slice.
It is composed of the called function if it has been established yet,
and the call signature. Also deals with the called_by
information.
type
t_call_id = Fct_slice.T.t_fct_slice * Fct_slice.T.t_call_id
type
t = t_call_id * Fct_slice.T.t_called_fct option *
Fct_slice.Marks.t_sig_marks
val get_f_called : 'a * 'b * 'c -> 'b
val get_call_id : 'a * 'b * 'c -> 'a
val get_info_call : Fct_slice.T.t_fct_slice * Cil_types.stmt ->
(Fct_slice.T.t_fct_slice * Cil_types.stmt) *
Fct_slice.T.t_called_fct option * Fct_slice.Marks.t_sig_marks
find call information (ff_called option + signature of a call)
val get_call_f_called : Fct_slice.T.t_fct_slice * Cil_types.stmt -> Fct_slice.T.t_called_fct option
val get_call_sig : 'a * 'b * 'c -> 'c
val fold_calls : (Cil_types.stmt ->
('a * Cil_types.stmt) * 'b option * 'c PdgIndex.Signature.t -> 'd -> 'd) ->
'a -> ('c, 'b option) PdgIndex.FctIndex.t -> 'd -> 'd
val something_visible : 'a * 'b * Fct_slice.Marks.t_sig_marks -> bool
val some_visible_out : 'a * 'b * Fct_slice.Marks.t_sig_marks -> bool
val is_call_to_change : 'a * Fct_slice.T.t_called_fct option * 'b ->
Fct_slice.T.t_called_fct option -> bool
val remove_called_by : Fct_slice.M.T.t_project ->
Fct_slice.M.T.t_fct_slice * Cil_types.stmt ->
'a * Fct_slice.T.t_called_fct option * 'b -> unit
call_id
is a call to g
in f
.
we don't want f
to call g
anymore, so we have to update g
called_by
field.
val change_call : Fct_slice.M.T.t_project ->
('a, Fct_slice.T.t_called_fct option) PdgIndex.FctIndex.t ->
Fct_slice.T.t_fct_slice * Fct_slice.T.t_call_id ->
Fct_slice.T.t_called_fct option -> unit
very low level function to change information of a call :
no checks at all (they must have been done before).
call
in ff
is changed in order to call to_call
. If some function was
previously called, update its called_by
information.