Skip to content

Commit

Permalink
Remove leaky hack in bitwuzla's mappigns
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeom committed Nov 6, 2024
1 parent ec7661e commit c8b7b30
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/bitwuzla_mappings.default.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@

include Mappings_intf

(* Hack: this was a hack to try and run bitwuzla in Owi *)
let leak =
let leaky_list = ref [] in
let mutex = Mutex.create () in
fun module_ ->
Mutex.lock mutex;
leaky_list := module_ :: !leaky_list;
Mutex.unlock mutex

module Fresh_bitwuzla (B : Bitwuzla_cxx.S) : M = struct
open B

Expand Down Expand Up @@ -511,13 +502,7 @@ end

include (
Mappings.Make (struct
module Make () = struct
let bitwuzla = (module Bitwuzla_cxx.Make () : Bitwuzla_cxx.S)

let () = leak bitwuzla

include Fresh_bitwuzla ((val bitwuzla))
end
module Make () = Fresh_bitwuzla (Bitwuzla_cxx.Make ())

let is_available = true

Expand Down

0 comments on commit c8b7b30

Please sign in to comment.