module State: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.sig
..end
Cannot_fold
if the state is Topmodule P: Pdg_parameters
module M: Macros
exception Cannot_fold
typet_loc =
Locations.Zone.t
typet_node =
PdgTypes.Node.t
typet_info =
PdgTypes.NodeSetLattice.t
typet =
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
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
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
loc
and z is the intersection between loc
and the zone computed by the node.
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
Cannot_fold
(see get_loc_nodes_and_part
)
if the state is Top
typet_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
val get_pdg_states : 'a -> 'a