Module SlicingActions


module SlicingActions: sig .. end
This module deals with the action management. It consiste of the definitions of the different kind of actions, and the management of the action list.

selection mode (ie which mark to associate to the node and how to propagate in the different kinds of dependencies)



Build



How the elements will be selected


val build_simple_node_selection : ?nd_marks:(T.t_node_or_dpds * 'a) list ->
'a -> (T.t_node_or_dpds * 'a) list
Build a description to tell that the associated nodes have to be marked with the given mark, and than the same one will be propagated through their dependencies. (see also SlicingActions.build_node_and_dpds_selection)
val build_addr_dpds_selection : ?nd_marks:(T.t_node_or_dpds * 'a) list ->
'a -> (T.t_node_or_dpds * 'a) list
Only the control dependencies of the nodes will be marked
val build_data_dpds_selection : ?nd_marks:(T.t_node_or_dpds * 'a) list ->
'a -> (T.t_node_or_dpds * 'a) list
Only the control dependencies of the nodes will be marked
val build_ctrl_dpds_selection : ?nd_marks:(T.t_node_or_dpds * 'a) list ->
'a -> (T.t_node_or_dpds * 'a) list
Only the control dependencies of the nodes will be marked
val build_node_and_dpds_selection : ?nd_marks:(T.t_node_or_dpds * Marks.t_mark)
list ->
Marks.t_mark ->
(T.t_node_or_dpds * Marks.t_mark) list
Build a description to tell how the selected PDG nodes and their dependencies will have to be marked (see SlicingTypes.Internals.t_node_or_dpds). This description depend on the mark that has been asked for. First of all, whatever the mark is, the node is selected as spare, so that it will be visible, and so will its dependencies. Then, if is_ctrl mark propagate a m1 control mark through the control dependencies and do a similar thing for addr and data

Translations to a mapping between marks and program elements


val translate_crit_to_select : P.Pdg.t ->
?to_select:'a PdgMarks.t_select ->
((P.Node.t * Locations.Zone.t option) list *
(T.t_node_or_dpds * 'a) list)
list -> 'a PdgMarks.t_select

Function criteria


val mk_fct_crit : T.t_fct_info ->
T.t_fct_crit -> T.t_criterion
build an action to apply the criteria to the persistent selection of the function. It means that it will be applied to all slices.
val mk_fct_user_crit : T.t_fct_info ->
T.t_fct_user_crit -> T.t_criterion
val mk_crit_fct_top : T.t_fct_info ->
T.t_pdg_mark -> T.t_criterion
val mk_crit_fct_user_select : T.t_fct_info ->
T.t_pdg_mark PdgMarks.t_select -> T.t_criterion
val mk_crit_prop_persit_marks : T.t_fct_info ->
T.t_pdg_mark PdgMarks.t_select -> T.t_criterion
val mk_ff_crit : T.t_fct_slice ->
T.t_fct_crit -> T.t_criterion
build an action to apply the criteria to the given slice.
val mk_ff_user_select : T.t_fct_slice ->
T.t_pdg_mark PdgMarks.t_select -> T.t_criterion
val mk_crit_choose_call : T.t_fct_slice ->
T.t_call_id -> T.t_criterion
val mk_crit_change_call : T.t_fct_slice ->
T.t_call_id ->
T.t_called_fct -> T.t_criterion
val mk_crit_missing_inputs : T.t_fct_slice ->
T.t_call_id ->
T.t_pdg_mark PdgMarks.t_select * bool ->
T.t_criterion
val mk_crit_missing_outputs : T.t_fct_slice ->
T.t_call_id ->
T.t_pdg_mark PdgMarks.t_select * bool ->
T.t_criterion
val mk_crit_examines_calls : T.t_fct_slice ->
T.t_pdg_mark PdgMarks.t_info_called_outputs ->
T.t_criterion
val mk_appli_select_calls : T.t_fct_info -> T.t_criterion

Shortcut functions for previous things


val mk_crit_mark_calls : M.T.t_fct_info ->
Db_types.kernel_function ->
T.t_pdg_mark -> T.t_criterion
val mk_crit_add_output_marks : T.t_fct_slice ->
T.t_pdg_mark PdgMarks.t_select -> T.t_criterion

Print


val print_nd_and_mark : Format.formatter ->
T.t_node_or_dpds * Marks.t_mark -> unit
val print_nd_and_mark_list : Format.formatter ->
(T.t_node_or_dpds * Marks.t_mark) list -> unit
val print_nodes : Format.formatter -> Db.Pdg.t_node list -> unit
val print_node_mark : Format.formatter ->
PdgTypes.Node.t ->
Locations.Zone.t option -> Marks.t_mark -> unit
val print_sel_marks_list : Format.formatter ->
(PdgMarks.t_select_elem * Marks.t_mark) list -> unit
val print_ndm : Format.formatter ->
Db.Pdg.t_node list *
(T.t_node_or_dpds * Marks.t_mark) list ->
unit
val print_f_crit : Format.formatter -> T.t_fct_user_crit -> unit
val print_crit : Format.formatter -> T.t_criterion -> unit
val print_list_crit : Format.formatter -> T.t_criterion list -> unit