@@ -148,7 +148,8 @@ let compare_lbl (lbl1 : label) (lbl2 : label) (map : varToVarMap) : varToVarMap
148
148
(* Compares two things:
149
149
- jmp1 and jmp2 match in structure
150
150
- jmp1 and jmp2 match in all Exp.ts contained within *)
151
- let compare_jmp jmp1 jmp2 map =
151
+ let compare_jmp (jmp1 : jmp term ) (jmp2 : jmp term ) (map : varToVarMap ) :
152
+ varToVarMap option =
152
153
match Jmp. kind jmp1, Jmp. kind jmp2 with
153
154
| Goto label1 , Goto label2 -> compare_lbl label1 label2 map
154
155
| Call call1 , Call call2 ->
@@ -167,7 +168,8 @@ let compare_jmp jmp1 jmp2 map =
167
168
| _ , _ -> None
168
169
169
170
(* There should be no phi terms. Fail if there are. *)
170
- let compare_phis phis1 phis2 map =
171
+ let compare_phis (phis1 : (phi term) list ) (phis2 : (phi term) list )
172
+ (map : varToVarMap ) : varToVarMap option =
171
173
if List. length phis1 > 0 || List. length phis2 > 0 then None
172
174
else Some map
173
175
@@ -184,7 +186,8 @@ let compare_defs (defs1 : (def term) list)
184
186
| Some map -> compare_def d1 d2 map)
185
187
186
188
(* Check that all jmps in a list match in expression and structure but not TID. *)
187
- let compare_jmps jmps1 jmps2 map =
189
+ let compare_jmps (jmps1 : (jmp term) list ) (jmps2 : (jmp term) list )
190
+ (map : varToVarMap ) : varToVarMap option =
188
191
match List. zip jmps1 jmps2 with
189
192
| Core_kernel.List.Or_unequal_lengths. Unequal_lengths -> None
190
193
| Core_kernel.List.Or_unequal_lengths. Ok z ->
@@ -252,8 +255,8 @@ let compare_blocks (sub1: Sub.t) (sub2 : Sub.t) :
252
255
BFS. fold evaluator (blk_map, blk_varmap) cfg1
253
256
254
257
(* Compare a label.t with tid comparisons only *)
255
- let compare_lbl_tid_only (graph Tid. t TidMap. t ) (lbl1 : Label.t )
256
- (lbl2 : Label.t ) : bool =
258
+ let compare_lbl_tid_only (graph : Tid.t TidMap.t ) (lbl1 : Label.t )
259
+ (lbl2 : Label.t ) : bool =
257
260
match lbl1, lbl2 with
258
261
| Direct tid1 , Direct tid2 ->
259
262
let tid_mapped = TidMap. find_exn graph tid1 in
@@ -263,7 +266,7 @@ let compare_lbl_tid_only (graph Tid.t TidMap.t) (lbl1 : Label.t)
263
266
264
267
265
268
(* Compare a jmp with tid comparisons only *)
266
- let compare_jmp_tid_only (graph Tid. t TidMap. t ) (jmp1 : jmp_t ) (jmp2 : jmp_t ) =
269
+ let compare_jmp_tid_only (graph : Tid.t TidMap.t ) (jmp1 : jmp term ) (jmp2 : jmp term ) =
267
270
match Jmp. kind jmp1, Jmp. kind jmp2 with
268
271
| Goto label1 , Goto label2 -> compare_lbl_tid_only graph label1 label2
269
272
| Call call1 , Call call2 ->
@@ -285,7 +288,7 @@ let compare_jmp_tid_only (graph Tid.t TidMap.t) (jmp1 : jmp_t) (jmp2 : jmp_t) =
285
288
286
289
(* Check that the two blocks has matching TIDs in jumps. *)
287
290
let compare_blk_tid_only (graph : Tid.t TidMap.t )
288
- (blk1 : blk term ) (blk2 : blk term ) bool =
291
+ (blk1 : blk term ) (blk2 : blk term ) : bool =
289
292
let jmps1 = Term. enum jmp_t blk1 |> Sequence. to_list in
290
293
let jmps2 = Term. enum jmp_t blk2 |> Sequence. to_list in
291
294
match List. zip jmps1 jmps2 with
0 commit comments