Module Db.Slicing.Project

module Project: sig .. end
Slicing project management.

type t = SlicingTypes.sl_project 
Abstract data type for slicing project.
val dyn_t : t Type.t
For dynamic type checking and journalization.
val mk_project : (string -> t) Pervasives.ref
To use to start a new slicing project. Several projects from a same current project can be managed.
Raises Existing_Project if an axisting project has the same name.
val from_unique_name : (string -> t) Pervasives.ref
Find a slicing project from its name.
Raises No_Project when no project is found.
val get_all : (unit -> t list) Pervasives.ref
Get all slicing projects.
val set_project : (t option -> unit) Pervasives.ref
Get the current project.
val get_project : (unit -> t option) Pervasives.ref
Get the current project.
val get_name : (t -> string) Pervasives.ref
Get the slicing project name.

Kernel function


val is_called : (t -> Cil_types.kernel_function -> bool) Pervasives.ref
Return true iff the source function is called (even indirectly via transitivity) from a Slice.t.
val has_persistent_selection : (t -> Cil_types.kernel_function -> bool) Pervasives.ref
return true iff the source function has persistent selection
val change_slicing_level : (t -> Cil_types.kernel_function -> int -> unit)
Pervasives.ref
change the slicing level of this function (see the -slicing-level option documentation to know the meaning of the number)
Raises

Extraction


val default_slice_names : (Cil_types.kernel_function -> bool -> int -> string) Pervasives.ref
val extract : (string ->
?f_slice_names:(Cil_types.kernel_function -> bool -> int -> string) ->
t -> Project.t)
Pervasives.ref
Build a new Db.Project.t from all Slice.t of a project. Can optionally specify how to name the sliced functions by defining f_slice_names. f_slice_names kf src_visi num_slice has to return the name of the exported functions based on the source function kf.
val print_extracted_project : (?fmt:Format.formatter -> extracted_prj:Project.t -> unit) Pervasives.ref
Print the extracted project when "-slice-print" is set.
val print_dot : (filename:string -> title:string -> t -> unit)
Pervasives.ref
Print a representation of the slicing project (call graph) in a dot file which name is the given string.

Internal use only


val pretty : (Format.formatter -> t -> unit) Pervasives.ref
For debugging... Pretty print project information.
val is_directly_called_internal : (t -> Cil_types.kernel_function -> bool) Pervasives.ref
Return true if the source function is directly (even via pointer function) called from a Slice.t.