@ -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 ->
Some ( Typename . TN_csu ( Csu . Class Csu . Java , name ) )
let found_exn_name = Typename . TN_csu ( Csu . Class Csu . Java , name ) in
| _ :: tl -> search_exn e tl in
exn_name := found_exn_name
let rec find_exn_name hpreds = function
| _ -> () in
| [] -> None
IList . iter do_hpred ( Prop . get_sigma prop ) in
| Sil . Hpointsto ( e1 , Sil . Eexp ( Sil . Const ( Sil . Cexn e2 ) , _ ) , _ ) :: _
let find_ret () =
when Sil . exp_equal e1 ret_pvar ->
let do_hpred = function
search_exn e2 hpreds
| Sil . Hpointsto ( e1 , Sil . Eexp ( Sil . Const ( Sil . Cexn e2 ) , _ ) , _ )
| _ :: tl -> find_exn_name hpreds tl in
when Sil . exp_equal e1 ret_pvar ->
let hpreds = Prop . get_sigma prop in
find_exn_name e2
find_exn_name hpreds hpreds
| _ -> () in
IList . iter do_hpred ( Prop . get_sigma prop ) in
find_ret () ;
! 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 =