Module SlicingProject


module SlicingProject: sig .. end
Handle the project global object.


Building project


val mk_project : string -> T.t_project
API function : see Db.Slicing.Project.mk_project.
val get_name : T.t_project -> string

Managing the slices


val add_proj_actions : T.t_project -> T.t_criterion list -> unit
val create_slice : M.T.t_project -> Kernel_function.t -> Fct_slice.t_fct_slice
Add a new slice for the function. It can be the case that it create actions if the function has some persistent selection, that make function calls to choose.
Raises SlicingTypes.NoPdg when the function has no PDG.
val remove_ff : SlicingInternals.t_project -> T.t_fct_slice -> unit
Delete ff_to_remove if it is not called.
Raises T.CantRemoveCalledFf if it is.
val call_src_and_remove_all_ff : SlicingInternals.t_project ->
T.t_fct_info -> Fct_slice.t_crit list
val remove_uncalled_slices : M.T.t_project -> unit
val merge_slices : T.t_project ->
Fct_slice.t_fct_slice ->
Fct_slice.t_fct_slice -> bool -> Fct_slice.t_fct_slice
Build a new slice ff which contains the marks of ff1 and ff2 and generate everything that is needed to choose the calls in ff. If replace also generate requests call ff instead of ff1 and ff2.
val split_slice : T.t_project ->
Fct_slice.t_fct_slice -> Fct_slice.t_fct_slice list

Getting information


val get_slices : M.T.t_project ->
Kernel_function.t -> M.T.t_fct_slice list
val get_slice_callers : T.t_fct_slice -> T.t_fct_slice list
val find_ff : T.t_fct_info -> int -> T.t_fct_slice
Raises Not_found if there is no slice with this number in this function.

Adding requests


val add_filter : T.t_project -> T.t_criterion -> unit
val add_fct_src_filter : T.t_project ->
SlicingActions.t_fct_info -> T.t_fct_user_crit -> unit
Add an action to the action list to filter the function fct_id with the given criterion. The filter gives a name to the result of the filter which is a new slice if the function to filter is the source one, or the given slice otherwise.
val add_fct_ff_filter : T.t_project ->
SlicingActions.t_fct_slice -> T.t_fct_user_crit -> unit

Print


val print_project : Format.formatter -> M.T.t_project -> unit
val print_final_project : T.t_project -> string -> unit
val print_proj_worklist : Format.formatter -> T.t_project -> unit
val print_project_and_worklist : Format.formatter -> M.T.t_project -> unit
val pretty_slice : Format.formatter -> Fct_slice.t_fct_slice -> unit

Managing (and applying) requests


val apply_fct_crit : Fct_slice.t_fct_slice ->
SlicingInternals.t_fct_base_criterion -> Fct_slice.t_crit list
apply the given criterion and returns the list of new criterions to add to the project worklist.
val apply_appli_crit : M.T.t_project ->
T.t_appli_criterion -> SlicingActions.t_criterion list
val add_persistante_marks : SlicingInternals.t_project ->
M.T.t_fct_info ->
SlicingInternals.t_fct_base_criterion ->
bool -> bool -> Fct_slice.t_crit list -> Fct_slice.t_crit list
Add persistent the marks node_marks in fi and also add the marks to existing slices if any. If the propagation is ON, some actions are generated to propagate the persistent marks to the callers, and other actions are generated to make all the calls to fi visible. If there is no slice for fi we create a new one if it is the original request. It will be automatically created with the persistent marks. If it is a propagation, no need to create a new slice because it will be created when the call will be selected anyway.
val apply_fct_action : SlicingInternals.t_project ->
T.t_fct_criterion -> Fct_slice.t_crit list
val apply_action : M.T.t_project ->
SlicingActions.t_criterion -> Fct_slice.t_crit list
apply filter and return a list of generated filters
val get_next_filter : T.t_project -> T.t_criterion
val apply_next_action : T.t_project -> unit
val apply_all_actions : T.t_project -> unit