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

Temporary fix of issue 744 #747

Merged
merged 2 commits into from
Jul 25, 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
20 changes: 19 additions & 1 deletion src/lib/frontend/d_cnf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,25 @@ let rec mk_expr
semantic_trigger ~loc ?var trigger

(* Unary functions from FixedSizeBitVectors theory *)
| B.Bitv_extract { i; j; _ }, [ x ] -> E.BV.extract i j (mk x)
| B.Bitv_extract { i; j; _ }, [ x ] ->
let t = mk x in
let _ =
(* This temporary fix throws aways ill-typed expression produced
by Dolmen 0.9. See issue
https://github.com/Gbury/dolmen/issues/174.
This code will be removed as soon as the next version of
Dolmen has been released. See issue
https://github.com/OCamlPro/alt-ergo/issues/748. *)
match E.type_info t with
| Tbitv m ->
if m <= i then
Util.failwith
"%alength of bitvector extraction exceeds the length\
of its argument."
Loc.report loc
| _ -> assert false
in
E.BV.extract i j t
| B.Bitv_not _, [ x ] -> E.BV.bvnot (mk x)
| B.Bitv_neg _, [ x ] -> E.BV.bvneg (mk x)

Expand Down
Loading