Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
bclement-ocp committed Aug 19, 2024
1 parent 47dd42e commit 3a80705
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib/structures/expr.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3098,7 +3098,8 @@ module BV = struct

(* Other operations *)
let repeat i t =
assert (i >= 1);
if i < 1 then
Fmt.invalid_arg "repeat: count must be positive (got %d)" i;
mk_term (Op (Repeat i)) [t] (Tbitv (i * size t))

let zero_extend i t =
Expand Down
2 changes: 1 addition & 1 deletion tests/bitv/testfile-sign-extend-003.smt2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(set-logic ALL)
(declare-const x (_ BitVec 4))
(assert (distinct ((_ extract 3 2) ((_ sign_extend 4) x)) ((_ extract 3 2) x)))
(assert (distinct ((_ extract 5 4) ((_ sign_extend 4) x)) ((_ repeat 2) ((_ extract 3 3) x))))
(check-sat)

0 comments on commit 3a80705

Please sign in to comment.