Module Pdg_state


module Pdg_state: sig .. end
DataState is associated with a program point and provide the dependancies for the data, ie. it stores for each location the nodes of the pdg where its value was last defined.
Raises Cannot_fold if the state is Top

module P: Pdg_parameters
module M: Macros
exception Cannot_fold
type t_loc = Locations.Zone.t 
type t_node = PdgTypes.Node.t 
type t_info = PdgTypes.NodeSetLattice.t 
type t = PdgTypes.t_data_state 
val make : PdgTypes.LocInfo.t -> Locations.Zone.t -> PdgTypes.t_data_state
val empty : PdgTypes.t_data_state
val pretty : Format.formatter -> PdgTypes.t_data_state -> unit
val add_loc_node : PdgTypes.t_data_state ->
exact:bool ->
Locations.Zone.t -> PdgTypes.NodeSetLattice.O.elt -> PdgTypes.t_data_state
val add_init_state_input : PdgTypes.t_data_state ->
Locations.Zone.t -> PdgTypes.NodeSetLattice.O.elt -> PdgTypes.t_data_state
this one is very similar to add_loc_node except that we want to accumulate the nodes (exact = false) but nonetheless define under_outputs like (exact = true)
val test_and_merge : old:PdgTypes.t_data_state ->
PdgTypes.t_data_state -> bool * PdgTypes.t_data_state
val get_all_nodes : PdgTypes.t_data_state -> (PdgTypes.NodeSetLattice.O.elt * 'a option) list
Raises Cannot_fold when the state is Top.
val get_loc_nodes_and_part : PdgTypes.t_data_state ->
Locations.Zone.t ->
(PdgTypes.NodeSetLattice.O.elt * Locations.Zone.t option) list
returns pairs of (n, z_opt) where n is a node that computes a part of loc and z is the intersection between loc and the zone computed by the node.
Raises Cannot_fold if the state is top (TODO : something better ?)
val get_loc_nodes : PdgTypes.t_data_state ->
Locations.Zone.t ->
(PdgTypes.NodeSetLattice.O.elt * Locations.Zone.t option) list *
Locations.Zone.t option
Raises Cannot_fold (see get_loc_nodes_and_part)

if the state is Top

type t_states = t Inthash.t 
val store_init_state : 'a Inthash.t -> 'a -> unit
val store_last_state : 'a Inthash.t -> 'a -> unit
val get_init_state : 'a Inthash.t -> 'a
val get_last_state : 'a Inthash.t -> 'a
val get_stmt_state : 'a Inthash.t -> Cil_types.stmt -> 'a