@@ -106,16 +106,16 @@ module EvalAssert = struct
106106 let rec instrument_instructions = function
107107 | i1 :: ((i2 :: _ ) as is ) ->
108108 (* List contains successor statement, use location of successor for values *)
109- let loc = get_instrLoc i2 in
109+ let loc = get_instrLoc i2 in (* TODO: why not using Cilfacade.get_instrLoc? *)
110110 i1 :: ((instrument i1 loc) @ instrument_instructions is)
111111 | [i] when unique_succ ->
112112 (* Last statement in list *)
113113 (* Successor of it has only one predecessor, we can query for the value there *)
114- let loc = get_stmtLoc (List. hd s.succs).skind in
114+ let loc = get_stmtLoc (List. hd s.succs).skind in (* TODO: why not using Cilfacade.get_stmtLoc? *)
115115 i :: (instrument i loc)
116116 | [i] when s.succs <> [] ->
117117 (* Successor has multiple predecessors, results may be imprecise but remain correct *)
118- let loc = get_stmtLoc (List. hd s.succs).skind in
118+ let loc = get_stmtLoc (List. hd s.succs).skind in (* TODO: why not using Cilfacade.get_stmtLoc? *)
119119 i :: (instrument i loc)
120120 | x -> x
121121 in
@@ -134,7 +134,7 @@ module EvalAssert = struct
134134 match s.preds with
135135 | [p1; p2] when not only_at_locks ->
136136 (* exactly two predecessors -> join point, assert locals if they changed *)
137- let join_loc = get_stmtLoc s.skind in
137+ let join_loc = get_stmtLoc s.skind in (* TODO: why not using Cilfacade.get_stmtLoc? *)
138138 (* Possible enhancement: It would be nice to only assert locals here that were modified in either branch if trans.assert.full is false *)
139139 let asserts = make_assert join_loc None in
140140 self#queueInstr asserts; ()
@@ -153,7 +153,7 @@ module EvalAssert = struct
153153 let add_asserts block =
154154 if block.bstmts <> [] then
155155 let with_asserts =
156- let b_loc = get_stmtLoc (List. hd block.bstmts).skind in
156+ let b_loc = get_stmtLoc (List. hd block.bstmts).skind in (* TODO: why not using Cilfacade.get_stmtLoc? *)
157157 let b_assert_instr = asserts b_loc vars in
158158 [cStmt " { %I:asserts %S:b }" (fun n t -> makeVarinfo true " unknown" (TVoid [] )) b_loc [(" asserts" , FI b_assert_instr); (" b" , FS block.bstmts)]]
159159 in
0 commit comments