module SlicingInternals: sig
.. end
Internals types
Internals type definitions should be hidden to the outside world,
but it is not really possible to have abstract types since Slicing has to
use Db.Slicing functions...
About the PDG
As the PDG is not defined here anymore, look at
PdgTypes for more information about it.
type
t_pdg_node = PdgTypes.Node.t
Nodes of the PDG
About options
type
t_level_option =
| |
DontSlice |
| |
DontSliceButComputeMarks |
| |
MinNbSlice |
| |
MaxNbSlice |
associate a level to each function in order to control how it will be
specialized. This is only a hint used when the tool has to make a choice,
but it doesn't forbid to the user to do whatever he wants
(like building slices for a DontSlice
function).
About function slice
type
t_mark =
| |
Cav of PdgTypes.Dpd.t |
| |
Spare |
Kinds of elementary marks.
val compare_mark : t_mark -> t_mark -> int
type
t_pdg_mark = {
}
Each PDG element has 2 marks to deal with interprocedural propagation
val t_pdg_mark_packed_descr : Structural_descr.pack
val compare_pdg_mark : t_pdg_mark -> t_pdg_mark -> int
type
t_call_id = Cil_types.stmt
type
t_fct_info = {
}
Type for all the informations related to any function,
even if we don't have its definition.
type
t_called_by = (t_fct_slice * t_call_id) list
to represent where a function is called.
type
t_fct_slice = {
}
Function slice :
created as soon as there is a criterion to compute it,
even if the slice itself hasn't been computed yet.
type
t_fct_id =
t_fct_id
is used to identify either a source function or a sliced one.
type
t_called_fct =
type
t_call_info = t_called_fct option
information about a call in a slice which gives the function to call
type
t_marks_index = (t_pdg_mark, t_call_info)
PdgIndex.FctIndex.t
main part of a slice = mapping between the function elements
and information about them in the slice.
type
t_ff_marks = PdgTypes.Pdg.t * t_marks_index
type
t_project = {
|
name : string ; |
|
application : Project.t ; |
|
functions : t_fct_info Cil_datatype.Varinfo.Hashtbl.t ; |
|
mutable actions : t_criterion list ; |
}
type
t_appli_criterion =
| |
CaGlobalData of Locations.Zone.t |
| |
CaCall of t_fct_info |
| |
CaOther |
Slicing criterion at the application level.
When applied, they are translated into t_fct_criterion
type
t_fct_base_criterion = t_pdg_mark PdgMarks.t_select
Base criterion for the functions. These are the only one that can
really generate function slices. All the other criterions are
translated in more basic ones.
Note that to build such a base criterion, the PDG has to be already
computed.
type
t_loc_point = Cil_types.stmt * Locations.Zone.t * bool
Used to identify a location (zone) at a given program point.
The boolean tell if the point is before (true) or after the statement
List of pdg nodes to be selected (see SlicingInternals.t_fct_user_crit
)
type
t_node_or_dpds =
| |
CwNode |
| |
CwAddrDpds |
| |
CwDataDpds |
| |
CwCtrlDpds |
type
t_fct_user_crit =
Tells which marks we want to put in the slice of a function
kinds of actions that can be apply to a function
type
t_fct_crit =
type
t_fct_criterion = {
}
A slicing criterion is either an application level criterion,
or a function level one.
type
t_criterion =
Internals values
val create_sl_mark : m1:t_mark ->
m2:t_mark -> t_pdg_mark
Internal function allowing creation of slicing marks
which can break their type invariant !
val dummy_t_pdg_mark : t_pdg_mark
For the journalization of these internals types
val dummy_t_project : t_project
The whole project.
val dummy_t_fct_info : t_fct_info
val dummy_t_marks_index : (t_pdg_mark, t_call_info)
PdgIndex.FctIndex.t
val dummy_t_ff_marks : PdgTypes.Pdg.t *
(t_pdg_mark, t_call_info)
PdgIndex.FctIndex.t
val dummy_t_fct_slice : t_fct_slice
val dummy_t_fct_user_crit : t_fct_user_crit