let process_condition ctrl_dpds_infos pdg state stmt condition =
(* TODO : test if we met this stmt already to avoid recomputing
the control dependencies. *)
(* let's find the locations used in the condition *)
let loc_cond = !Db.From.find_deps_no_transitivity (Kstmt stmt) condition in
let decls_cond = Cil.extract_varinfos_from_exp condition in
(*let cond_val = !Db.Value.access_expr (Kstmt stmt) condition in*)
let controled_stmts =
CtrlDpds.get_if_controled_stmts ctrl_dpds_infos stmt
in
(*
let real_dpd =
let always_false = Locations.Location_Bytes.is_zero cond_val in
if always_false then false
else
let always_true =
not (Locations.Location_Bytes.intersects
cond_val Locations.Location_Bytes.singleton_zero) in
if always_true then false
else true
in
* We cannot ignore de dependencies, even if [real_dpd = false]
* because we lose indirect dependencies... (see BTS#181)
*)
(* build a node for the condition and store de control dependencies *)
BuildPdg.process_jump_with_exp pdg stmt controled_stmts
state loc_cond decls_cond