You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let ikind =try (Cilfacade.get_ikind_exp e) withInvalid_argument_ -> raise (Unsupported_CilExpExp_not_supported) in
158
+
let ikind =try (Cilfacade.get_ikind_exp e) withInvalid_argumenta -> raise (Unsupported_CilExp(Ikind_non_integer a)) in
153
159
let simp = query e ikind in
154
160
let const =IntDomain.IntDomTuple.to_int @@IntDomain.IntDomTuple.cast_to ikind simp in
155
161
ifM.tracing thenM.trace "relation""texpr1_expr_of_cil_exp/simplify: %a -> %a" d_plainexp e IntDomain.IntDomTuple.pretty simp;
@@ -167,14 +173,14 @@ struct
167
173
Binop (Div, texpr1 e1, texpr1 e2, Int, Zero)
168
174
|CastE (t, e) whenCil.isIntegralType t ->
169
175
beginmatchIntDomain.Size.is_cast_injective ~from_type:(Cilfacade.typeOf e) ~to_type:t with(* TODO: unnecessary cast check due to overflow check below? or maybe useful in general to also assume type bounds based on argument types? *)
|false -> (* Cast is not injective - we now try to establish suitable ranges manually *)
173
179
let t_ik =Cilfacade.get_ikind t in
174
180
(* retrieving a valuerange for a non-injective cast works by a query to the value-domain with subsequent value extraction from domtuple - which should be speculative, since it is not program code *)
175
181
let const,res =GobRef.wrap AnalysisState.executing_speculative_computations true@@fun() ->
176
182
(* try to evaluate e by EvalInt Query *)
177
-
let res =try (query e @@Cilfacade.get_ikind_exp e) withInvalid_argument_ -> raise (Unsupported_CilExpExp_not_supported) in
183
+
let res =try (query e @@Cilfacade.get_ikind_exp e) withInvalid_argumenta -> raise (Unsupported_CilExp(Ikind_non_integer a)) in
178
184
(* convert response to a constant *)
179
185
IntDomain.IntDomTuple.to_int @@IntDomain.IntDomTuple.cast_to t_ik res, res in
0 commit comments