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
(** It defines the type t of the affine equality domain (a struct that contains an optional matrix and an apron environment) and provides the functions needed for handling variables (which are defined by RelationDomain.D2) such as add_vars remove_vars.
32
30
Furthermore, it provides the function get_coeff_vec that parses an apron expression into a vector of coefficients if the apron expression has an affine form. *)
Copy file name to clipboardexpand all lines: src/common/util/cilfacade.ml
+3-7
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,9 @@ include Cilfacade0
8
8
9
9
(** Command for assigning an id to a varinfo. All varinfos directly created by Goblint should be modified by this method *)
10
10
letcreate_var (var: varinfo) =
11
-
(* TODO Hack: this offset should preempt conflicts with ids generated by CIL *)
12
-
let start_id =10_000_000_000in
11
+
(* Hack: using negative integers should preempt conflicts with ids generated by CIL *)
13
12
let hash =Hashtbl.hash { var with vid =0 } in
14
-
let hash =if hash < start_id then hash + start_id else hash in
15
-
{ var with vid = hash }
13
+
{ var with vid =- hash } (* Hashtbl.hash returns non-negative integer *)
16
14
17
15
18
16
(** Is character type (N1570 6.2.5.15)? *)
@@ -531,9 +529,7 @@ let stmt_fundecs: fundec StmtH.t ResettableLazy.t =
531
529
532
530
533
531
letget_pseudo_return_idfd=
534
-
let start_id =10_000_000_000in(* TODO get max_sid? *)
535
-
let sid =Hashtbl.hash fd.svar.vid in(* Need pure sid instead of Cil.new_sid for incremental, similar to vid in Cilfacade.create_var. We only add one return stmt per loop, so the hash from the functions vid should be unique. *)
536
-
if sid < start_id then sid + start_id else sid
532
+
- fd.svar.vid (* Need pure sid instead of Cil.new_sid for incremental, similar to vid in Cilfacade.create_var. We only add one return stmt per loop, so the hash from the functions vid should be unique. *)
0 commit comments