Skip to content

Commit 60785ef

Browse files
committed
Add TODOs about preserving attributes for TNamed unrolling to ValueDomain
1 parent 5722da1 commit 60785ef

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/cdomain/value/cdomains/valueDomain.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ struct
167167
Array (CArrays.make ~varAttr ~typAttr len (bot_value ai))
168168
| t when is_thread_type t -> Thread (ConcDomain.ThreadSet.empty ())
169169
| t when is_mutexattr_type t -> MutexAttr (MutexAttrDomain.bot ())
170-
| TNamed ({ttype=t; _}, _) -> bot_value ~varAttr t
170+
| TNamed ({ttype=t; _}, _) -> bot_value ~varAttr t (* TODO: Should this add attributes from TNamed to t like unrollType? *)
171171
| _ -> Bot
172172

173173
let is_bot_value x =
@@ -203,7 +203,7 @@ struct
203203
let len = array_length_idx (IndexDomain.bot ()) length in
204204
Array (CArrays.make ~varAttr ~typAttr len (if can_recover_from_top then (init_value ai) else (bot_value ai)))
205205
(* | t when is_thread_type t -> Thread (ConcDomain.ThreadSet.empty ()) *)
206-
| TNamed ({ttype=t; _}, _) -> init_value ~varAttr t
206+
| TNamed ({ttype=t; _}, _) -> init_value ~varAttr t (* TODO: Should this add attributes from TNamed to t like unrollType? *)
207207
| _ -> Top
208208

209209
let rec top_value ?(varAttr=[]) (t: typ): t =
@@ -221,7 +221,7 @@ struct
221221
let typAttr = typeAttrs ai in
222222
let len = array_length_idx (IndexDomain.top ()) length in
223223
Array (CArrays.make ~varAttr ~typAttr len (top_value ai))
224-
| TNamed ({ttype=t; _}, _) -> top_value ~varAttr t
224+
| TNamed ({ttype=t; _}, _) -> top_value ~varAttr t (* TODO: Should this add attributes from TNamed to t like unrollType? *)
225225
| _ -> Top
226226

227227
let is_top_value x (t: typ) =
@@ -265,7 +265,7 @@ struct
265265
let len = array_length_idx (IndexDomain.top ()) length in
266266
Array (CArrays.make ~varAttr ~typAttr len (zero_init_value ai))
267267
(* | t when is_thread_type t -> Thread (ConcDomain.ThreadSet.empty ()) *)
268-
| TNamed ({ttype=t; _}, _) -> zero_init_value ~varAttr t
268+
| TNamed ({ttype=t; _}, _) -> zero_init_value ~varAttr t (* TODO: Should this add attributes from TNamed to t like unrollType? *)
269269
| _ -> Top
270270

271271
let show_tag : t -> string = function

0 commit comments

Comments
 (0)