Skip to content

Commit

Permalink
Fix infinite loop: bv2nat has type int
Browse files Browse the repository at this point in the history
  • Loading branch information
bclement-ocp committed Jul 12, 2023
1 parent df14d0f commit be3da73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/structures/expr.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2958,7 +2958,8 @@ module BV = struct
(* Note: arith.ml calls [int2bv] in [make]. If additional simplifications
are added here, arith.ml must be updated as well. *)
match term_view t with
| { f = Op BV2Nat; xs = [ t ]; ty = Tbitv m; _ } ->
| { f = Op BV2Nat; xs = [ t ]; _ } ->
let m = match type_info t with Tbitv m -> m | _ -> assert false in
if m > n then
extract (n - 1) 0 t
else
Expand Down

0 comments on commit be3da73

Please sign in to comment.