Module Build.BuildPdg


module BuildPdg: sig .. end
Module to build the PDG.

type t_state = Pdg_state.t 
type t_loc = Locations.Zone.t 
type t_arg_nodes = t_node list 

type t = {
   fct : Db_types.kernel_function;
   mutable topinput : PdgTypes.Node.t option;
   mutable other_inputs : (PdgTypes.Node.t * Build.Dpd.td * Locations.Zone.t) list;
   graph : Build.G.t;
   states : Pdg_state.t_states;
   index : PdgTypes.Pdg.t_index;
   ctrl_dpds : Build.SimpleNodeSet.t Cil_datatype.Kinstr.Hashtbl.t; (*The nodes to which each stmt control-depend on. The links will be added in the graph at the end.*)
   decl_nodes : t_node Cil_datatype.Varinfo.Hashtbl.t; (*map between declaration nodes and the variables to build the dependencies.*)
}
The PDG used during its computation.
val create : Kernel_function.t -> t
val get_kf : t -> Db_types.kernel_function
val get_states : t -> Pdg_state.t_states
val pretty : Format.formatter -> t -> unit
val test_and_merge_states : old:Pdg_state.t -> Pdg_state.t -> bool * Pdg_state.t
val print_state : Format.formatter -> Pdg_state.t -> unit
val process_declarations : t ->
formals:Cil_datatype.Varinfo.Hashtbl.key list ->
locals:Cil_datatype.Varinfo.Hashtbl.key list -> Pdg_state.t
val process_call_node : t -> Cil_types.stmt -> unit
val process_call_args : t ->
Pdg_state.t ->
Cil_types.stmt ->
(Locations.Zone.t * Cil_datatype.Varinfo.Set.t) list ->
int * PdgTypes.Node.t list
val process_call_params : t ->
Pdg_state.t ->
Cil_types.stmt -> Kernel_function.t -> Pdg_state.t_node list -> Pdg_state.t
Add a PDG node for each formal argument, and add its dependencies to the corresponding argument node.
val process_call_ouput : t ->
Pdg_state.t ->
Pdg_state.t ->
Cil_types.stmt ->
int ->
Locations.Zone.t ->
bool -> Locations.Zone.t -> Locations.Zone.t -> Pdg_state.t
val process_call_return : t ->
Pdg_state.t ->
Pdg_state.t ->
Cil_types.stmt ->
l_loc:Locations.Zone.t ->
exact:bool ->
l_dpds:Locations.Zone.t ->
l_decl:Cil_datatype.Varinfo.Set.t ->
r_dpds:Locations.Zone.t -> Locations.Zone.t -> Pdg_state.t
mix between process_call_ouput and process_asgn
val process_asgn : t ->
Pdg_state.t ->
Cil_types.stmt ->
l_loc:Locations.Zone.t ->
exact:bool ->
l_dpds:Locations.Zone.t ->
l_decl:Cil_datatype.Varinfo.Set.t ->
r_dpds:Locations.Zone.t -> r_decl:Cil_datatype.Varinfo.Set.t -> Pdg_state.t
val process_skip : t -> Cil_types.stmt -> unit
val process_jump : t -> Cil_types.stmt -> Cil_types.stmt list -> unit
val process_jump_with_exp : t ->
Cil_types.stmt ->
Cil_types.stmt list ->
Pdg_state.t -> Locations.Zone.t -> Cil_datatype.Varinfo.Set.t -> unit
val process_block : t -> Cil_types.stmt -> Cil_types.block -> unit
val process_entry_point : t -> Cil_types.stmt list -> unit
val add_retres : t ->
Pdg_state.t ->
Cil_types.stmt ->
Locations.Zone.t -> Cil_datatype.Varinfo.Set.t -> Pdg_state.t
val store_last_state : t -> Pdg_state.t -> unit
val finalize_pdg : t -> Function_Froms.tt option -> PdgTypes.Pdg.t
from_opt : for undefined functions (declarations)