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
Copy file name to clipboardExpand all lines: src/cdomains/symbLocksDomain.ml
+43-1Lines changed: 43 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,8 @@ struct
111
111
|Index (i,o) -> isConstant i && conc o
112
112
|Field (_,o) -> conc o
113
113
114
+
let star =Lval (Cil.var (Goblintutil.create_var (makeGlobalVar "*" intType)))
115
+
114
116
letrec one_unknown_array_indexexp=
115
117
letrec separate_fields_indexo=
116
118
match o with
@@ -121,7 +123,6 @@ struct
121
123
|Some (osf, ie,o) -> Some ((funo -> Field (f,o)), ie, o)
122
124
|x -> x
123
125
in
124
-
let star = kinteger64 IIntGoblintutil.inthack in
125
126
match exp with
126
127
|Lval (Mem (Lval (Var v, io)),o) when conc o ->
127
128
beginmatch separate_fields_index io with
@@ -272,3 +273,44 @@ struct
272
273
withInvalid_argument_ ->None
273
274
letprintXmlf (x,y,z) =BatPrintf.fprintf f "<value>\n<map>\n<key>1</key>\n%a<key>2</key>\n%a<key>3</key>\n%a</map>\n</value>\n"Exp.printXml x Exp.printXml y Exp.printXml z
274
275
end
276
+
277
+
(** Index-based symbolic lock *)
278
+
moduleILock=
279
+
struct
280
+
281
+
(** Index in index-based symbolic lock *)
282
+
moduleIdx=
283
+
struct
284
+
includePrintable.Std
285
+
typet =
286
+
| Unknown(** Unknown index. Mutex index not synchronized with access index. *)
287
+
| Star(** Star index. Mutex index synchronized with access index. Corresponds to star_0 in ASE16 paper, multiple star indices not supported in this implementation. *)
288
+
[@@deriving eq, ord, hash]
289
+
letname()="i-lock index"
290
+
291
+
letshow=function
292
+
|Unknown -> "?"
293
+
|Star -> "*"
294
+
295
+
includePrintable.SimpleShow (
296
+
struct
297
+
typenonrec t = t
298
+
let show = show
299
+
end
300
+
)
301
+
302
+
letequal_to__=`Top
303
+
letis_int_=false
304
+
end
305
+
306
+
includeLval.Normal (Idx)
307
+
308
+
letrec conv_const_offsetx=
309
+
match x with
310
+
|NoOffset -> `NoOffset
311
+
|Index (i,o) whenExp.(equal i star) -> `Index (Idx.Star, conv_const_offset o)
0 commit comments