|
|
@ -52,7 +52,11 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
|
|
|
|
Option.find_map (Loc.get_path l) ~f:(fun partial ->
|
|
|
|
Option.find_map (Loc.get_path l) ~f:(fun partial ->
|
|
|
|
try
|
|
|
|
try
|
|
|
|
let locs = eval_locs_sympath_partial partial in
|
|
|
|
let locs = eval_locs_sympath_partial partial in
|
|
|
|
if PowLoc.is_singleton locs then Some (PowLoc.choose locs) else None
|
|
|
|
match PowLoc.is_singleton_or_more locs with
|
|
|
|
|
|
|
|
| IContainer.Singleton loc ->
|
|
|
|
|
|
|
|
Some loc
|
|
|
|
|
|
|
|
| _ ->
|
|
|
|
|
|
|
|
None
|
|
|
|
with Caml.Not_found -> None )
|
|
|
|
with Caml.Not_found -> None )
|
|
|
|
in
|
|
|
|
in
|
|
|
|
let ret_alias =
|
|
|
|
let ret_alias =
|
|
|
@ -182,8 +186,9 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
|
|
|
|
in
|
|
|
|
in
|
|
|
|
let mem = Dom.Mem.update_mem locs v mem in
|
|
|
|
let mem = Dom.Mem.update_mem locs v mem in
|
|
|
|
let mem =
|
|
|
|
let mem =
|
|
|
|
if PowLoc.is_singleton locs && not v.represents_multiple_values then
|
|
|
|
if not v.represents_multiple_values then
|
|
|
|
let loc_v = PowLoc.min_elt locs in
|
|
|
|
match PowLoc.is_singleton_or_more locs with
|
|
|
|
|
|
|
|
| IContainer.Singleton loc_v -> (
|
|
|
|
let pname = Procdesc.get_proc_name pdesc in
|
|
|
|
let pname = Procdesc.get_proc_name pdesc in
|
|
|
|
match Typ.Procname.get_method pname with
|
|
|
|
match Typ.Procname.get_method pname with
|
|
|
|
| "__inferbo_empty" when Loc.is_return loc_v -> (
|
|
|
|
| "__inferbo_empty" when Loc.is_return loc_v -> (
|
|
|
@ -194,7 +199,9 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
|
|
|
|
| _ ->
|
|
|
|
| _ ->
|
|
|
|
assert false )
|
|
|
|
assert false )
|
|
|
|
| _ ->
|
|
|
|
| _ ->
|
|
|
|
Dom.Mem.store_simple_alias loc_v exp2 mem
|
|
|
|
Dom.Mem.store_simple_alias loc_v exp2 mem )
|
|
|
|
|
|
|
|
| _ ->
|
|
|
|
|
|
|
|
mem
|
|
|
|
else mem
|
|
|
|
else mem
|
|
|
|
in
|
|
|
|
in
|
|
|
|
let mem = Dom.Mem.update_latest_prune exp1 exp2 mem in
|
|
|
|
let mem = Dom.Mem.update_latest_prune exp1 exp2 mem in
|
|
|
|