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 var =Cilfacade.mkCast ~e:(Lval(Var vinfo,NoOffset)) ~newt:longlong in
300
300
let flip, coeff = coeff_to_const ~scalewith c in
301
-
let prod =BinOp(Mult, coeff, var, longlong) in
302
-
flip, prod
301
+
ifZ.equal (Option.get (Cil.getInteger coeff)) Z.one then(* Option.get should succeed by construction *)(* TODO: check (scaled!) coeff directly instead of extracting from exp *)
302
+
flip, var
303
+
else
304
+
let prod =BinOp(Mult, coeff, var, longlong) in
305
+
flip, prod
303
306
|None ->
304
307
M.warn ~category:Analyzer"Invariant Apron: cannot convert to cil var: %a"Var.pretty v;
305
308
raise Unsupported_Linexpr1
@@ -309,7 +312,13 @@ struct
309
312
310
313
(** Returned booleans indicates whether returned expressions should be negated. *)
0 commit comments