module Pdg: sig
.. end
PDG for a function
exception Top
can be raised by most of the functions when called with a Top PDG.
Top means that we were not abled to compute the PDG for this
function.
exception Bottom
exception raised when requiring the PDG of a function that is never
called.
type
fi = (PdgTypes.Node.t, unit) PdgIndex.FctIndex.t
The nodes associated to each element.
There is only one node for simple statements,
but there are several for a call for instance.
val fi_descr : Structural_descr.t
type
def = {
}
type
body =
| |
PdgDef of def |
| |
PdgTop |
| |
PdgBottom |
module Body_datatype: Datatype.Make
(
sig
end
)
include struct ... end
val make : 'a ->
PdgTypes.G.t ->
PdgTypes.data_state Cil_datatype.Stmt.Hashtbl.t ->
fi -> 'a * body
make fundec graph states index
val top : 'a -> 'a * body
val bottom : 'a -> 'a * body
val is_top : 'a * body -> bool
val is_bottom : 'a * body -> bool
val get_pdg_body : 'a * body -> def
val get_kf : 'a * 'b -> 'a
val get_graph : 'a * body -> PdgTypes.G.t
val get_states : 'a * body -> PdgTypes.data_state Cil_datatype.Stmt.Hashtbl.t
val get_index : 'a * body -> fi
val iter_nodes : (PdgTypes.Node.Hashtbl.key -> unit) -> 'a * body -> unit
val iter_direct_dpds : 'a * body ->
(PdgTypes.Node.t -> unit) -> PdgTypes.Node.Hashtbl.key -> unit
val iter_direct_codpds : 'a * body ->
(PdgTypes.Node.t -> unit) -> PdgTypes.Node.Hashtbl.key -> unit
val fold_call_nodes : ('a -> PdgTypes.Node.t -> 'a) ->
'a -> 'b * body -> Cil_types.stmt -> 'a
type
dpd_info = PdgTypes.Node.t * Locations.Zone.t option
a dependency to another node. The dependency can be restricted to a zone.
(None means no restriction ie. total dependency)
val get_x_direct_edges : co:bool ->
?dpd_type:PdgTypes.Dpd.td ->
'a * body ->
PdgTypes.Node.Hashtbl.key -> dpd_info list
gives the list of nodes that depend to the given node, with a given
kind of dependency if dpd_type
is not None
. The dependency kind is
dropped
val get_x_direct : co:bool ->
PdgTypes.Dpd.td ->
'a * body ->
PdgTypes.Node.Hashtbl.key -> dpd_info list
val get_x_direct_dpds : PdgTypes.Dpd.td ->
'a * body ->
PdgTypes.Node.Hashtbl.key -> dpd_info list
val get_x_direct_codpds : PdgTypes.Dpd.td ->
'a * body ->
PdgTypes.Node.Hashtbl.key -> dpd_info list
val get_all_direct : co:bool ->
'a * body ->
PdgTypes.Node.Hashtbl.key -> dpd_info list
val get_all_direct_dpds : 'a * body ->
PdgTypes.Node.Hashtbl.key -> dpd_info list
val get_all_direct_codpds : 'a * body ->
PdgTypes.Node.Hashtbl.key -> dpd_info list
val fold_direct : co:bool ->
t ->
('a ->
PdgTypes.Dpd.t * Locations.Zone.t option -> PdgTypes.Node.Hashtbl.key -> 'a) ->
'a -> PdgTypes.Node.Hashtbl.key -> 'a
val fold_direct_dpds : t ->
('a ->
PdgTypes.Dpd.t * Locations.Zone.t option -> PdgTypes.Node.Hashtbl.key -> 'a) ->
'a -> PdgTypes.Node.Hashtbl.key -> 'a
val fold_direct_codpds : t ->
('a ->
PdgTypes.Dpd.t * Locations.Zone.t option -> PdgTypes.Node.Hashtbl.key -> 'a) ->
'a -> PdgTypes.Node.Hashtbl.key -> 'a
val pretty_graph : ?bw:bool -> Format.formatter -> PdgTypes.G.g -> unit
val pretty_bw : ?bw:bool -> Format.formatter -> 'a * body -> unit
module Printer: sig
.. end
module PrintG: Graph.Graphviz.Dot
(
Printer
)
val build_dot : string -> Printer.t -> unit
build the PDG .dot file and put it in filename
.