Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(BV): Treat bvand, bvor, bvxor as interpreted #1007

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/lib/reasoners/bitv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ module Shostak(X : ALIEN) = struct

let is_mine_symb sy _ =
match sy with
| Sy.Bitv _ | Sy.Op (Concat | Extract _ | BV2Nat | BVnot) -> true
| Sy.Bitv _
| Op (Concat | Extract _ | BV2Nat | BVnot | BVand | BVor | BVxor)
-> true
| _ -> false

let embed r =
Expand Down Expand Up @@ -398,7 +400,12 @@ module Shostak(X : ALIEN) = struct
let (and+) = (and*)

let other ~neg t _sz ctx =
let r, ctx' = X.make t in
let r, ctx' =
match E.term_view t with
| { f = Op (BVand | BVor | BVxor); _ } ->
X.term_embed t, []
| _ -> X.make t
in
let ctx = List.rev_append ctx' ctx in
let bv = embed r in
if neg then negate_abstract bv, ctx else bv, ctx
Expand Down
Loading