Skip to content

Commit

Permalink
SMT: Add missing arith_bits case
Browse files Browse the repository at this point in the history
  • Loading branch information
Alasdair committed Jan 8, 2025
1 parent 1cc3881 commit 18b0aec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/smt_gen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,11 @@ module Make (Config : CONFIG) (Primop_gen : PRIMOP_GEN) = struct
return (Fn (op, [smt1; smt2]))
| CT_lbits, CT_lbits, CT_lbits ->
return (Fn ("Bits", [Fn ("len", [smt1]); Fn (op, [Fn ("contents", [smt1]); Fn ("contents", [smt2])])]))
| v1_ctyp, v2_ctyp, CT_lbits ->
let* smt1 = signed_size ~into:lbits_size ~from:(bv_size v1_ctyp) smt1 in
let* smt2 = signed_size ~into:lbits_size ~from:(bv_size v2_ctyp) smt2 in
let* len = builtin_length v1 (CT_fint lbits_index) in
return (Fn ("Bits", [len; Fn (op, [smt1; smt2])]))
| _ -> builtin_type_error ("arith_bits " ^ op) [v1; v2] (Some ret_ctyp)

let builtin_arith_bits_int op v1 v2 ret_ctyp =
Expand Down

0 comments on commit 18b0aec

Please sign in to comment.