@ -627,24 +627,21 @@ let prop_is_exn pname prop =
(* * when prop is an exception, return the exception name *)
(* * when prop is an exception, return the exception name *)
let prop_get_exn_name pname prop =
let prop_get_exn_name pname prop =
let ret_pvar = Sil . Lvar ( Pvar . get_ret_pvar pname ) in
let ret_pvar = Sil . Lvar ( Pvar . get_ret_pvar pname ) in
let exn_name = ref ( Typename . Java . from_string " " ) in
let rec search_exn e = function
let find_exn_name e =
| [] -> None
let do_hpred = function
| Sil . Hpointsto ( e1 , _ , Sil . Sizeof ( Sil . Tstruct { Sil . struct_name = Some name } , _ ) ) :: _
| Sil . Hpointsto ( e1 , _ , Sil . Sizeof ( Sil . Tstruct { Sil . struct_name = Some name } , _ ) )
when Sil . exp_equal e1 e ->
when Sil . exp_equal e1 e ->
let found_exn_name = Typename . TN_csu ( Csu . Class Csu . Java , name ) in
Some ( Typename . TN_csu ( Csu . Class Csu . Java , name ) )
exn_name := found_exn_name
| _ :: tl -> search_exn e tl in
| _ -> () in
let rec find_exn_name hpreds = function
IList . iter do_hpred ( Prop . get_sigma prop ) in
| [] -> None
let find_ret () =
| Sil . Hpointsto ( e1 , Sil . Eexp ( Sil . Const ( Sil . Cexn e2 ) , _ ) , _ ) :: _
let do_hpred = function
| Sil . Hpointsto ( e1 , Sil . Eexp ( Sil . Const ( Sil . Cexn e2 ) , _ ) , _ )
when Sil . exp_equal e1 ret_pvar ->
when Sil . exp_equal e1 ret_pvar ->
find_exn_name e2
search_exn e2 hpreds
| _ -> () in
| _ :: tl -> find_exn_name hpreds tl in
IList . iter do_hpred ( Prop . get_sigma prop ) in
let hpreds = Prop . get_sigma prop in
find_ ret () ;
find_ exn_name hpreds hpreds
! exn_name
(* * search in prop for some assignment of global errors *)
(* * search in prop for some assignment of global errors *)
let lookup_custom_errors prop =
let lookup_custom_errors prop =