@@ -765,7 +765,7 @@ object (self)
765765 (result, ! returnresult, varargs)
766766
767767 method resolve_reglhs_type
768- (reg : register_t ) (faddr : string ) (iaddr : string ): btype_t option =
768+ (reg : register_t ) (faddr : string ) (iaddr : string ): lhs_type_result_t =
769769 let evaluation = self#evaluate_reglhs_type reg faddr iaddr in
770770 let log_evaluation () =
771771 log_diagnostics_result
@@ -825,26 +825,26 @@ object (self)
825825 if result#isEmpty then
826826 begin
827827 log_evaluation () ;
828- None
828+ LhsNoEvidence
829829 end
830830 else
831831 match result#singleton with
832- | Some ixty -> Some (bcd#get_typ ixty)
832+ | Some ixty -> LhsResolved (bcd#get_typ ixty)
833833 | _ ->
834834 match result#toList with
835835 | [ixty1; ixty2] ->
836836 (match (bcd#get_typ ixty1), (bcd#get_typ ixty2) with
837837 | TPtr (TVoid _ , _ ), TPtr _ ->
838- Some (bcd#get_typ ixty2)
838+ LhsResolved (bcd#get_typ ixty2)
839839 | TPtr _ , TPtr (TVoid _ , _ ) ->
840- Some (bcd#get_typ ixty1)
840+ LhsResolved (bcd#get_typ ixty1)
841841 | TPtr (tty1, _), TPtr (tty2, _)
842842 when is_struct_type tty1 && is_scalar tty2 ->
843- Some (bcd#get_typ ixty1)
843+ LhsResolved (bcd#get_typ ixty1)
844844 | TPtr (tty1, _), TPtr (tty2, _)
845845 when is_struct_type tty2 && is_scalar tty1 ->
846- Some (bcd#get_typ ixty2)
847- | _ ->
846+ LhsResolved (bcd#get_typ ixty2)
847+ | ( t1 , t2 ) ->
848848 begin
849849 log_evaluation () ;
850850 log_diagnostics_result
@@ -855,7 +855,7 @@ object (self)
855855 (List. map bcd#get_typ result#toList)
856856 (fun ty -> STR (btype_to_string ty))
857857 " [" " ; " " ]" ))];
858- None
858+ LhsConflict [t1; t2]
859859 end )
860860 | _ ->
861861 begin
@@ -868,13 +868,13 @@ object (self)
868868 (List. map bcd#get_typ result#toList)
869869 (fun ty -> STR (btype_to_string ty))
870870 " [" " ; " " ]" ))];
871- None
871+ LhsConflict ( List. map bcd#get_typ result#toList)
872872 end
873873
874874 end
875875
876876 method resolve_stack_lhs_type
877- (offset: int ) (faddr: string ): btype_t option =
877+ (offset: int ) (faddr: string ): lhs_type_result_t =
878878 let evaluation = self#evaluate_stack_lhs_type offset faddr in
879879 let log_evaluation () =
880880 log_diagnostics_result
@@ -992,10 +992,10 @@ object (self)
992992 | _ -> () ) consts) vars) evaluation;
993993 let btypes = result#fold (fun acc tix -> (bcd#get_typ tix) :: acc) [] in
994994 match join_integer_btypes btypes with
995- | Some ty -> Some ty
995+ | Some ty -> LhsResolved ty
996996 | _ ->
997997 match first_field_struct result with
998- | Some ty -> Some ty
998+ | Some ty -> LhsResolved ty
999999 | _ ->
10001000 begin
10011001 log_evaluation () ;
@@ -1006,12 +1006,15 @@ object (self)
10061006 ^ (p2s (pretty_print_list
10071007 (List. map bcd#get_typ result#toList)
10081008 (fun ty -> STR (btype_to_string ty)) " [" " ; " " ]" ))];
1009- None
1009+ (if result#isEmpty then
1010+ LhsNoEvidence
1011+ else
1012+ LhsConflict (List. map bcd#get_typ result#toList))
10101013 end
10111014 end
10121015
10131016 method resolve_reglhs_types (faddr: string ):
1014- (register_t * string * btype_t option ) list =
1017+ (register_t * string * lhs_type_result_t ) list =
10151018 let result = ref [] in
10161019 let _ =
10171020 if H. mem reglhss faddr then
@@ -1026,7 +1029,7 @@ object (self)
10261029 ! result
10271030
10281031 method resolve_local_stack_lhs_types (faddr: string ):
1029- (int * btype_t option ) list =
1032+ (int * lhs_type_result_t ) list =
10301033 let result = ref [] in
10311034 let _ =
10321035 if H. mem stacklhss faddr then
0 commit comments