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 options
type
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
mark =
| |
Cav of PdgTypes.Dpd.t |
| |
Spare |
Kinds of elementary marks.
val compare_mark : mark -> mark -> int
type
pdg_mark = {
}
Each PDG element has 2 marks to deal with interprocedural propagation
val pdg_mark_packed_descr : Structural_descr.pack
val compare_pdg_mark : pdg_mark -> pdg_mark -> int
type
fct_info = {
}
Type for all the informations related to any function,
even if we don't have its definition.
type
called_by = (fct_slice * Cil_types.stmt) list
to represent where a function is called.
type
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
fct_id =
fct_id
is used to identify either a source function or a sliced one.
type
called_fct =
type
call_info = called_fct option
information about a call in a slice which gives the function to call
type
marks_index = (pdg_mark, call_info) PdgIndex.FctIndex.t
main part of a slice = mapping between the function elements
and information about them in the slice.
type
ff_marks = PdgTypes.Pdg.t * marks_index
type
project = {
|
name : string ; |
|
application : Project.t ; |
|
functions : fct_info Cil_datatype.Varinfo.Hashtbl.t ; |
|
mutable actions : criterion list ; |
}
type
appli_criterion =
| |
CaGlobalData of Locations.Zone.t |
| |
CaCall of fct_info |
| |
CaOther |
Slicing criterion at the application level.
When applied, they are translated into fct_criterion
type
fct_base_criterion = pdg_mark PdgMarks.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
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.fct_user_crit
)
type
node_or_dpds =
| |
CwNode |
| |
CwAddrDpds |
| |
CwDataDpds |
| |
CwCtrlDpds |
type
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
fct_crit =
type
fct_criterion = {
}
A slicing criterion is either an application level criterion,
or a function level one.
type
criterion =
Internals values
val dummy_pdg_mark : pdg_mark
For the journalization of these internals types
val dummy_project : project
The whole project.
val dummy_fct_info : fct_info
val dummy_marks_index : (pdg_mark, call_info) PdgIndex.FctIndex.t
val dummy_ff_marks : PdgTypes.Pdg.t *
(pdg_mark, call_info) PdgIndex.FctIndex.t
val dummy_fct_slice : fct_slice
val dummy_fct_user_crit : fct_user_crit