diff --git a/lib/arm/arm_bit.ml b/lib/arm/arm_bit.ml
index a8944016f..b825415d9 100644
--- a/lib/arm/arm_bit.ml
+++ b/lib/arm/arm_bit.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Or_error
diff --git a/lib/arm/arm_bit.mli b/lib/arm/arm_bit.mli
index 84cdeac95..915b67471 100644
--- a/lib/arm/arm_bit.mli
+++ b/lib/arm/arm_bit.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_branch.ml b/lib/arm/arm_branch.ml
index b32d6ad16..a01f30ced 100644
--- a/lib/arm/arm_branch.ml
+++ b/lib/arm/arm_branch.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Or_error
diff --git a/lib/arm/arm_branch.mli b/lib/arm/arm_branch.mli
index 0318e2395..0eadef0c6 100644
--- a/lib/arm/arm_branch.mli
+++ b/lib/arm/arm_branch.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_cond.ml b/lib/arm/arm_cond.ml
index a09c8933b..de49ff004 100644
--- a/lib/arm/arm_cond.ml
+++ b/lib/arm/arm_cond.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
diff --git a/lib/arm/arm_cond.mli b/lib/arm/arm_cond.mli
index 0fefc786b..97b6bfc0d 100644
--- a/lib/arm/arm_cond.mli
+++ b/lib/arm/arm_cond.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_env.ml b/lib/arm/arm_env.ml
index 410edb8c4..93b6de7ff 100644
--- a/lib/arm/arm_env.ml
+++ b/lib/arm/arm_env.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_env.mli b/lib/arm/arm_env.mli
index 6af1cc30d..46d52a84e 100644
--- a/lib/arm/arm_env.mli
+++ b/lib/arm/arm_env.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_flags.ml b/lib/arm/arm_flags.ml
index ece067c69..4563d9e59 100644
--- a/lib/arm/arm_flags.ml
+++ b/lib/arm/arm_flags.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_flags.mli b/lib/arm/arm_flags.mli
index 0f61ce692..af0cac0e0 100644
--- a/lib/arm/arm_flags.mli
+++ b/lib/arm/arm_flags.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_helpers.ml b/lib/arm/arm_helpers.ml
index c6c025c36..d27b7954d 100644
--- a/lib/arm/arm_helpers.ml
+++ b/lib/arm/arm_helpers.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
let sexpable_of_string t_of_sexp name =
try Some (t_of_sexp @@ Sexp.of_string name)
diff --git a/lib/arm/arm_helpers.mli b/lib/arm/arm_helpers.mli
index 060b21a77..94f78fb9b 100644
--- a/lib/arm/arm_helpers.mli
+++ b/lib/arm/arm_helpers.mli
@@ -1,3 +1,3 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
val sexpable_of_string : (Sexp.t -> 'a) -> string -> 'a option
diff --git a/lib/arm/arm_insn.ml b/lib/arm/arm_insn.ml
index d9e8e80f9..08a19a7ad 100644
--- a/lib/arm/arm_insn.ml
+++ b/lib/arm/arm_insn.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Arm_helpers
diff --git a/lib/arm/arm_lifter.ml b/lib/arm/arm_lifter.ml
index f71dff55a..38f242c85 100644
--- a/lib/arm/arm_lifter.ml
+++ b/lib/arm/arm_lifter.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Or_error
open Bap.Std
diff --git a/lib/arm/arm_mem.ml b/lib/arm/arm_mem.ml
index c5a2bd4a5..051db2c42 100644
--- a/lib/arm/arm_mem.ml
+++ b/lib/arm/arm_mem.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
@@ -70,7 +70,7 @@ let lift_r ~(dst1 : Var.t) ?(dst2 : Var.t option) ~(base : Var.t)
let mem = Bil.var (Env.mem) in
if [%compare.equal: size] size D then [
Bil.move dst1 (load mem address);
- Bil.move (uw dst2) (load mem Bil.(address + four));
+ Bil.move (Option.value_exn dst2) (load mem Bil.(address + four));
] else [
assn temp (load mem address);
] in
@@ -94,7 +94,7 @@ let lift_r ~(dst1 : Var.t) ?(dst2 : Var.t option) ~(base : Var.t)
| D -> [
Bil.move m (store v address Bil.(var dst1));
Bil.move m (store v
- Bil.(address + four) Bil.(var (uw dst2)));
+ Bil.(address + four) Bil.(var (Option.value_exn dst2)));
]
| B | H | W -> [
Bil.move m (store v address Bil.(var temp));
diff --git a/lib/arm/arm_mem.mli b/lib/arm/arm_mem.mli
index a160fdc38..c64c8b524 100644
--- a/lib/arm/arm_mem.mli
+++ b/lib/arm/arm_mem.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_mem_shift.ml b/lib/arm/arm_mem_shift.ml
index 3022859e1..5fd1bf9e5 100644
--- a/lib/arm/arm_mem_shift.ml
+++ b/lib/arm/arm_mem_shift.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Or_error
diff --git a/lib/arm/arm_mem_shift.mli b/lib/arm/arm_mem_shift.mli
index 7d6a0afd1..b219add37 100644
--- a/lib/arm/arm_mem_shift.mli
+++ b/lib/arm/arm_mem_shift.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_mov.ml b/lib/arm/arm_mov.ml
index 2c24b2a36..77ae91791 100644
--- a/lib/arm/arm_mov.ml
+++ b/lib/arm/arm_mov.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap.Std
diff --git a/lib/arm/arm_mov.mli b/lib/arm/arm_mov.mli
index 0393068c5..a786fd032 100644
--- a/lib/arm/arm_mov.mli
+++ b/lib/arm/arm_mov.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_mul.ml b/lib/arm/arm_mul.ml
index 2d14f01a1..e597fb395 100644
--- a/lib/arm/arm_mul.ml
+++ b/lib/arm/arm_mul.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
diff --git a/lib/arm/arm_mul.mli b/lib/arm/arm_mul.mli
index 2ff4fb64c..b2f57a49b 100644
--- a/lib/arm/arm_mul.mli
+++ b/lib/arm/arm_mul.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_op.ml b/lib/arm/arm_op.ml
index 6eebd74c1..3cec22182 100644
--- a/lib/arm/arm_op.ml
+++ b/lib/arm/arm_op.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
diff --git a/lib/arm/arm_reg.ml b/lib/arm/arm_reg.ml
index 69d261b4d..c91ec0d8a 100644
--- a/lib/arm/arm_reg.ml
+++ b/lib/arm/arm_reg.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Arm_helpers
diff --git a/lib/arm/arm_shift.ml b/lib/arm/arm_shift.ml
index 6be171268..0eccbbe36 100644
--- a/lib/arm/arm_shift.ml
+++ b/lib/arm/arm_shift.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Or_error
diff --git a/lib/arm/arm_shift.mli b/lib/arm/arm_shift.mli
index 629116e5d..f9200d514 100644
--- a/lib/arm/arm_shift.mli
+++ b/lib/arm/arm_shift.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_target.ml b/lib/arm/arm_target.ml
index 697c21d5d..f6dcdf7f1 100644
--- a/lib/arm/arm_target.ml
+++ b/lib/arm/arm_target.ml
@@ -1,6 +1,6 @@
let package = "bap"
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open KB.Syntax
diff --git a/lib/arm/arm_types.ml b/lib/arm/arm_types.ml
index b3bf12649..00e9259dd 100644
--- a/lib/arm/arm_types.ml
+++ b/lib/arm/arm_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
diff --git a/lib/arm/arm_utils.ml b/lib/arm/arm_utils.ml
index b6363e7b6..0fc4a58f3 100644
--- a/lib/arm/arm_utils.ml
+++ b/lib/arm/arm_utils.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Arm_types
diff --git a/lib/arm/arm_utils.mli b/lib/arm/arm_utils.mli
index 5eff40224..41eee2431 100644
--- a/lib/arm/arm_utils.mli
+++ b/lib/arm/arm_utils.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Arm_types
diff --git a/lib/bap/bap.ml b/lib/bap/bap.ml
index 6627eb7f0..86c7bd46a 100644
--- a/lib/bap/bap.ml
+++ b/lib/bap/bap.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Std = struct
type 'a printer = Format.formatter -> 'a -> unit
diff --git a/lib/bap/bap.mli b/lib/bap/bap.mli
index dbcedd054..5e72c1157 100644
--- a/lib/bap/bap.mli
+++ b/lib/bap/bap.mli
@@ -1,6 +1,6 @@
(** BAP Standard Library *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Regular.Std
open Graphlib.Std
@@ -459,7 +459,7 @@ module Std : sig
The following plugin prints all sections in a file:
{[
- open Core_kernel
+ open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
@@ -628,7 +628,7 @@ module Std : sig
**)
module Legacy : sig
module Monad : sig
- open Core_kernel
+ open Core_kernel[@@warning "-D"]
module type Basic = Monad.Basic
module type Basic2 = Monad.Basic2
module type Infix = Monad.Infix
@@ -6636,7 +6636,7 @@ module Std : sig
@param return a function that lifts user data type ['s] to type
['r]. It is useful when you need to perform disassembly in some
- monad, like [Or_error], or [Lwt]. Otherwise, just use [ident]
+ monad, like [Or_error], or [Lwt]. Otherwise, just use [Fn.id]
function and assume that ['s == 'r].
The disassembler will invoke user provided callbacks. To each
@@ -10560,7 +10560,7 @@ module Std : sig
the file, and [data] spans the data. An optional [finish]
function can be used to propagate to the project any
additional information that is available to the loader. It
- defaults to [ident].
+ defaults to [Fn.id].
@deprecated use either [Input.custom] or [Input.from_string]
and [Input.from_bigstring].
*)
diff --git a/lib/bap/bap_init_toplevel.ml b/lib/bap/bap_init_toplevel.ml
index 2b97472d8..10d312b8e 100644
--- a/lib/bap/bap_init_toplevel.ml
+++ b/lib/bap/bap_init_toplevel.ml
@@ -8,10 +8,11 @@ let install_printer printer =
let install_printers () =
Core_kernel.Pretty_printer.all () |>
List.iter install_printer
+[@@warning "-D"]
let main () =
let module Bap_std_is_required = Bap.Std in
- let module Core_kernel_is_required = Core_kernel in
+ let module Core_kernel_is_required = Core_kernel[@warning "-D"] in
let loader = Topdirs.dir_load Format.err_formatter in
setup_dynamic_loader loader;
install_printers ();
diff --git a/lib/bap/bap_project.ml b/lib/bap/bap_project.ml
index bfdbf8c4a..18ff15298 100644
--- a/lib/bap/bap_project.ml
+++ b/lib/bap/bap_project.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_core_theory
open Graphlib.Std
@@ -193,7 +193,7 @@ module Input = struct
let custom
- ?(finish=ident)
+ ?(finish=Fn.id)
?(filename="")
?(code=Memmap.empty)
?(data=Memmap.empty) target () = {
@@ -204,7 +204,7 @@ module Input = struct
}
let create
- ?(finish=ident) arch file ~code ~data () =
+ ?(finish=Fn.id) arch file ~code ~data () =
let spec = match arch with
| #Arch.unknown -> Ogre.Doc.empty
| arch -> Image.Spec.from_arch arch in {
@@ -295,7 +295,7 @@ module Input = struct
arch;
code;
data;
- file = filename; finish = ident; spec;
+ file = filename; finish = Fn.id; spec;
target;
memory = code
}
diff --git a/lib/bap/bap_project.mli b/lib/bap/bap_project.mli
index 5e8c19268..0472e10a4 100644
--- a/lib/bap/bap_project.mli
+++ b/lib/bap/bap_project.mli
@@ -1,6 +1,6 @@
open Bap_knowledge
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_future.Std
open Bap_types.Std
diff --git a/lib/bap/bap_self.ml b/lib/bap/bap_self.ml
index 53b691f77..8fbf96bbc 100644
--- a/lib/bap/bap_self.ml
+++ b/lib/bap/bap_self.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_bundle.Std
open Bap_future.Std
open Bap_plugins.Std
diff --git a/lib/bap/bap_self.mli b/lib/bap/bap_self.mli
index 137f68df6..4b55d7d44 100644
--- a/lib/bap/bap_self.mli
+++ b/lib/bap/bap_self.mli
@@ -1,5 +1,5 @@
open Format
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_future.Std
open Bap_main.Extension
diff --git a/lib/bap_abi/bap_abi.ml b/lib/bap_abi/bap_abi.ml
index fdbb083d4..da6a3a0e0 100644
--- a/lib/bap_abi/bap_abi.ml
+++ b/lib/bap_abi/bap_abi.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
diff --git a/lib/bap_api/bap_api.ml b/lib/bap_api/bap_api.ml
index 7133c87f9..3dfdcbfa1 100644
--- a/lib/bap_api/bap_api.ml
+++ b/lib/bap_api/bap_api.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
type filename = string
diff --git a/lib/bap_api/bap_api.mli b/lib/bap_api/bap_api.mli
index c59a8fec9..6e2f9d656 100644
--- a/lib/bap_api/bap_api.mli
+++ b/lib/bap_api/bap_api.mli
@@ -13,7 +13,7 @@
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
type filename = string
diff --git a/lib/bap_api/bap_api_abi.ml b/lib/bap_api/bap_api_abi.ml
index cc8889f4b..fc266412e 100644
--- a/lib/bap_api/bap_api_abi.ml
+++ b/lib/bap_api/bap_api_abi.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Bap_api
diff --git a/lib/bap_api/bap_api_abi.mli b/lib/bap_api/bap_api_abi.mli
index 0548c17c9..404d9d9d7 100644
--- a/lib/bap_api/bap_api_abi.mli
+++ b/lib/bap_api/bap_api_abi.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Bap_api
diff --git a/lib/bap_bml/bap_bml.ml b/lib/bap_bml/bap_bml.ml
index 4f46d88f1..1a3469811 100644
--- a/lib/bap_bml/bap_bml.ml
+++ b/lib/bap_bml/bap_bml.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
[@@@warning "-D"]
@@ -74,7 +74,7 @@ let (-) pref tag = pref ^ "-" ^ Value.Tag.name tag
let (+) pref suf = if String.is_empty suf then pref else pref^"-"^suf
let unit suf set is tag =
- Mappers.Nullary.register (set-tag+suf) (marker ident tag ());
+ Mappers.Nullary.register (set-tag+suf) (marker Fn.id tag ());
Predicates.Nullary.register (is-tag+suf) (has tag)
module Markers = struct
@@ -173,13 +173,13 @@ end
module Comment = struct
let () =
Mappers.Unary.register "comment" @@
- marker ident comment;
+ marker Fn.id comment;
end
module Python = struct
let () =
Mappers.Unary.register "python" @@
- marker ident python;
+ marker Fn.id python;
end
module Taint = struct
diff --git a/lib/bap_bml/bap_bml.mli b/lib/bap_bml/bap_bml.mli
index b32664be5..c227bba07 100644
--- a/lib/bap_bml/bap_bml.mli
+++ b/lib/bap_bml/bap_bml.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
(** BML - Bap Mapping Language.
diff --git a/lib/bap_bundle/bap_bundle.ml b/lib/bap_bundle/bap_bundle.ml
index 2c8ed4622..26bf2f790 100644
--- a/lib/bap_bundle/bap_bundle.ml
+++ b/lib/bap_bundle/bap_bundle.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Filename = Caml.Filename
module Sys = Caml.Sys
diff --git a/lib/bap_bundle/bap_bundle.mli b/lib/bap_bundle/bap_bundle.mli
index d0710a83c..d2e7cbf5e 100644
--- a/lib/bap_bundle/bap_bundle.mli
+++ b/lib/bap_bundle/bap_bundle.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Std : sig
diff --git a/lib/bap_byteweight/bap_byteweight.ml b/lib/bap_byteweight/bap_byteweight.ml
index d4fa971f9..3fc8e609d 100644
--- a/lib/bap_byteweight/bap_byteweight.ml
+++ b/lib/bap_byteweight/bap_byteweight.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module type Corpus = sig
diff --git a/lib/bap_byteweight/bap_byteweight_signatures.ml b/lib/bap_byteweight/bap_byteweight_signatures.ml
index 276519f33..cfe67c5e5 100644
--- a/lib/bap_byteweight/bap_byteweight_signatures.ml
+++ b/lib/bap_byteweight/bap_byteweight_signatures.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
module Sys = Caml.Sys
diff --git a/lib/bap_byteweight/bap_byteweight_signatures.mli b/lib/bap_byteweight/bap_byteweight_signatures.mli
index bf75ca500..397e09be8 100644
--- a/lib/bap_byteweight/bap_byteweight_signatures.mli
+++ b/lib/bap_byteweight/bap_byteweight_signatures.mli
@@ -10,7 +10,7 @@
those data types, e.g., [Bap_byteweight.Bytes].
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
diff --git a/lib/bap_c/bap_c_abi.ml b/lib/bap_c/bap_c_abi.ml
index 00d7094a2..8bbd60bd2 100644
--- a/lib/bap_c/bap_c_abi.ml
+++ b/lib/bap_c/bap_c_abi.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_c_type
open Monads.Std
@@ -194,7 +194,7 @@ let create_api_processor size abi : Bap_api.t =
let parse get ifs = Or_error.try_with (fun () -> parse_exn get ifs)
- let mapper = ident
+ let mapper = Fn.id
end in
(module Api)
@@ -217,7 +217,7 @@ end
module Arg = struct
- open Core_kernel
+ open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Monads.Std
diff --git a/lib/bap_c/bap_c_abi.mli b/lib/bap_c/bap_c_abi.mli
index 1e950ab3f..15ac45de1 100644
--- a/lib/bap_c/bap_c_abi.mli
+++ b/lib/bap_c/bap_c_abi.mli
@@ -4,7 +4,7 @@
modules for C language.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Monads.Std
diff --git a/lib/bap_c/bap_c_attr.ml b/lib/bap_c/bap_c_attr.ml
index 5b12bb3ea..aa00a919c 100644
--- a/lib/bap_c/bap_c_attr.ml
+++ b/lib/bap_c/bap_c_attr.ml
@@ -1,5 +1,5 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_c_type
diff --git a/lib/bap_c/bap_c_data.ml b/lib/bap_c/bap_c_data.ml
index e1c0a22ba..2c759eee1 100644
--- a/lib/bap_c/bap_c_data.ml
+++ b/lib/bap_c/bap_c_data.ml
@@ -6,7 +6,7 @@
the value. This module also defines models for integer
representation.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
(** models for 32 bit systems *)
diff --git a/lib/bap_c/bap_c_parser.ml b/lib/bap_c/bap_c_parser.ml
index 5a65c78ae..b4f273394 100644
--- a/lib/bap_c/bap_c_parser.ml
+++ b/lib/bap_c/bap_c_parser.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type decls = (string * Bap_c_type.t) list
type parser = Bap_c_size.base -> string -> decls Or_error.t
diff --git a/lib/bap_c/bap_c_parser.mli b/lib/bap_c/bap_c_parser.mli
index 112986cdc..f307ef193 100644
--- a/lib/bap_c/bap_c_parser.mli
+++ b/lib/bap_c/bap_c_parser.mli
@@ -3,7 +3,7 @@
The module doesn't provide any parsers by itself, but allows it to
be provided by a third party module.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type decls = (string * Bap_c_type.t) list
type parser = Bap_c_size.base -> string -> decls Or_error.t
diff --git a/lib/bap_c/bap_c_size.ml b/lib/bap_c/bap_c_size.ml
index 9b3687948..cedaff9a5 100644
--- a/lib/bap_c/bap_c_size.ml
+++ b/lib/bap_c/bap_c_size.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_c_data
open Bap_c_type
diff --git a/lib/bap_c/bap_c_size.mli b/lib/bap_c/bap_c_size.mli
index 621bf7f52..a2944e7c8 100644
--- a/lib/bap_c/bap_c_size.mli
+++ b/lib/bap_c/bap_c_size.mli
@@ -1,5 +1,5 @@
(** An abstraction of sizeof operator.*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_c_data
open Bap_c_type
diff --git a/lib/bap_c/bap_c_term_attributes.ml b/lib/bap_c/bap_c_term_attributes.ml
index 36ed1b478..63227c533 100644
--- a/lib/bap_c/bap_c_term_attributes.ml
+++ b/lib/bap_c/bap_c_term_attributes.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
diff --git a/lib/bap_c/bap_c_type.ml b/lib/bap_c/bap_c_type.ml
index 3012252f7..a564d60c8 100644
--- a/lib/bap_c/bap_c_type.ml
+++ b/lib/bap_c/bap_c_type.ml
@@ -10,7 +10,7 @@
to attach attributes of the form [attr(args)] to C type
declarations.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type char =
[ `schar | `char | `uchar]
diff --git a/lib/bap_c/bap_c_type_mapper.ml b/lib/bap_c/bap_c_type_mapper.ml
index 1e2398e70..b385c4650 100644
--- a/lib/bap_c/bap_c_type_mapper.ml
+++ b/lib/bap_c/bap_c_type_mapper.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_c_type
@@ -286,7 +286,7 @@ module Ident2 : Monad.S2 with type ('a,'e) t = 'a = struct
type ('a,'e) t = 'a
include Monad.Make2(struct
type nonrec ('a,'e) t = ('a,'e) t
- let return = ident
+ let return = Fn.id
let bind x f = f x
let map = `Define_using_bind
end)
diff --git a/lib/bap_c/bap_c_type_mapper.mli b/lib/bap_c/bap_c_type_mapper.mli
index e24225c0c..f5f138cb8 100644
--- a/lib/bap_c/bap_c_type_mapper.mli
+++ b/lib/bap_c/bap_c_type_mapper.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_c_type_mapper_intf
diff --git a/lib/bap_c/bap_c_type_printer.ml b/lib/bap_c/bap_c_type_printer.ml
index c3522d287..8586a679c 100644
--- a/lib/bap_c/bap_c_type_printer.ml
+++ b/lib/bap_c/bap_c_type_printer.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
open Bap_c_type
diff --git a/lib/bap_core_theory/bap_core_theory.mli b/lib/bap_core_theory/bap_core_theory.mli
index 41c2d9f4e..8189d9902 100644
--- a/lib/bap_core_theory/bap_core_theory.mli
+++ b/lib/bap_core_theory/bap_core_theory.mli
@@ -363,7 +363,7 @@
designed for such use-cases.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Caml.Format
open Bap_knowledge
diff --git a/lib/bap_core_theory/bap_core_theory_IEEE754.ml b/lib/bap_core_theory/bap_core_theory_IEEE754.ml
index f51cc77d2..e2f871f3d 100644
--- a/lib/bap_core_theory/bap_core_theory_IEEE754.ml
+++ b/lib/bap_core_theory/bap_core_theory_IEEE754.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory_value
type 'a num = 'a Sort.num
diff --git a/lib/bap_core_theory/bap_core_theory_basic.ml b/lib/bap_core_theory/bap_core_theory_basic.ml
index f3c235b46..cffaa99bd 100644
--- a/lib/bap_core_theory/bap_core_theory_basic.ml
+++ b/lib/bap_core_theory/bap_core_theory_basic.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_core_theory_definition
diff --git a/lib/bap_core_theory/bap_core_theory_effect.ml b/lib/bap_core_theory/bap_core_theory_effect.ml
index 0a9a4976f..a184f57b4 100644
--- a/lib/bap_core_theory/bap_core_theory_effect.ml
+++ b/lib/bap_core_theory/bap_core_theory_effect.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
module KB = Knowledge
diff --git a/lib/bap_core_theory/bap_core_theory_manager.ml b/lib/bap_core_theory/bap_core_theory_manager.ml
index b9ed8d9cd..58f2abcbe 100644
--- a/lib/bap_core_theory/bap_core_theory_manager.ml
+++ b/lib/bap_core_theory/bap_core_theory_manager.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_core_theory_definition
@@ -334,7 +334,7 @@ let theories () =
let str_ctxt () ctxt =
- List.to_string (Set.to_list ctxt) ~f:ident
+ List.to_string (Set.to_list ctxt) ~f:Fn.id
let is_applicable ~provided ~requires =
diff --git a/lib/bap_core_theory/bap_core_theory_parser.ml b/lib/bap_core_theory/bap_core_theory_parser.ml
index 98892940b..1d24c3f27 100644
--- a/lib/bap_core_theory/bap_core_theory_parser.ml
+++ b/lib/bap_core_theory/bap_core_theory_parser.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_core_theory_definition
open Bap_core_theory_value
diff --git a/lib/bap_core_theory/bap_core_theory_pass.ml b/lib/bap_core_theory/bap_core_theory_pass.ml
index 052199de5..593fda86e 100644
--- a/lib/bap_core_theory/bap_core_theory_pass.ml
+++ b/lib/bap_core_theory/bap_core_theory_pass.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_core_theory_definition
diff --git a/lib/bap_core_theory/bap_core_theory_pass.mli b/lib/bap_core_theory/bap_core_theory_pass.mli
index d8de2517d..7efc1e8b3 100644
--- a/lib/bap_core_theory/bap_core_theory_pass.mli
+++ b/lib/bap_core_theory/bap_core_theory_pass.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_core_theory_definition
diff --git a/lib/bap_core_theory/bap_core_theory_program.ml b/lib/bap_core_theory/bap_core_theory_program.ml
index 1bb67a971..5f91c06bf 100644
--- a/lib/bap_core_theory/bap_core_theory_program.ml
+++ b/lib/bap_core_theory/bap_core_theory_program.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bitvec_order.Comparators
open Bap_knowledge
diff --git a/lib/bap_core_theory/bap_core_theory_program.mli b/lib/bap_core_theory/bap_core_theory_program.mli
index f0a945d0b..170e28263 100644
--- a/lib/bap_core_theory/bap_core_theory_program.mli
+++ b/lib/bap_core_theory/bap_core_theory_program.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
module Value = Bap_core_theory_value
diff --git a/lib/bap_core_theory/bap_core_theory_target.ml b/lib/bap_core_theory/bap_core_theory_target.ml
index 450264276..c27e54b35 100644
--- a/lib/bap_core_theory/bap_core_theory_target.ml
+++ b/lib/bap_core_theory/bap_core_theory_target.ml
@@ -1,6 +1,6 @@
let package = "core"
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
module KB = Knowledge
diff --git a/lib/bap_core_theory/bap_core_theory_target.mli b/lib/bap_core_theory/bap_core_theory_target.mli
index b5ec64fa4..cff391abd 100644
--- a/lib/bap_core_theory/bap_core_theory_target.mli
+++ b/lib/bap_core_theory/bap_core_theory_target.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
module KB = Knowledge
diff --git a/lib/bap_core_theory/bap_core_theory_value.ml b/lib/bap_core_theory/bap_core_theory_value.ml
index b18079e32..648626d6e 100644
--- a/lib/bap_core_theory/bap_core_theory_value.ml
+++ b/lib/bap_core_theory/bap_core_theory_value.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Caml.Format
open Bap_knowledge
@@ -137,13 +137,13 @@ end
- let forget = ident
+ let forget = Fn.id
let refine witness t = match t with
| App {name=Some name}
| Sym name when [%compare.equal: name] name witness -> Some t
| _ -> None
- let forget : 'a t -> unit t = ident
+ let forget : 'a t -> unit t = Fn.id
let same x y = Exp.compare x y = 0
diff --git a/lib/bap_core_theory/bap_core_theory_value.mli b/lib/bap_core_theory/bap_core_theory_value.mli
index 51070aa6b..f05a8da58 100644
--- a/lib/bap_core_theory/bap_core_theory_value.mli
+++ b/lib/bap_core_theory/bap_core_theory_value.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Caml.Format
open Bap_knowledge
diff --git a/lib/bap_core_theory/bap_core_theory_var.ml b/lib/bap_core_theory/bap_core_theory_var.ml
index 09d887312..0b89dc7ef 100644
--- a/lib/bap_core_theory/bap_core_theory_var.ml
+++ b/lib/bap_core_theory/bap_core_theory_var.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Caml.Format
open Bap_knowledge
diff --git a/lib/bap_core_theory/bap_core_theory_var.mli b/lib/bap_core_theory/bap_core_theory_var.mli
index e87461b96..0b14767d0 100644
--- a/lib/bap_core_theory/bap_core_theory_var.mli
+++ b/lib/bap_core_theory/bap_core_theory_var.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_core_theory_value
diff --git a/lib/bap_demangle/bap_demangle.ml b/lib/bap_demangle/bap_demangle.ml
index 59ebe1dd7..3e5ebe6cf 100644
--- a/lib/bap_demangle/bap_demangle.ml
+++ b/lib/bap_demangle/bap_demangle.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
let maybe_mangled name =
String.length name > 2 &&
@@ -42,7 +42,7 @@ let demangle_internal name =
else None
let run_internal name =
- Option.value_map ~default:name ~f:ident (demangle_internal name)
+ Option.value_map ~default:name ~f:Fn.id (demangle_internal name)
module Std = struct
type demangler = {
diff --git a/lib/bap_demangle/bap_demangle.mli b/lib/bap_demangle/bap_demangle.mli
index 02f98d190..61d00c74c 100644
--- a/lib/bap_demangle/bap_demangle.mli
+++ b/lib/bap_demangle/bap_demangle.mli
@@ -4,7 +4,7 @@
demanglers, that can be used on demand by fronends and plugins.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Std : sig
type demangler
diff --git a/lib/bap_disasm/bap_disasm.ml b/lib/bap_disasm/bap_disasm.ml
index e6c260228..40cd19af5 100644
--- a/lib/bap_disasm/bap_disasm.ml
+++ b/lib/bap_disasm/bap_disasm.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Graphlib.Std
open Bap_types.Std
diff --git a/lib/bap_disasm/bap_disasm.mli b/lib/bap_disasm/bap_disasm.mli
index 9a7dd1942..6d2fdc696 100644
--- a/lib/bap_disasm/bap_disasm.mli
+++ b/lib/bap_disasm/bap_disasm.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
open Bap_disasm_types
diff --git a/lib/bap_disasm/bap_disasm_backend_types.ml b/lib/bap_disasm/bap_disasm_backend_types.ml
index f892eb1fc..db927c05e 100644
--- a/lib/bap_disasm/bap_disasm_backend_types.ml
+++ b/lib/bap_disasm/bap_disasm_backend_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type predicate =
| Is_true
diff --git a/lib/bap_disasm/bap_disasm_basic.ml b/lib/bap_disasm/bap_disasm_basic.ml
index 85d9957ad..5d5344f5c 100644
--- a/lib/bap_disasm/bap_disasm_basic.ml
+++ b/lib/bap_disasm/bap_disasm_basic.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_types.Std
open Bap_core_theory
@@ -213,7 +213,7 @@ module Imm = struct
let hash {data = n} =
if fits n.imm_small
then n.imm_small
- else Int64.hash (uw n.imm_large)
+ else Int64.hash (Option.value_exn n.imm_large)
end
include T
diff --git a/lib/bap_disasm/bap_disasm_basic.mli b/lib/bap_disasm/bap_disasm_basic.mli
index 530e987d1..5727daac2 100644
--- a/lib/bap_disasm/bap_disasm_basic.mli
+++ b/lib/bap_disasm/bap_disasm_basic.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_types.Std
open Bap_core_theory
diff --git a/lib/bap_disasm/bap_disasm_block.ml b/lib/bap_disasm/bap_disasm_block.ml
index 1907b1c70..a56a1874d 100644
--- a/lib/bap_disasm/bap_disasm_block.ml
+++ b/lib/bap_disasm/bap_disasm_block.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_types.Std
open Image_internal_std
diff --git a/lib/bap_disasm/bap_disasm_block.mli b/lib/bap_disasm/bap_disasm_block.mli
index 1985d6a0a..79b7fb0dc 100644
--- a/lib/bap_disasm/bap_disasm_block.mli
+++ b/lib/bap_disasm/bap_disasm_block.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_types.Std
open Bap_image_std
diff --git a/lib/bap_disasm/bap_disasm_brancher.ml b/lib/bap_disasm/bap_disasm_brancher.ml
index 17f05f18a..c3d4b7f1a 100644
--- a/lib/bap_disasm/bap_disasm_brancher.ml
+++ b/lib/bap_disasm/bap_disasm_brancher.ml
@@ -1,5 +1,5 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
open Monads.Std
diff --git a/lib/bap_disasm/bap_disasm_calls.ml b/lib/bap_disasm/bap_disasm_calls.ml
index 162c6cbf5..9fb64d0dd 100644
--- a/lib/bap_disasm/bap_disasm_calls.ml
+++ b/lib/bap_disasm/bap_disasm_calls.ml
@@ -1,6 +1,6 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Graphlib.Std
open Bap_types.Std
diff --git a/lib/bap_disasm/bap_disasm_calls.mli b/lib/bap_disasm/bap_disasm_calls.mli
index fb496d70e..745103675 100644
--- a/lib/bap_disasm/bap_disasm_calls.mli
+++ b/lib/bap_disasm/bap_disasm_calls.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Graphlib.Std
open Bap_types.Std
diff --git a/lib/bap_disasm/bap_disasm_driver.ml b/lib/bap_disasm/bap_disasm_driver.ml
index ab7b6a3c6..d8180c89c 100644
--- a/lib/bap_disasm/bap_disasm_driver.ml
+++ b/lib/bap_disasm/bap_disasm_driver.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_core_theory
open Bap_image_std
diff --git a/lib/bap_disasm/bap_disasm_driver.mli b/lib/bap_disasm/bap_disasm_driver.mli
index 7d2563eaf..1480d3f8f 100644
--- a/lib/bap_disasm/bap_disasm_driver.mli
+++ b/lib/bap_disasm/bap_disasm_driver.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
open Bap_knowledge
diff --git a/lib/bap_disasm/bap_disasm_insn.ml b/lib/bap_disasm/bap_disasm_insn.ml
index a7528ec07..7606a217a 100644
--- a/lib/bap_disasm/bap_disasm_insn.ml
+++ b/lib/bap_disasm/bap_disasm_insn.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_types.Std
@@ -47,7 +47,7 @@ module Props = struct
let has flags (flag,_) =
[%compare.equal : t] (Z.logand flags flag) flag
let set_if cond flag =
- if cond then fun flags -> flags + flag else ident
+ if cond then fun flags -> flags + flag else Fn.id
module T = struct
type t = Z.t
diff --git a/lib/bap_disasm/bap_disasm_insn.mli b/lib/bap_disasm/bap_disasm_insn.mli
index 39bfbcb86..4839341e6 100644
--- a/lib/bap_disasm/bap_disasm_insn.mli
+++ b/lib/bap_disasm/bap_disasm_insn.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_types.Std
diff --git a/lib/bap_disasm/bap_disasm_linear_sweep.ml b/lib/bap_disasm/bap_disasm_linear_sweep.ml
index a2ada9c91..e83c14c08 100644
--- a/lib/bap_disasm/bap_disasm_linear_sweep.ml
+++ b/lib/bap_disasm/bap_disasm_linear_sweep.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
@@ -23,7 +23,7 @@ let sweep ?(backend="llvm") arch mem : (mem * insn option) list Or_error.t =
let dis = Dis.store_kinds dis in
let lift = lifter_of_arch arch in
Dis.run dis mem
- ~init:[] ~return:ident ~stopped:(fun s _ ->
+ ~init:[] ~return:Fn.id ~stopped:(fun s _ ->
Dis.stop s (Dis.insns s)) |>
List.map ~f:(function
| mem, None -> mem,None
diff --git a/lib/bap_disasm/bap_disasm_linear_sweep.mli b/lib/bap_disasm/bap_disasm_linear_sweep.mli
index 9158869d9..67790ed18 100644
--- a/lib/bap_disasm/bap_disasm_linear_sweep.mli
+++ b/lib/bap_disasm/bap_disasm_linear_sweep.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
diff --git a/lib/bap_disasm/bap_disasm_prim.ml b/lib/bap_disasm/bap_disasm_prim.ml
index f7b9194c1..8d8825787 100644
--- a/lib/bap_disasm/bap_disasm_prim.ml
+++ b/lib/bap_disasm/bap_disasm_prim.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_disasm_backend_types
type t = int
diff --git a/lib/bap_disasm/bap_disasm_rec.ml b/lib/bap_disasm/bap_disasm_rec.ml
index 662c17391..68a83ccff 100644
--- a/lib/bap_disasm/bap_disasm_rec.ml
+++ b/lib/bap_disasm/bap_disasm_rec.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_types.Std
open Graphlib.Std
@@ -135,6 +135,6 @@ let run ?backend:_ ?(brancher=Brancher.empty) ?(rooter=Rooter.empty) arch mem =
with_unit arch mem @@ fun () ->
Driver.scan mem Driver.init >>= global_cfg
-let cfg = ident
+let cfg = Fn.id
let errors _ = []
let create = KB.return
diff --git a/lib/bap_disasm/bap_disasm_rec.mli b/lib/bap_disasm/bap_disasm_rec.mli
index cdebe1918..1ad0fb924 100644
--- a/lib/bap_disasm/bap_disasm_rec.mli
+++ b/lib/bap_disasm/bap_disasm_rec.mli
@@ -1,6 +1,6 @@
(** Recursive Descent Disassembler *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Graphlib.Std
open Bap_knowledge
diff --git a/lib/bap_disasm/bap_disasm_reconstructor.ml b/lib/bap_disasm/bap_disasm_reconstructor.ml
index 7ecc5edb0..93e1c4778 100644
--- a/lib/bap_disasm/bap_disasm_reconstructor.ml
+++ b/lib/bap_disasm/bap_disasm_reconstructor.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Graphlib.Std
open Bap_image_std
diff --git a/lib/bap_disasm/bap_disasm_reconstructor.mli b/lib/bap_disasm/bap_disasm_reconstructor.mli
index 54d7630df..54bf1a080 100644
--- a/lib/bap_disasm/bap_disasm_reconstructor.mli
+++ b/lib/bap_disasm/bap_disasm_reconstructor.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
diff --git a/lib/bap_disasm/bap_disasm_rooter.ml b/lib/bap_disasm/bap_disasm_rooter.ml
index 67340ddd6..1447e1b50 100644
--- a/lib/bap_disasm/bap_disasm_rooter.ml
+++ b/lib/bap_disasm/bap_disasm_rooter.ml
@@ -1,6 +1,6 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
diff --git a/lib/bap_disasm/bap_disasm_source.ml b/lib/bap_disasm/bap_disasm_source.ml
index 73bc66c50..982abaa95 100644
--- a/lib/bap_disasm/bap_disasm_source.ml
+++ b/lib/bap_disasm/bap_disasm_source.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
open Bap_core_theory
diff --git a/lib/bap_disasm/bap_disasm_source.mli b/lib/bap_disasm/bap_disasm_source.mli
index 8cbf934c7..f94501d2e 100644
--- a/lib/bap_disasm/bap_disasm_source.mli
+++ b/lib/bap_disasm/bap_disasm_source.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
open Bap_future.Std
diff --git a/lib/bap_disasm/bap_disasm_source_factory.ml b/lib/bap_disasm/bap_disasm_source_factory.ml
index fdbf3b35c..ee3aeecc1 100644
--- a/lib/bap_disasm/bap_disasm_source_factory.ml
+++ b/lib/bap_disasm/bap_disasm_source_factory.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
open Bap_disasm_source_intf
diff --git a/lib/bap_disasm/bap_disasm_source_factory.mli b/lib/bap_disasm/bap_disasm_source_factory.mli
index 40cf8c378..ba7c86a63 100644
--- a/lib/bap_disasm/bap_disasm_source_factory.mli
+++ b/lib/bap_disasm/bap_disasm_source_factory.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_disasm_source_intf
module Factory : sig
diff --git a/lib/bap_disasm/bap_disasm_source_intf.ml b/lib/bap_disasm/bap_disasm_source_intf.ml
index 67a2f3f85..14e87a03b 100644
--- a/lib/bap_disasm/bap_disasm_source_intf.ml
+++ b/lib/bap_disasm/bap_disasm_source_intf.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
open Bap_future.Std
diff --git a/lib/bap_disasm/bap_disasm_std.ml b/lib/bap_disasm/bap_disasm_std.ml
index 68bae2303..6683da19e 100644
--- a/lib/bap_disasm/bap_disasm_std.ml
+++ b/lib/bap_disasm/bap_disasm_std.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
diff --git a/lib/bap_disasm/bap_disasm_stub_lifter.mli b/lib/bap_disasm/bap_disasm_stub_lifter.mli
index 1e6ec7820..53762e628 100644
--- a/lib/bap_disasm/bap_disasm_stub_lifter.mli
+++ b/lib/bap_disasm/bap_disasm_stub_lifter.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
open Bap_disasm_types
diff --git a/lib/bap_disasm/bap_disasm_symbolizer.ml b/lib/bap_disasm/bap_disasm_symbolizer.ml
index 601f272ed..35ba9c187 100644
--- a/lib/bap_disasm/bap_disasm_symbolizer.ml
+++ b/lib/bap_disasm/bap_disasm_symbolizer.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_types.Std
open Bap_image_std
diff --git a/lib/bap_disasm/bap_disasm_symtab.ml b/lib/bap_disasm/bap_disasm_symtab.ml
index ae4583eae..a13ffa1e0 100644
--- a/lib/bap_disasm/bap_disasm_symtab.ml
+++ b/lib/bap_disasm/bap_disasm_symtab.ml
@@ -1,6 +1,6 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_types.Std
open Image_internal_std
diff --git a/lib/bap_disasm/bap_disasm_symtab.mli b/lib/bap_disasm/bap_disasm_symtab.mli
index 3ee70c72b..9c9a90039 100644
--- a/lib/bap_disasm/bap_disasm_symtab.mli
+++ b/lib/bap_disasm/bap_disasm_symtab.mli
@@ -1,6 +1,6 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Image_internal_std
diff --git a/lib/bap_disasm/bap_disasm_target_factory.ml b/lib/bap_disasm/bap_disasm_target_factory.ml
index 552e56ead..a5e27ca69 100644
--- a/lib/bap_disasm/bap_disasm_target_factory.ml
+++ b/lib/bap_disasm/bap_disasm_target_factory.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
include Bap_disasm_target_intf
diff --git a/lib/bap_disasm/bap_disasm_target_intf.ml b/lib/bap_disasm/bap_disasm_target_intf.ml
index b0bc34b2d..850ccbb4f 100644
--- a/lib/bap_disasm/bap_disasm_target_intf.ml
+++ b/lib/bap_disasm/bap_disasm_target_intf.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
diff --git a/lib/bap_disasm/bap_disasm_types.ml b/lib/bap_disasm/bap_disasm_types.ml
index 3315efb57..65ee99e20 100644
--- a/lib/bap_disasm/bap_disasm_types.ml
+++ b/lib/bap_disasm/bap_disasm_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
diff --git a/lib/bap_disasm/bap_insn_aliasing.ml b/lib/bap_disasm/bap_insn_aliasing.ml
index a9d09adab..574c6b957 100644
--- a/lib/bap_disasm/bap_insn_aliasing.ml
+++ b/lib/bap_disasm/bap_insn_aliasing.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
module Dis = Bap_disasm_basic
diff --git a/lib/bap_dwarf/bap_dwarf.mli b/lib/bap_dwarf/bap_dwarf.mli
index 85d393a32..e283a3724 100644
--- a/lib/bap_dwarf/bap_dwarf.mli
+++ b/lib/bap_dwarf/bap_dwarf.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
diff --git a/lib/bap_dwarf/dwarf_data.ml b/lib/bap_dwarf/dwarf_data.ml
index 9ddebb6b6..b11d32162 100644
--- a/lib/bap_dwarf/dwarf_data.ml
+++ b/lib/bap_dwarf/dwarf_data.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Dwarf_types
diff --git a/lib/bap_dwarf/dwarf_data.mli b/lib/bap_dwarf/dwarf_data.mli
index 92334f1ac..bef973acd 100644
--- a/lib/bap_dwarf/dwarf_data.mli
+++ b/lib/bap_dwarf/dwarf_data.mli
@@ -1,5 +1,5 @@
(** Representation for Dwarf Data. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Dwarf_types
diff --git a/lib/bap_dwarf/dwarf_fbi.ml b/lib/bap_dwarf/dwarf_fbi.ml
index bc446b0e2..4221ab6b2 100644
--- a/lib/bap_dwarf/dwarf_fbi.ml
+++ b/lib/bap_dwarf/dwarf_fbi.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Or_error
open Bap.Std
@@ -29,6 +29,8 @@ type scheme = value option reader list
type table = scheme Table.t
+let functions = Fn.id
+
(** *)
module Fn = struct
module T = struct
@@ -176,7 +178,7 @@ let read_function cu_end abbrs str ~pos_ref =
run_scheme scheme str ~pos_ref >>| fun vs ->
match fn_of_values vs with
| Ok fn -> Yield (fn, ())
- | Error err -> Skip ()
+ | Error _ -> Skip ()
else return Done
let create data : t Or_error.t =
@@ -226,5 +228,3 @@ let create data : t Or_error.t =
(Error.to_string_hum err);
Sequence.Step.Done) in
read_unit ()
-
-let functions = ident
diff --git a/lib/bap_dwarf/dwarf_fbi.mli b/lib/bap_dwarf/dwarf_fbi.mli
index 3727d359e..98ed11030 100644
--- a/lib/bap_dwarf/dwarf_fbi.mli
+++ b/lib/bap_dwarf/dwarf_fbi.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Dwarf_types
diff --git a/lib/bap_dwarf/dwarf_input.ml b/lib/bap_dwarf/dwarf_input.ml
index 33f7c425c..cd112897e 100644
--- a/lib/bap_dwarf/dwarf_input.ml
+++ b/lib/bap_dwarf/dwarf_input.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Word_size
open Or_error
open Binary_packing
@@ -61,11 +61,11 @@ let int = {
let int32 = {
of_int64 = ok_some Int64.to_int32;
- of_int32 = ok_any ident
+ of_int32 = ok_any Fn.id
}
let int64 = {
- of_int64 = ok_any ident;
+ of_int64 = ok_any Fn.id;
of_int32 = ok_any Int64.of_int32;
}
diff --git a/lib/bap_dwarf/dwarf_input.mli b/lib/bap_dwarf/dwarf_input.mli
index 8edbde530..fe8790398 100644
--- a/lib/bap_dwarf/dwarf_input.mli
+++ b/lib/bap_dwarf/dwarf_input.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Dwarf_types
diff --git a/lib/bap_dwarf/dwarf_leb128.ml b/lib/bap_dwarf/dwarf_leb128.ml
index ed22d9ba3..1e4c91760 100644
--- a/lib/bap_dwarf/dwarf_leb128.ml
+++ b/lib/bap_dwarf/dwarf_leb128.ml
@@ -1,5 +1,5 @@
(** The implementation can work with numbers of arbitrary length. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Bits = struct
open Binary_packing
diff --git a/lib/bap_dwarf/dwarf_leb128.mli b/lib/bap_dwarf/dwarf_leb128.mli
index 0853d63d9..852fa3525 100644
--- a/lib/bap_dwarf/dwarf_leb128.mli
+++ b/lib/bap_dwarf/dwarf_leb128.mli
@@ -1,5 +1,5 @@
(** LEB128 - Little Endian Base 128 encoding. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
(** an encoded value *)
type t [@@deriving bin_io, compare, sexp]
diff --git a/lib/bap_dwarf/dwarf_types.ml b/lib/bap_dwarf/dwarf_types.ml
index 2e92d48b2..2088c9d1c 100644
--- a/lib/bap_dwarf/dwarf_types.ml
+++ b/lib/bap_dwarf/dwarf_types.ml
@@ -1,5 +1,5 @@
(** Basic type declarations for DWARF format. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
type leb128 = Dwarf_leb128.t [@@deriving bin_io, compare, sexp]
diff --git a/lib/bap_elementary/bap_elementary.ml b/lib/bap_elementary/bap_elementary.ml
index 5282ebffe..9bb09a0c1 100644
--- a/lib/bap_elementary/bap_elementary.ml
+++ b/lib/bap_elementary/bap_elementary.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_knowledge
diff --git a/lib/bap_elementary/bap_elementary.mli b/lib/bap_elementary/bap_elementary.mli
index 98db2b95c..d5c632f4b 100644
--- a/lib/bap_elementary/bap_elementary.mli
+++ b/lib/bap_elementary/bap_elementary.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_knowledge
open Bap_core_theory
diff --git a/lib/bap_elf/bap_elf.mli b/lib/bap_elf/bap_elf.mli
index a9a660c09..60beb504d 100644
--- a/lib/bap_elf/bap_elf.mli
+++ b/lib/bap_elf/bap_elf.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
diff --git a/lib/bap_elf/elf_internal_utils.ml b/lib/bap_elf/elf_internal_utils.ml
index 92818b319..7080581d6 100644
--- a/lib/bap_elf/elf_internal_utils.ml
+++ b/lib/bap_elf/elf_internal_utils.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
let int_of_int64 n = match Int64.to_int n with
| Some v -> Ok v
diff --git a/lib/bap_elf/elf_internal_utils.mli b/lib/bap_elf/elf_internal_utils.mli
index 0129c5b6c..401ab6fb9 100644
--- a/lib/bap_elf/elf_internal_utils.mli
+++ b/lib/bap_elf/elf_internal_utils.mli
@@ -1,3 +1,3 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
val int_of_int64 : int64 -> int Or_error.t
diff --git a/lib/bap_elf/elf_parse.ml b/lib/bap_elf/elf_parse.ml
index f5fa53fd1..9d4ec35c6 100644
--- a/lib/bap_elf/elf_parse.ml
+++ b/lib/bap_elf/elf_parse.ml
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bitstring
open Elf_types
diff --git a/lib/bap_elf/elf_parse.mli b/lib/bap_elf/elf_parse.mli
index ba92d1b93..747bb1f8b 100644
--- a/lib/bap_elf/elf_parse.mli
+++ b/lib/bap_elf/elf_parse.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Elf_types
val from_bigstring : ?pos:int -> ?len:int -> Bigstring.t -> elf Or_error.t
diff --git a/lib/bap_elf/elf_types.ml b/lib/bap_elf/elf_types.ml
index e184b3d7d..1c92771dc 100644
--- a/lib/bap_elf/elf_types.ml
+++ b/lib/bap_elf/elf_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
type e_class =
diff --git a/lib/bap_elf/elf_utils.ml b/lib/bap_elf/elf_utils.ml
index a16c58d28..a5cfecb2c 100644
--- a/lib/bap_elf/elf_utils.ml
+++ b/lib/bap_elf/elf_utils.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Elf_types
open Elf_internal_utils
open Or_error
diff --git a/lib/bap_elf/elf_utils.mli b/lib/bap_elf/elf_utils.mli
index 7b2e98a82..7eb5e9b5e 100644
--- a/lib/bap_elf/elf_utils.mli
+++ b/lib/bap_elf/elf_utils.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Elf_types
(** [section_name data elf section] extracts section name from data *)
diff --git a/lib/bap_future/bap_future.ml b/lib/bap_future/bap_future.ml
index 6b6fdd10d..e24d989b4 100644
--- a/lib/bap_future/bap_future.ml
+++ b/lib/bap_future/bap_future.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
module Std = struct
@@ -555,7 +555,7 @@ module Std = struct
link xs s' (fun x -> push' (snd (f x)));
s,s'
- let unzip xs = split xs ~f:ident
+ let unzip xs = split xs ~f:Fn.id
let frame ~clk dat ~init ~f =
let s = sync ~clk dat in
diff --git a/lib/bap_future/bap_future.mli b/lib/bap_future/bap_future.mli
index 828ecec8d..88bd14ceb 100644
--- a/lib/bap_future/bap_future.mli
+++ b/lib/bap_future/bap_future.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
(** Future library.
@@ -603,7 +603,7 @@ module Std : sig
(** [unzip xs] creates a pair of streams, where the first stream contains
[fst x] for each [x] in [xs] and the second stream contains [snd x] for
- each [x] in [xs]. Essentially, the same as [split ~f:ident] *)
+ each [x] in [xs]. Essentially, the same as [split ~f:Fn.id] *)
val unzip : ('a * 'b) t -> 'a t * 'b t
(** [once xs] creates a stream that will at most contain the next value
diff --git a/lib/bap_ghidra/ghidra_disasm.cpp b/lib/bap_ghidra/ghidra_disasm.cpp
index 284d7b86e..a832d6eee 100644
--- a/lib/bap_ghidra/ghidra_disasm.cpp
+++ b/lib/bap_ghidra/ghidra_disasm.cpp
@@ -78,6 +78,7 @@ std::string get_extra_opname(ExtraOpCode op) {
switch (op) {
case CORE_SEQ: return "core:seq";
}
+ return ":unk";
}
class OpcodesTable {
diff --git a/lib/bap_ida/bap_ida.ml b/lib/bap_ida/bap_ida.ml
index 4fca9b501..14d3ff49a 100644
--- a/lib/bap_ida/bap_ida.ml
+++ b/lib/bap_ida/bap_ida.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Command = struct
type 'a t = {
diff --git a/lib/bap_image/bap_fileutils.ml b/lib/bap_image/bap_fileutils.ml
index 873dc734a..aab90cac4 100644
--- a/lib/bap_image/bap_fileutils.ml
+++ b/lib/bap_image/bap_fileutils.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Option.Monad_infix
module Unix = Caml_unix
diff --git a/lib/bap_image/bap_fileutils.mli b/lib/bap_image/bap_fileutils.mli
index 3859ace2d..a0b21b6b4 100644
--- a/lib/bap_image/bap_fileutils.mli
+++ b/lib/bap_image/bap_fileutils.mli
@@ -1,6 +1,6 @@
(**Helper IO functions. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
val readfile : string -> Bigstring.t
diff --git a/lib/bap_image/bap_image.ml b/lib/bap_image/bap_image.ml
index 4d1bf240d..1930d4fbd 100644
--- a/lib/bap_image/bap_image.ml
+++ b/lib/bap_image/bap_image.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_types.Std
@@ -119,20 +119,20 @@ module Scheme = struct
let location () = scheme addr $ size
let declare name scheme f = Ogre.declare ~name scheme f
let named n scheme f = declare n (scheme $ name) f
- let arch () = declare "arch" (scheme name) ident
- let subarch () = declare "subarch" (scheme name) ident
- let vendor () = declare "vendor" (scheme name) ident
- let system () = declare "system" (scheme name) ident
- let format () = declare "format" (scheme name) ident
- let require () = declare "require" (scheme name) ident
- let abi () = declare "abi" (scheme name) ident
- let bits () = declare "bits" (scheme size) ident
- let is_little_endian () = declare "is-little-endian" (scheme flag) ident
- let is_executable () = declare "is-executable" (scheme flag) ident
- let bias () = declare "bias" (scheme off) ident
+ let arch () = declare "arch" (scheme name) Fn.id
+ let subarch () = declare "subarch" (scheme name) Fn.id
+ let vendor () = declare "vendor" (scheme name) Fn.id
+ let system () = declare "system" (scheme name) Fn.id
+ let format () = declare "format" (scheme name) Fn.id
+ let require () = declare "require" (scheme name) Fn.id
+ let abi () = declare "abi" (scheme name) Fn.id
+ let bits () = declare "bits" (scheme size) Fn.id
+ let is_little_endian () = declare "is-little-endian" (scheme flag) Fn.id
+ let is_executable () = declare "is-executable" (scheme flag) Fn.id
+ let bias () = declare "bias" (scheme off) Fn.id
let section () = declare "section" (location ()) void_region
- let code_start () = declare "code-start" (scheme addr) ident
- let entry_point () = declare "entry-point" (scheme addr) ident
+ let code_start () = declare "code-start" (scheme addr) Fn.id
+ let entry_point () = declare "entry-point" (scheme addr) Fn.id
let symbol_chunk () = declare "symbol-chunk" (location () $ root) region
let named_region () = named "named-region" (location ()) region
let named_symbol () = named "named-symbol" (scheme addr) (fun x y -> x,y)
@@ -149,7 +149,7 @@ module Scheme = struct
declare "relocation" (scheme fixup $ addr) Tuple.T2.create
let external_reference () =
declare "external-reference" (scheme addr $ name) Tuple.T2.create
- let base_address () = declare "base-address" (scheme addr) ident
+ let base_address () = declare "base-address" (scheme addr) Fn.id
let symbol_value () =
declare "symbol-value" (scheme addr $ value) Tuple.T2.create
@@ -701,8 +701,8 @@ let create ?backend path =
let of_bigstring ?backend data =
let (module Load) = get_loader backend in
- invoke Load.from_data ident data
+ invoke Load.from_data Fn.id data
let of_string ?backend data =
let (module Load) = get_loader backend in
- invoke Load.from_data ident (Bigstring.of_string data)
+ invoke Load.from_data Fn.id (Bigstring.of_string data)
diff --git a/lib/bap_image/bap_image.mli b/lib/bap_image/bap_image.mli
index a67e3118a..d53dbf73d 100644
--- a/lib/bap_image/bap_image.mli
+++ b/lib/bap_image/bap_image.mli
@@ -1,7 +1,7 @@
(** A loadable memory image of an executable. *)
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_types.Std
diff --git a/lib/bap_image/bap_memmap.ml b/lib/bap_image/bap_memmap.ml
index 0189377de..03203455e 100644
--- a/lib/bap_image/bap_memmap.ml
+++ b/lib/bap_image/bap_memmap.ml
@@ -1,5 +1,5 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_types.Std
open Option.Monad_infix
diff --git a/lib/bap_image/bap_memmap.mli b/lib/bap_image/bap_memmap.mli
index 6465121e4..f4a8ed388 100644
--- a/lib/bap_image/bap_memmap.mli
+++ b/lib/bap_image/bap_memmap.mli
@@ -1,5 +1,5 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
type mem = Bap_memory.t
diff --git a/lib/bap_image/bap_memory.ml b/lib/bap_image/bap_memory.ml
index 5e1cb4480..4e3c705c2 100644
--- a/lib/bap_image/bap_memory.ml
+++ b/lib/bap_image/bap_memory.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_types.Std
diff --git a/lib/bap_image/bap_memory.mli b/lib/bap_image/bap_memory.mli
index 813825e4b..5cbc82d26 100644
--- a/lib/bap_image/bap_memory.mli
+++ b/lib/bap_image/bap_memory.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_types.Std
diff --git a/lib/bap_image/bap_table.ml b/lib/bap_image/bap_table.ml
index 8a069e2d3..bcdd768d9 100644
--- a/lib/bap_image/bap_table.ml
+++ b/lib/bap_image/bap_table.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Or_error
diff --git a/lib/bap_image/bap_table.mli b/lib/bap_image/bap_table.mli
index cc0a2a198..43bff5459 100644
--- a/lib/bap_image/bap_table.mli
+++ b/lib/bap_image/bap_table.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
type 'a t [@@deriving sexp_of]
diff --git a/lib/bap_image/image_backend.ml b/lib/bap_image/image_backend.ml
index c399e6f9b..44d5dc541 100644
--- a/lib/bap_image/image_backend.ml
+++ b/lib/bap_image/image_backend.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_types.Std
open Image_common
diff --git a/lib/bap_image/image_common.ml b/lib/bap_image/image_common.ml
index 6d1ea784e..b4caa9fad 100644
--- a/lib/bap_image/image_common.ml
+++ b/lib/bap_image/image_common.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
module Location = struct
diff --git a/lib/bap_image/image_internal_std.ml b/lib/bap_image/image_internal_std.ml
index 6da28eeee..832ea8379 100644
--- a/lib/bap_image/image_internal_std.ml
+++ b/lib/bap_image/image_internal_std.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
include Image_common
diff --git a/lib/bap_language/bap_language.ml b/lib/bap_language/bap_language.ml
index abf88732d..251e5e8b7 100644
--- a/lib/bap_language/bap_language.ml
+++ b/lib/bap_language/bap_language.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_plugins.Std
open Format
diff --git a/lib/bap_language/bap_language.mli b/lib/bap_language/bap_language.mli
index 8eaebb02b..14323f556 100644
--- a/lib/bap_language/bap_language.mli
+++ b/lib/bap_language/bap_language.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
diff --git a/lib/bap_llvm/bap_llvm.ml b/lib/bap_llvm/bap_llvm.ml
index e6c0a9424..3f915a4da 100644
--- a/lib/bap_llvm/bap_llvm.ml
+++ b/lib/bap_llvm/bap_llvm.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
let strip_version ver =
if String.length ver <> 5 then ver
diff --git a/lib/bap_llvm/bap_llvm.mli b/lib/bap_llvm/bap_llvm.mli
index 79a64db48..2e96a081a 100644
--- a/lib/bap_llvm/bap_llvm.mli
+++ b/lib/bap_llvm/bap_llvm.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
(** Initialize LLVM backend.
diff --git a/lib/bap_llvm/bap_llvm_disasm.ml b/lib/bap_llvm/bap_llvm_disasm.ml
index 9b29ee917..aefef79dc 100644
--- a/lib/bap_llvm/bap_llvm_disasm.ml
+++ b/lib/bap_llvm/bap_llvm_disasm.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
[@@@ocaml.warning "-3"]
diff --git a/lib/bap_llvm/bap_llvm_disasm.mli b/lib/bap_llvm/bap_llvm_disasm.mli
index b9182e9a3..196ff4cdc 100644
--- a/lib/bap_llvm/bap_llvm_disasm.mli
+++ b/lib/bap_llvm/bap_llvm_disasm.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type x86_syntax = [`att | `intel] [@@deriving sexp]
diff --git a/lib/bap_llvm/bap_llvm_loader.ml b/lib/bap_llvm/bap_llvm_loader.ml
index 35ad9fd28..a32b9ef77 100644
--- a/lib/bap_llvm/bap_llvm_loader.ml
+++ b/lib/bap_llvm/bap_llvm_loader.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Or_error
@@ -37,10 +37,10 @@ module LLVM = struct
(** entry point *)
let entry_point () =
- Ogre.declare ~name:"llvm:entry-point" (scheme addr) ident
+ Ogre.declare ~name:"llvm:entry-point" (scheme addr) Fn.id
let base_address () =
- Ogre.declare ~name:"llvm:base-address" (scheme addr) ident
+ Ogre.declare ~name:"llvm:base-address" (scheme addr) Fn.id
(** (llvm:relocation from to). *)
let relocation () =
diff --git a/lib/bap_llvm/bap_llvm_loader.mli b/lib/bap_llvm/bap_llvm_loader.mli
index 79acdb973..39d62d20b 100644
--- a/lib/bap_llvm/bap_llvm_loader.mli
+++ b/lib/bap_llvm/bap_llvm_loader.mli
@@ -1,3 +1,3 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
val init : ?base:int64 -> ?pdb_path:string -> unit -> unit Or_error.t
diff --git a/lib/bap_main/bap_main.mli b/lib/bap_main/bap_main.mli
index 8bc40ddd7..ae9d8dfd9 100644
--- a/lib/bap_main/bap_main.mli
+++ b/lib/bap_main/bap_main.mli
@@ -584,7 +584,7 @@ module Extension : sig
Note, the examples below assume the following preamble:
{[
- open Core_kernel
+ open Core_kernel[@@warning "-D"]
open Bap_main.Extension
]}
@@ -1035,7 +1035,7 @@ module Extension : sig
Declaring a simple configuration parameter:
{[
- open Core_kernel
+ open Core_kernel[@@warning "-D"]
open Bap_main.Extension
let depth = Configuration.parameter Type.int "depth"
@@ -1051,7 +1051,7 @@ module Extension : sig
example could be rewritten as:
{[
- open Core_kernel
+ open Core_kernel[@@warning "-D"]
open Bap_main.Extension
open Bap_main.Extension.Syntax
diff --git a/lib/bap_main/bap_main_event.ml b/lib/bap_main/bap_main_event.ml
index b9be18f04..cb65bf743 100644
--- a/lib/bap_main/bap_main_event.ml
+++ b/lib/bap_main/bap_main_event.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_future.Std
open Bap_plugins.Std
open Bap_bundle.Std
diff --git a/lib/bap_main/bap_main_log.ml b/lib/bap_main/bap_main_log.ml
index 21a174b5b..11c2d6fcc 100644
--- a/lib/bap_main/bap_main_log.ml
+++ b/lib/bap_main/bap_main_log.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_future.Std
open Bap_plugins.Std
open Format
diff --git a/lib/bap_mips/bap_mips_target.ml b/lib/bap_mips/bap_mips_target.ml
index fd4f8db66..389411fcc 100644
--- a/lib/bap_mips/bap_mips_target.ml
+++ b/lib/bap_mips/bap_mips_target.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
diff --git a/lib/bap_piqi/bil_piqi.ml b/lib/bap_piqi/bil_piqi.ml
index 1e416b3ad..3245c24c6 100644
--- a/lib/bap_piqi/bil_piqi.ml
+++ b/lib/bap_piqi/bil_piqi.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bil.Types
diff --git a/lib/bap_piqi/bir_piqi.ml b/lib/bap_piqi/bir_piqi.ml
index b0f94edae..65743811c 100644
--- a/lib/bap_piqi/bir_piqi.ml
+++ b/lib/bap_piqi/bir_piqi.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Option.Monad_infix
diff --git a/lib/bap_piqi/test/run_piqi_tests.ml b/lib/bap_piqi/test/run_piqi_tests.ml
index dfea6047d..696fe9a7e 100644
--- a/lib/bap_piqi/test/run_piqi_tests.ml
+++ b/lib/bap_piqi/test/run_piqi_tests.ml
@@ -1,5 +1,5 @@
open OUnit2
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module Example = struct
diff --git a/lib/bap_plugins/bap_plugins.ml b/lib/bap_plugins/bap_plugins.ml
index ff0735af5..15f52c869 100644
--- a/lib/bap_plugins/bap_plugins.ml
+++ b/lib/bap_plugins/bap_plugins.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_bundle.Std
open Bap_future.Std
open Or_error.Monad_infix
diff --git a/lib/bap_plugins/bap_plugins.mli b/lib/bap_plugins/bap_plugins.mli
index 518f6ff85..6dec507cd 100644
--- a/lib/bap_plugins/bap_plugins.mli
+++ b/lib/bap_plugins/bap_plugins.mli
@@ -1,6 +1,6 @@
(** Bap Plugin Library. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_bundle.Std
open Bap_future.Std
diff --git a/lib/bap_plugins/bap_plugins_units.ml b/lib/bap_plugins/bap_plugins_units.ml
index 3889984f9..0fe93474c 100644
--- a/lib/bap_plugins/bap_plugins_units.ml
+++ b/lib/bap_plugins/bap_plugins_units.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
let name = "dynlink"
diff --git a/lib/bap_plugins/bap_plugins_units.mli b/lib/bap_plugins/bap_plugins_units.mli
index d5d4a5b8d..6128c0d53 100644
--- a/lib/bap_plugins/bap_plugins_units.mli
+++ b/lib/bap_plugins/bap_plugins_units.mli
@@ -1,6 +1,6 @@
(** Internal module. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type reason = [
| `In_core
diff --git a/lib/bap_powerpc/bap_powerpc_target.ml b/lib/bap_powerpc/bap_powerpc_target.ml
index 25ea465c6..2dbcff432 100644
--- a/lib/bap_powerpc/bap_powerpc_target.ml
+++ b/lib/bap_powerpc/bap_powerpc_target.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
diff --git a/lib/bap_primus/bap_primus.mli b/lib/bap_primus/bap_primus.mli
index bc265a27d..3600602ad 100644
--- a/lib/bap_primus/bap_primus.mli
+++ b/lib/bap_primus/bap_primus.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Regular.Std
open Bap.Std
diff --git a/lib/bap_primus/bap_primus_env.ml b/lib/bap_primus/bap_primus_env.ml
index 2349f966b..3b1bfbae8 100644
--- a/lib/bap_primus/bap_primus_env.ml
+++ b/lib/bap_primus/bap_primus_env.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_primus_types
diff --git a/lib/bap_primus/bap_primus_exn.ml b/lib/bap_primus/bap_primus_exn.ml
index 785ecd265..e9ba04dd9 100644
--- a/lib/bap_primus/bap_primus_exn.ml
+++ b/lib/bap_primus/bap_primus_exn.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type t = exn = ..
let to_string err = Caml.Printexc.to_string err
diff --git a/lib/bap_primus/bap_primus_generator.ml b/lib/bap_primus/bap_primus_generator.ml
index 2cd1e7ea5..364c6014e 100644
--- a/lib/bap_primus/bap_primus_generator.ml
+++ b/lib/bap_primus/bap_primus_generator.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus_types
@@ -96,7 +96,7 @@ let unfold (type gen)
let static ?(width=8) value =
let value = Bitvec.(int value mod modulus width) in
- of_iterator ~width ~to_bitvec:ident (module struct
+ of_iterator ~width ~to_bitvec:Fn.id (module struct
type t = Bitvec.t
type dom = Bitvec.t
let min = value
@@ -111,7 +111,7 @@ module Random = struct
let create_lcg ?(width=8) ?min ?max start =
let module Gen = (val MCG.create_small ?min ?max width) in
let seed s = Gen.create (s + start) in
- of_iterator ~width ~to_bitvec:ident ~seed
+ of_iterator ~width ~to_bitvec:Fn.id ~seed
(module Gen) (Gen.create start)
let lcg = create_lcg
diff --git a/lib/bap_primus/bap_primus_info.ml b/lib/bap_primus/bap_primus_info.ml
index e1f7e9e5e..828fe75be 100644
--- a/lib/bap_primus/bap_primus_info.ml
+++ b/lib/bap_primus/bap_primus_info.ml
@@ -1,5 +1,5 @@
open Bap_knowledge
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Name = Knowledge.Name
diff --git a/lib/bap_primus/bap_primus_interpreter.ml b/lib/bap_primus/bap_primus_interpreter.ml
index 89aea0ad2..4737891c7 100644
--- a/lib/bap_primus/bap_primus_interpreter.ml
+++ b/lib/bap_primus/bap_primus_interpreter.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_c.Std
@@ -20,7 +20,7 @@ open Primus
module Time = struct
include Int
- let clocks = ident
+ let clocks = Fn.id
let of_clocks = of_int
end
@@ -862,7 +862,7 @@ module LinkBinaryProgram(Machine : Machine) = struct
let is_linked name t = [
Linker.is_linked (`tid (Term.tid t));
Linker.is_linked (`symbol (name t));
- ] |> Machine.List.all >>| List.exists ~f:ident >>= function
+ ] |> Machine.List.all >>| List.exists ~f:Fn.id >>= function
| true -> Machine.return true
| false -> match Term.get_attr t address with
| None -> Machine.return false
diff --git a/lib/bap_primus/bap_primus_interpreter.mli b/lib/bap_primus/bap_primus_interpreter.mli
index c485d26be..fced34b7c 100644
--- a/lib/bap_primus/bap_primus_interpreter.mli
+++ b/lib/bap_primus/bap_primus_interpreter.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus_types
diff --git a/lib/bap_primus/bap_primus_iterator.ml b/lib/bap_primus/bap_primus_iterator.ml
index d8729675c..61608fdd7 100644
--- a/lib/bap_primus/bap_primus_iterator.ml
+++ b/lib/bap_primus/bap_primus_iterator.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module type Base = sig
type t
diff --git a/lib/bap_primus/bap_primus_iterator.mli b/lib/bap_primus/bap_primus_iterator.mli
index 7e576c923..c8f212d6b 100644
--- a/lib/bap_primus/bap_primus_iterator.mli
+++ b/lib/bap_primus/bap_primus_iterator.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_primus_generator_types
module type Base = Iterator.Base
diff --git a/lib/bap_primus/bap_primus_linker.ml b/lib/bap_primus/bap_primus_linker.ml
index 16209e5cd..1052708b9 100644
--- a/lib/bap_primus/bap_primus_linker.ml
+++ b/lib/bap_primus/bap_primus_linker.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
open Format
diff --git a/lib/bap_primus/bap_primus_linker.mli b/lib/bap_primus/bap_primus_linker.mli
index 10bbe7ee9..5dde01e2d 100644
--- a/lib/bap_primus/bap_primus_linker.mli
+++ b/lib/bap_primus/bap_primus_linker.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
open Bap_primus_types
diff --git a/lib/bap_primus/bap_primus_lisp.ml b/lib/bap_primus/bap_primus_lisp.ml
index 3ad110080..60460db4f 100644
--- a/lib/bap_primus/bap_primus_lisp.ml
+++ b/lib/bap_primus/bap_primus_lisp.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Format
diff --git a/lib/bap_primus/bap_primus_lisp.mli b/lib/bap_primus/bap_primus_lisp.mli
index e7ec4cc63..c637bdd6c 100644
--- a/lib/bap_primus/bap_primus_lisp.mli
+++ b/lib/bap_primus/bap_primus_lisp.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
open Bap_primus_types
diff --git a/lib/bap_primus/bap_primus_lisp_attribute.ml b/lib/bap_primus/bap_primus_lisp_attribute.ml
index f687f87f9..9d744239f 100644
--- a/lib/bap_primus/bap_primus_lisp_attribute.ml
+++ b/lib/bap_primus/bap_primus_lisp_attribute.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
diff --git a/lib/bap_primus/bap_primus_lisp_attributes.ml b/lib/bap_primus/bap_primus_lisp_attributes.ml
index 0f2f6c496..5ddd88019 100644
--- a/lib/bap_primus/bap_primus_lisp_attributes.ml
+++ b/lib/bap_primus/bap_primus_lisp_attributes.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap.Std
diff --git a/lib/bap_primus/bap_primus_lisp_attributes.mli b/lib/bap_primus/bap_primus_lisp_attributes.mli
index 340e86a51..2d221350a 100644
--- a/lib/bap_primus/bap_primus_lisp_attributes.mli
+++ b/lib/bap_primus/bap_primus_lisp_attributes.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_primus_lisp_types
diff --git a/lib/bap_primus/bap_primus_lisp_context.ml b/lib/bap_primus/bap_primus_lisp_context.ml
index d284dcc5e..d7b14bab3 100644
--- a/lib/bap_primus/bap_primus_lisp_context.ml
+++ b/lib/bap_primus/bap_primus_lisp_context.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
diff --git a/lib/bap_primus/bap_primus_lisp_context.mli b/lib/bap_primus/bap_primus_lisp_context.mli
index 18876c91b..984ff0e32 100644
--- a/lib/bap_primus/bap_primus_lisp_context.mli
+++ b/lib/bap_primus/bap_primus_lisp_context.mli
@@ -234,7 +234,7 @@
that we can use a much more concrete (call-the-advised)).
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
diff --git a/lib/bap_primus/bap_primus_lisp_def.ml b/lib/bap_primus/bap_primus_lisp_def.ml
index ee2be41fc..1f086cd7d 100644
--- a/lib/bap_primus/bap_primus_lisp_def.ml
+++ b/lib/bap_primus/bap_primus_lisp_def.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Format
diff --git a/lib/bap_primus/bap_primus_lisp_index.ml b/lib/bap_primus/bap_primus_lisp_index.ml
index d1d8e9400..0eea90537 100644
--- a/lib/bap_primus/bap_primus_lisp_index.ml
+++ b/lib/bap_primus/bap_primus_lisp_index.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module type S = sig
type t [@@deriving sexp_of]
diff --git a/lib/bap_primus/bap_primus_lisp_index.mli b/lib/bap_primus/bap_primus_lisp_index.mli
index 5072291c2..da60a61e7 100644
--- a/lib/bap_primus/bap_primus_lisp_index.mli
+++ b/lib/bap_primus/bap_primus_lisp_index.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type ('a,'i,'e) interned = {
data : 'a;
diff --git a/lib/bap_primus/bap_primus_lisp_loc.ml b/lib/bap_primus/bap_primus_lisp_loc.ml
index f21169635..fa8abab1c 100644
--- a/lib/bap_primus/bap_primus_lisp_loc.ml
+++ b/lib/bap_primus/bap_primus_lisp_loc.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
type range = Parsexp.Positions.range [@@deriving compare, sexp_of]
diff --git a/lib/bap_primus/bap_primus_lisp_loc.mli b/lib/bap_primus/bap_primus_lisp_loc.mli
index 307d48048..b432cfa78 100644
--- a/lib/bap_primus/bap_primus_lisp_loc.mli
+++ b/lib/bap_primus/bap_primus_lisp_loc.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
(* a region in a file *)
type range = Parsexp.Positions.range [@@deriving sexp_of]
diff --git a/lib/bap_primus/bap_primus_lisp_parse.ml b/lib/bap_primus/bap_primus_lisp_parse.ml
index 7122847be..892394d73 100644
--- a/lib/bap_primus/bap_primus_lisp_parse.ml
+++ b/lib/bap_primus/bap_primus_lisp_parse.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
open Bap_core_theory
@@ -126,7 +126,7 @@ module Parse = struct
fail (Illegal_escape c) off in
let nil = `Lit [] in
let str cs = String.of_char_list (List.rev cs) in
- let push_nothing = ident in
+ let push_nothing = Fn.id in
let push s xs = s :: xs in
let push_lit s = push (Lit s) in
let push_pos x = push (Pos (Int.of_string (Char.to_string x))) in
@@ -291,7 +291,7 @@ module Parse = struct
loop xs []
let reader = function
- | None -> ident
+ | None -> Fn.id
| Some {data=Atom ":ascii"} -> ascii
| Some {data=Atom ":hex"} -> hex
| Some here -> fail Unknown_subst_syntax here
diff --git a/lib/bap_primus/bap_primus_lisp_program.ml b/lib/bap_primus/bap_primus_lisp_program.ml
index 3d3d754b7..71f0b1731 100644
--- a/lib/bap_primus/bap_primus_lisp_program.ml
+++ b/lib/bap_primus/bap_primus_lisp_program.ml
@@ -1,6 +1,6 @@
open Bap.Std
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Graphlib.Std
open Regular.Std
open Monads.Std
@@ -437,13 +437,13 @@ module Callgraph = struct
G.Edge.insert (edge def.id id) g))))
let connect_with_entry = function
- | Entry -> ident
+ | Entry -> Fn.id
| n ->
G.Edge.insert @@
G.Edge.create Entry n ()
let connect_with_exit = function
- | Exit -> ident
+ | Exit -> Fn.id
| n ->
G.Edge.insert @@
G.Edge.create n Exit ()
@@ -1354,7 +1354,7 @@ module Typing = struct
apply glob id name xs ++
reduce vs xs
| {data=Seq []} ->
- ident
+ Fn.id
| {data=Seq xs; id} ->
Gamma.unify (last xs) id ++
reduce vs xs
@@ -1370,10 +1370,10 @@ module Typing = struct
| {data=Msg (_,xs); id} ->
Gamma.constr id (Type 1) ++
reduce vs xs
- | {data=Err _} -> ident
- | {data=App (Static _,_)} -> ident
+ | {data=Err _} -> Fn.id
+ | {data=App (Static _,_)} -> Fn.id
and reduce vs = function
- | [] -> ident
+ | [] -> Fn.id
| x :: xs -> infer vs x ++ reduce vs xs in
infer bindings ast
diff --git a/lib/bap_primus/bap_primus_lisp_resolve.ml b/lib/bap_primus/bap_primus_lisp_resolve.ml
index 7dacfc69e..55c52b87a 100644
--- a/lib/bap_primus/bap_primus_lisp_resolve.ml
+++ b/lib/bap_primus/bap_primus_lisp_resolve.ml
@@ -1,5 +1,5 @@
open Bap.Std
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Format
open Bap_primus_lisp_types
@@ -163,7 +163,7 @@ let run choose overload prog item name =
Program.in_package (KB.Name.package name) prog @@ fun prog ->
let stage3,stage4 = if is_unique choose
then stage3,stage4
- else ident,ident in
+ else Fn.id,Fn.id in
let name = KB.Name.unqualified name in
let ctxts = Program.context prog in
let defs = Program.get ~name prog item in
diff --git a/lib/bap_primus/bap_primus_lisp_semantics.ml b/lib/bap_primus/bap_primus_lisp_semantics.ml
index 02ef204cf..cd67467e9 100644
--- a/lib/bap_primus/bap_primus_lisp_semantics.ml
+++ b/lib/bap_primus/bap_primus_lisp_semantics.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_core_theory
open Monads.Std
diff --git a/lib/bap_primus/bap_primus_lisp_semantics.mli b/lib/bap_primus/bap_primus_lisp_semantics.mli
index 4d5eb5fc7..4273f937e 100644
--- a/lib/bap_primus/bap_primus_lisp_semantics.mli
+++ b/lib/bap_primus/bap_primus_lisp_semantics.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_primus_lisp_types
diff --git a/lib/bap_primus/bap_primus_lisp_source.ml b/lib/bap_primus/bap_primus_lisp_source.ml
index e4123ac94..9348466fc 100644
--- a/lib/bap_primus/bap_primus_lisp_source.ml
+++ b/lib/bap_primus/bap_primus_lisp_source.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
module Cst = Parsexp.Cst
diff --git a/lib/bap_primus/bap_primus_lisp_type.ml b/lib/bap_primus/bap_primus_lisp_type.ml
index 4e5a309ca..8a6d15b45 100644
--- a/lib/bap_primus/bap_primus_lisp_type.ml
+++ b/lib/bap_primus/bap_primus_lisp_type.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus_lisp_types
diff --git a/lib/bap_primus/bap_primus_lisp_type.mli b/lib/bap_primus/bap_primus_lisp_type.mli
index 74f8cafd1..4adf4f551 100644
--- a/lib/bap_primus/bap_primus_lisp_type.mli
+++ b/lib/bap_primus/bap_primus_lisp_type.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus_lisp_types
diff --git a/lib/bap_primus/bap_primus_lisp_types.ml b/lib/bap_primus/bap_primus_lisp_types.ml
index b23262430..8c3925ebf 100644
--- a/lib/bap_primus/bap_primus_lisp_types.ml
+++ b/lib/bap_primus/bap_primus_lisp_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus_sexp
open Bap_core_theory
diff --git a/lib/bap_primus/bap_primus_lisp_var.ml b/lib/bap_primus/bap_primus_lisp_var.ml
index 62d6a1490..d02b13b04 100644
--- a/lib/bap_primus/bap_primus_lisp_var.ml
+++ b/lib/bap_primus/bap_primus_lisp_var.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_primus_lisp_types
diff --git a/lib/bap_primus/bap_primus_lisp_var.mli b/lib/bap_primus/bap_primus_lisp_var.mli
index 39d5ddfad..a63be3798 100644
--- a/lib/bap_primus/bap_primus_lisp_var.mli
+++ b/lib/bap_primus/bap_primus_lisp_var.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_primus_lisp_types
diff --git a/lib/bap_primus/bap_primus_lisp_word.ml b/lib/bap_primus/bap_primus_lisp_word.ml
index 51e611fdc..cca27ab45 100644
--- a/lib/bap_primus/bap_primus_lisp_word.ml
+++ b/lib/bap_primus/bap_primus_lisp_word.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_primus_lisp_types
module Type = Bap_primus_lisp_type
diff --git a/lib/bap_primus/bap_primus_lisp_word.mli b/lib/bap_primus/bap_primus_lisp_word.mli
index 0aa982dac..b7078ec34 100644
--- a/lib/bap_primus/bap_primus_lisp_word.mli
+++ b/lib/bap_primus/bap_primus_lisp_word.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_primus_lisp_types
type t = word [@@deriving compare, sexp_of]
diff --git a/lib/bap_primus/bap_primus_machine.ml b/lib/bap_primus/bap_primus_machine.ml
index 3565abb45..b56075581 100644
--- a/lib/bap_primus/bap_primus_machine.ml
+++ b/lib/bap_primus/bap_primus_machine.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_primus_types
diff --git a/lib/bap_primus/bap_primus_machine.mli b/lib/bap_primus/bap_primus_machine.mli
index b09e3188e..fa70ebd17 100644
--- a/lib/bap_primus/bap_primus_machine.mli
+++ b/lib/bap_primus/bap_primus_machine.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_primus_types
diff --git a/lib/bap_primus/bap_primus_main.ml b/lib/bap_primus/bap_primus_main.ml
index 777ac8212..54c7c0bd4 100644
--- a/lib/bap_primus/bap_primus_main.ml
+++ b/lib/bap_primus/bap_primus_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap.Std
open Bap_primus_types
diff --git a/lib/bap_primus/bap_primus_memory.ml b/lib/bap_primus/bap_primus_memory.ml
index 17f400019..d0869a362 100644
--- a/lib/bap_primus/bap_primus_memory.ml
+++ b/lib/bap_primus/bap_primus_memory.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Format
diff --git a/lib/bap_primus/bap_primus_memory.mli b/lib/bap_primus/bap_primus_memory.mli
index 913d2dd33..9affc1a58 100644
--- a/lib/bap_primus/bap_primus_memory.mli
+++ b/lib/bap_primus/bap_primus_memory.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus_types
diff --git a/lib/bap_primus/bap_primus_observation.ml b/lib/bap_primus/bap_primus_observation.ml
index 263f6bb0b..895654b22 100644
--- a/lib/bap_primus/bap_primus_observation.ml
+++ b/lib/bap_primus/bap_primus_observation.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_knowledge
open Bap_future.Std
@@ -36,7 +36,7 @@ let provider ?desc ?(package="primus") name =
let triggers,newtrigger = Stream.create () in
let name = Name.create ~package name in
let info = Info.create ?desc name in
- let key = Univ_map.Key.create ~name:(Name.show name) ident in
+ let key = Univ_map.Key.create ~name:(Name.show name) Fn.id in
{info; newdata; data; triggers; newtrigger; observers=0; key}
let update_provider provider ~f =
@@ -59,12 +59,12 @@ let provide ?desc ?(inspect=sexp_of_opaque) ?package name =
let inspect = Univ_map.Key.to_sexp
let name = Univ_map.Key.name
-let of_statement = ident
+let of_statement = Fn.id
module Key = struct
type 'a t = 'a Type_equal.Id.t [@@deriving sexp_of]
- let to_type_id = ident
- let type_id = ident
+ let to_type_id = Fn.id
+ let type_id = Fn.id
end
module Map = Univ_map.Make1(Key)(struct
@@ -118,7 +118,7 @@ module Make(Machine : Monad.S) = struct
let sexp = lazy (inspect key x) in
if Stream.has_subscribers p.data
then Signal.send p.newdata (Lazy.force sexp);
- apply ident x os >>= fun () ->
+ apply Fn.id x os >>= fun () ->
apply Lazy.force sexp ws
let notify os key x =
diff --git a/lib/bap_primus/bap_primus_observation.mli b/lib/bap_primus/bap_primus_observation.mli
index 87af085ea..cfe97fd82 100644
--- a/lib/bap_primus/bap_primus_observation.mli
+++ b/lib/bap_primus/bap_primus_observation.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_future.Std
diff --git a/lib/bap_primus/bap_primus_pos.ml b/lib/bap_primus/bap_primus_pos.ml
index db2c44252..4129c6e90 100644
--- a/lib/bap_primus/bap_primus_pos.ml
+++ b/lib/bap_primus/bap_primus_pos.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module Exn = Bap_primus_exn
diff --git a/lib/bap_primus/bap_primus_pos.mli b/lib/bap_primus/bap_primus_pos.mli
index fcab34078..f27d2c9b0 100644
--- a/lib/bap_primus/bap_primus_pos.mli
+++ b/lib/bap_primus/bap_primus_pos.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
diff --git a/lib/bap_primus/bap_primus_random.ml b/lib/bap_primus/bap_primus_random.ml
index 9a90dffe5..8401dfee1 100644
--- a/lib/bap_primus/bap_primus_random.ml
+++ b/lib/bap_primus/bap_primus_random.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Iterator = Bap_primus_iterator
module type S = Iterator.Infinite.S
diff --git a/lib/bap_primus/bap_primus_sexp.ml b/lib/bap_primus/bap_primus_sexp.ml
index 5d7883b51..58a3e5af3 100644
--- a/lib/bap_primus/bap_primus_sexp.ml
+++ b/lib/bap_primus/bap_primus_sexp.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
diff --git a/lib/bap_primus/bap_primus_state.ml b/lib/bap_primus/bap_primus_state.ml
index 478e697a3..1e235f67b 100644
--- a/lib/bap_primus/bap_primus_state.ml
+++ b/lib/bap_primus/bap_primus_state.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module Dict = Univ_map
diff --git a/lib/bap_primus/bap_primus_state.mli b/lib/bap_primus/bap_primus_state.mli
index 589a433db..c2f32b951 100644
--- a/lib/bap_primus/bap_primus_state.mli
+++ b/lib/bap_primus/bap_primus_state.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
type 'a t
diff --git a/lib/bap_primus/bap_primus_system.ml b/lib/bap_primus/bap_primus_system.ml
index 0c052ac6b..f4a8b6a66 100644
--- a/lib/bap_primus/bap_primus_system.ml
+++ b/lib/bap_primus/bap_primus_system.ml
@@ -1,7 +1,7 @@
open Bap.Std
open Bap_primus_types
open Bap_knowledge
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Name = Knowledge.Name
module Info = Bap_primus_info
diff --git a/lib/bap_primus/bap_primus_types.ml b/lib/bap_primus/bap_primus_types.ml
index 7995fb063..0b566ce47 100644
--- a/lib/bap_primus/bap_primus_types.ml
+++ b/lib/bap_primus/bap_primus_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
diff --git a/lib/bap_primus/bap_primus_value.ml b/lib/bap_primus/bap_primus_value.ml
index fda7d3722..70b70600a 100644
--- a/lib/bap_primus/bap_primus_value.ml
+++ b/lib/bap_primus/bap_primus_value.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Bap_strings.Std
diff --git a/lib/bap_primus/bap_primus_value.mli b/lib/bap_primus/bap_primus_value.mli
index dca4029cc..bad86a696 100644
--- a/lib/bap_primus/bap_primus_value.mli
+++ b/lib/bap_primus/bap_primus_value.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Bap_strings.Std
diff --git a/lib/bap_primus_machine/bap_primus_machine.ml b/lib/bap_primus_machine/bap_primus_machine.ml
index cb767aa1f..f4b300176 100644
--- a/lib/bap_primus_machine/bap_primus_machine.ml
+++ b/lib/bap_primus_machine/bap_primus_machine.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_knowledge
diff --git a/lib/bap_primus_machine/bap_primus_machine.mli b/lib/bap_primus_machine/bap_primus_machine.mli
index d22a40e1a..c0e39ccaf 100644
--- a/lib/bap_primus_machine/bap_primus_machine.mli
+++ b/lib/bap_primus_machine/bap_primus_machine.mli
@@ -1,6 +1,6 @@
(* Not yet released.
- open Core_kernel
+ open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_knowledge
diff --git a/lib/bap_primus_track_visited/bap_primus_track_visited.ml b/lib/bap_primus_track_visited/bap_primus_track_visited.ml
index 1749085b9..9e2264aa1 100644
--- a/lib/bap_primus_track_visited/bap_primus_track_visited.ml
+++ b/lib/bap_primus_track_visited/bap_primus_track_visited.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
diff --git a/lib/bap_riscv/bap_riscv_target.ml b/lib/bap_riscv/bap_riscv_target.ml
index 9ed9ef100..920255c5b 100644
--- a/lib/bap_riscv/bap_riscv_target.ml
+++ b/lib/bap_riscv/bap_riscv_target.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
let package = "bap"
diff --git a/lib/bap_sema/bap_sema.ml b/lib/bap_sema/bap_sema.ml
index f13cc8858..2c174dd56 100644
--- a/lib/bap_sema/bap_sema.ml
+++ b/lib/bap_sema/bap_sema.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Graphlib.Std
open Bap_disasm_std
diff --git a/lib/bap_sema/bap_sema_flatten.ml b/lib/bap_sema/bap_sema_flatten.ml
index 1db263af2..61ae19737 100644
--- a/lib/bap_sema/bap_sema_flatten.ml
+++ b/lib/bap_sema/bap_sema_flatten.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_ir
diff --git a/lib/bap_sema/bap_sema_free_vars.ml b/lib/bap_sema/bap_sema_free_vars.ml
index 6e157491a..a391c49fe 100644
--- a/lib/bap_sema/bap_sema_free_vars.ml
+++ b/lib/bap_sema/bap_sema_free_vars.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Graphlib.Std
open Bap_ir
diff --git a/lib/bap_sema/bap_sema_lift.ml b/lib/bap_sema/bap_sema_lift.ml
index 5c489734e..8f5074fdc 100644
--- a/lib/bap_sema/bap_sema_lift.ml
+++ b/lib/bap_sema/bap_sema_lift.ml
@@ -1,6 +1,6 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Graphlib.Std
open Bap_image_std
diff --git a/lib/bap_sema/bap_sema_lift.mli b/lib/bap_sema/bap_sema_lift.mli
index bcbf60f1d..dfd9b6f35 100644
--- a/lib/bap_sema/bap_sema_lift.mli
+++ b/lib/bap_sema/bap_sema_lift.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Bap_image_std
open Bap_disasm_std
diff --git a/lib/bap_sema/bap_sema_ssa.ml b/lib/bap_sema/bap_sema_ssa.ml
index 7eeff4494..ba2da2441 100644
--- a/lib/bap_sema/bap_sema_ssa.ml
+++ b/lib/bap_sema/bap_sema_ssa.ml
@@ -12,7 +12,7 @@
Basically they describe the same algorithm but in different
flavors and levels of detail.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Graphlib.Std
open Format
diff --git a/lib/bap_sema/bap_sema_taint.ml b/lib/bap_sema/bap_sema_taint.ml
index 260c491cc..b393975e7 100644
--- a/lib/bap_sema/bap_sema_taint.ml
+++ b/lib/bap_sema/bap_sema_taint.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_types.Std
open Regular.Std
@@ -67,7 +67,7 @@ let ptrs : map tag = Value.Tag.register
~uuid:"ecf96df5-f706-4f95-a421-3fa9b91ad8bd"
(module Taint_map)
-let create = ident
+let create = Fn.id
let get_taints from key = match Map.find from key with
| None -> Taints.empty
diff --git a/lib/bap_strings/bap_strings_detector.ml b/lib/bap_strings/bap_strings_detector.ml
index ea05c9f47..d769e99e3 100644
--- a/lib/bap_strings/bap_strings_detector.ml
+++ b/lib/bap_strings/bap_strings_detector.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
type stage = Working | Accepted | Finished [@@deriving equal]
diff --git a/lib/bap_strings/bap_strings_detector.mli b/lib/bap_strings/bap_strings_detector.mli
index 285f7a035..876b40080 100644
--- a/lib/bap_strings/bap_strings_detector.mli
+++ b/lib/bap_strings/bap_strings_detector.mli
@@ -47,7 +47,7 @@
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
diff --git a/lib/bap_strings/bap_strings_index.ml b/lib/bap_strings/bap_strings_index.ml
index 780580993..dcc7cfb0d 100644
--- a/lib/bap_strings/bap_strings_index.ml
+++ b/lib/bap_strings/bap_strings_index.ml
@@ -1,16 +1,16 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
-module type Key = sig
+module type Key = sig
type t
val compare : t -> t -> int
- val null : t
+ val null : t
val succ : t -> t
end
-module Persistent = struct
+module Persistent = struct
module type S = sig
- type t
+ type t
type key
val empty : t
val string : t -> key -> string
@@ -18,8 +18,8 @@ module Persistent = struct
val register : t -> string -> t
val registered : t -> string -> bool
end
- module Make(Key : Key) = struct
- module Index = Map.Make(struct
+ module Make(Key : Key) = struct
+ module Index = Map.Make(struct
include Key
let sexp_of_t = sexp_of_opaque
let t_of_sexp = opaque_of_sexp
@@ -47,18 +47,17 @@ module Persistent = struct
| Some x -> x
| None -> Key.null
- let register idx str =
+ let register idx str =
if Map.mem idx.keys str then idx
- else
+ else
let key = Key.succ @@ match Map.max_elt idx.strings with
- | None -> Key.null
+ | None -> Key.null
| Some (k,_) -> k in
{
strings = Map.set idx.strings ~key ~data:str;
keys = Map.set idx.keys ~key:str ~data:key
- }
+ }
let registered {keys} str = Map.mem keys str
end
end
-
diff --git a/lib/bap_strings/bap_strings_scanner.ml b/lib/bap_strings/bap_strings_scanner.ml
index d813ffc66..a35450c15 100644
--- a/lib/bap_strings/bap_strings_scanner.ml
+++ b/lib/bap_strings/bap_strings_scanner.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Seq = Sequence
diff --git a/lib/bap_strings/bap_strings_scanner.mli b/lib/bap_strings/bap_strings_scanner.mli
index 271922248..064af06a7 100644
--- a/lib/bap_strings/bap_strings_scanner.mli
+++ b/lib/bap_strings/bap_strings_scanner.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
(** [next ~is_stop ~read off] reads characters starting with the
diff --git a/lib/bap_strings/bap_strings_unscrambler.ml b/lib/bap_strings/bap_strings_unscrambler.ml
index 42a9da1c8..5aefed61a 100644
--- a/lib/bap_strings/bap_strings_unscrambler.ml
+++ b/lib/bap_strings/bap_strings_unscrambler.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
module type Alphabet = sig
diff --git a/lib/bap_strings/bap_strings_unscrambler.mli b/lib/bap_strings/bap_strings_unscrambler.mli
index 408af54c4..1667019eb 100644
--- a/lib/bap_strings/bap_strings_unscrambler.mli
+++ b/lib/bap_strings/bap_strings_unscrambler.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
(** symbol encoding *)
module type Alphabet = sig
diff --git a/lib/bap_systemz/bap_systemz_target.ml b/lib/bap_systemz/bap_systemz_target.ml
index 884ca13e6..cb043712a 100644
--- a/lib/bap_systemz/bap_systemz_target.ml
+++ b/lib/bap_systemz/bap_systemz_target.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
let package = "bap"
diff --git a/lib/bap_taint/bap_taint.ml b/lib/bap_taint/bap_taint.ml
index e918f3984..6ae940897 100644
--- a/lib/bap_taint/bap_taint.ml
+++ b/lib/bap_taint/bap_taint.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
open Monads.Std
@@ -149,7 +149,7 @@ let vid = Primus.Value.id
let indirect = Rel {
field = Fields_of_tainter.indirect;
- key = ident;
+ key = Fn.id;
kind = Indirect;
}
let direct = Rel {
diff --git a/lib/bap_taint/bap_taint.mli b/lib/bap_taint/bap_taint.mli
index 4f6d735c1..9ffc6533f 100644
--- a/lib/bap_taint/bap_taint.mli
+++ b/lib/bap_taint/bap_taint.mli
@@ -55,7 +55,7 @@
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
diff --git a/lib/bap_traces/bap_trace.ml b/lib/bap_traces/bap_trace.ml
index 91c592a1f..98eab0690 100644
--- a/lib/bap_traces/bap_trace.ml
+++ b/lib/bap_traces/bap_trace.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Result.Monad_infix
open Bap.Std
diff --git a/lib/bap_traces/bap_trace.mli b/lib/bap_traces/bap_trace.mli
index 7a0754c3c..6aacd444d 100644
--- a/lib/bap_traces/bap_trace.mli
+++ b/lib/bap_traces/bap_trace.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
diff --git a/lib/bap_traces/bap_trace_binprot.ml b/lib/bap_traces/bap_trace_binprot.ml
index 7d21d4832..d45a309cf 100644
--- a/lib/bap_traces/bap_trace_binprot.ml
+++ b/lib/bap_traces/bap_trace_binprot.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Result.Monad_infix
diff --git a/lib/bap_traces/bap_trace_event_types.ml b/lib/bap_traces/bap_trace_event_types.ml
index 3ae393e22..ad0fcaacc 100644
--- a/lib/bap_traces/bap_trace_event_types.ml
+++ b/lib/bap_traces/bap_trace_event_types.ml
@@ -1,5 +1,5 @@
open Bap.Std
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_core_theory
diff --git a/lib/bap_traces/bap_trace_events.ml b/lib/bap_traces/bap_trace_events.ml
index 6971e7cbf..a01493205 100644
--- a/lib/bap_traces/bap_trace_events.ml
+++ b/lib/bap_traces/bap_trace_events.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Bap_trace_event_types
diff --git a/lib/bap_traces/bap_trace_id.ml b/lib/bap_traces/bap_trace_id.ml
index 5d90b02f3..d66758c21 100644
--- a/lib/bap_traces/bap_trace_id.ml
+++ b/lib/bap_traces/bap_trace_id.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
@@ -33,7 +33,7 @@ include Regular.Make(struct
let module_name = None
let version = "1.0.0"
- let pp ppf t = Uuidm.print ppf t
+ let pp ppf t = Uuidm.print ppf t[@@warning "-D"]
end)
let of_string = Stringable.of_string
diff --git a/lib/bap_traces/bap_trace_id.mli b/lib/bap_traces/bap_trace_id.mli
index d1cfa5045..bc7283dd1 100644
--- a/lib/bap_traces/bap_trace_id.mli
+++ b/lib/bap_traces/bap_trace_id.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
diff --git a/lib/bap_traces/bap_trace_meta.ml b/lib/bap_traces/bap_trace_meta.ml
index e027b8ee8..eaf58d29e 100644
--- a/lib/bap_traces/bap_trace_meta.ml
+++ b/lib/bap_traces/bap_trace_meta.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Format
diff --git a/lib/bap_traces/bap_trace_meta_types.ml b/lib/bap_traces/bap_trace_meta_types.ml
index ef73777c7..7f2a31994 100644
--- a/lib/bap_traces/bap_trace_meta_types.ml
+++ b/lib/bap_traces/bap_trace_meta_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module Tracer = struct
diff --git a/lib/bap_traces/bap_trace_traces.ml b/lib/bap_traces/bap_trace_traces.ml
index 6e2524fd2..78189876f 100644
--- a/lib/bap_traces/bap_trace_traces.ml
+++ b/lib/bap_traces/bap_trace_traces.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Trace = Bap_trace
diff --git a/lib/bap_traces/bap_trace_traces.mli b/lib/bap_traces/bap_trace_traces.mli
index f113eaa2f..acdf31752 100644
--- a/lib/bap_traces/bap_trace_traces.mli
+++ b/lib/bap_traces/bap_trace_traces.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
val to_list : unit -> Bap_trace.t list
val enum : unit -> Bap_trace.t Sequence.t
val add : Bap_trace.t -> unit
diff --git a/lib/bap_traces/bap_traces.mli b/lib/bap_traces/bap_traces.mli
index 9a6e3763d..947506a7f 100644
--- a/lib/bap_traces/bap_traces.mli
+++ b/lib/bap_traces/bap_traces.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Bap_knowledge
diff --git a/lib/bap_types/bap_addr.ml b/lib/bap_types/bap_addr.ml
index f274a13b3..1f3216196 100644
--- a/lib/bap_types/bap_addr.ml
+++ b/lib/bap_types/bap_addr.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_addr.mli b/lib/bap_types/bap_addr.mli
index b1e307005..6f1939db4 100644
--- a/lib/bap_types/bap_addr.mli
+++ b/lib/bap_types/bap_addr.mli
@@ -8,7 +8,7 @@
representation of an address.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_common
val memref : ?disp:int -> ?index:int -> ?scale:size -> addr -> addr
diff --git a/lib/bap_types/bap_arch.ml b/lib/bap_types/bap_arch.ml
index 33b3d4a9e..2f846770f 100644
--- a/lib/bap_types/bap_arch.ml
+++ b/lib/bap_types/bap_arch.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_arch.mli b/lib/bap_types/bap_arch.mli
index e3b749a60..3395de5ca 100644
--- a/lib/bap_types/bap_arch.mli
+++ b/lib/bap_types/bap_arch.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_attributes.ml b/lib/bap_types/bap_attributes.ml
index cf35022fb..9600160d4 100644
--- a/lib/bap_types/bap_attributes.ml
+++ b/lib/bap_types/bap_attributes.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_value.Tag
diff --git a/lib/bap_types/bap_bil.ml b/lib/bap_types/bap_bil.ml
index fb4d378ef..e0d1c5f6a 100644
--- a/lib/bap_types/bap_bil.ml
+++ b/lib/bap_types/bap_bil.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_bil_adt.ml b/lib/bap_types/bap_bil_adt.ml
index 072517708..b286d7bea 100644
--- a/lib/bap_types/bap_bil_adt.ml
+++ b/lib/bap_types/bap_bil_adt.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_common
open Bap_bil
diff --git a/lib/bap_types/bap_bil_adt.mli b/lib/bap_types/bap_bil_adt.mli
index 8271a66b5..73a7b92f3 100644
--- a/lib/bap_types/bap_bil_adt.mli
+++ b/lib/bap_types/bap_bil_adt.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_common
open Bap_bil
open Format
diff --git a/lib/bap_types/bap_bil_optimizations.ml b/lib/bap_types/bap_bil_optimizations.ml
index 1bfc7cecc..b0a6f25e9 100644
--- a/lib/bap_types/bap_bil_optimizations.ml
+++ b/lib/bap_types/bap_bil_optimizations.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_common
open Bap_bil
diff --git a/lib/bap_types/bap_bil_pass.ml b/lib/bap_types/bap_bil_pass.ml
index f48800d23..6aafb8e3b 100644
--- a/lib/bap_types/bap_bil_pass.ml
+++ b/lib/bap_types/bap_bil_pass.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_bil
diff --git a/lib/bap_types/bap_bili.ml b/lib/bap_types/bap_bili.ml
index b66f69dee..447748c89 100644
--- a/lib/bap_types/bap_bili.ml
+++ b/lib/bap_types/bap_bili.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_common
open Bap_bil
diff --git a/lib/bap_types/bap_biri.ml b/lib/bap_types/bap_biri.ml
index 3e469cb46..b5397ed92 100644
--- a/lib/bap_types/bap_biri.ml
+++ b/lib/bap_types/bap_biri.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_common
open Bap_bil
diff --git a/lib/bap_types/bap_biri.mli b/lib/bap_types/bap_biri.mli
index daa13077a..80183b341 100644
--- a/lib/bap_types/bap_biri.mli
+++ b/lib/bap_types/bap_biri.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_result
open Bap_ir
diff --git a/lib/bap_types/bap_bitvector.ml b/lib/bap_types/bap_bitvector.ml
index 3f1915b49..8f5b7a179 100644
--- a/lib/bap_types/bap_bitvector.ml
+++ b/lib/bap_types/bap_bitvector.ml
@@ -1,5 +1,5 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Or_error
open Format
diff --git a/lib/bap_types/bap_bitvector.mli b/lib/bap_types/bap_bitvector.mli
index 70fa8ed3f..27a9089f1 100644
--- a/lib/bap_types/bap_bitvector.mli
+++ b/lib/bap_types/bap_bitvector.mli
@@ -1,5 +1,5 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Format
diff --git a/lib/bap_types/bap_common.ml b/lib/bap_types/bap_common.ml
index 37e1c9338..20e61a5c6 100644
--- a/lib/bap_types/bap_common.ml
+++ b/lib/bap_types/bap_common.ml
@@ -3,7 +3,7 @@
In this module basic types are defined, and it can be considered
as an internal [Std] module, that should be included most modules,
internal to the library. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
(** {2 Basic modules}
diff --git a/lib/bap_types/bap_context.ml b/lib/bap_types/bap_context.ml
index a1c214f44..cfa90e2c1 100644
--- a/lib/bap_types/bap_context.ml
+++ b/lib/bap_types/bap_context.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_result
open Bap_common
open Bap_bil
diff --git a/lib/bap_types/bap_context.mli b/lib/bap_types/bap_context.mli
index ab751d192..f445d2853 100644
--- a/lib/bap_types/bap_context.mli
+++ b/lib/bap_types/bap_context.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_result
open Bap_common
open Bap_bil
diff --git a/lib/bap_types/bap_core_theory_bil_parser.ml b/lib/bap_types/bap_core_theory_bil_parser.ml
index f5c64dd62..35980b233 100644
--- a/lib/bap_types/bap_core_theory_bil_parser.ml
+++ b/lib/bap_types/bap_core_theory_bil_parser.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Theory.Parser
diff --git a/lib/bap_types/bap_eval.ml b/lib/bap_types/bap_eval.ml
index 8d351a6c9..24141153f 100644
--- a/lib/bap_types/bap_eval.ml
+++ b/lib/bap_types/bap_eval.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_eval_types.ml b/lib/bap_types/bap_eval_types.ml
index 32360fb15..db4b95f40 100644
--- a/lib/bap_types/bap_eval_types.ml
+++ b/lib/bap_types/bap_eval_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_common
open Bap_result
diff --git a/lib/bap_types/bap_exp.ml b/lib/bap_types/bap_exp.ml
index 556a1f516..4a44c0956 100644
--- a/lib/bap_types/bap_exp.ml
+++ b/lib/bap_types/bap_exp.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_knowledge
open Bap_core_theory
diff --git a/lib/bap_types/bap_exp.mli b/lib/bap_types/bap_exp.mli
index 714be52d7..505350400 100644
--- a/lib/bap_types/bap_exp.mli
+++ b/lib/bap_types/bap_exp.mli
@@ -1,5 +1,5 @@
(** Extends [exp] interface. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_knowledge
diff --git a/lib/bap_types/bap_expi.ml b/lib/bap_types/bap_expi.ml
index 4c8ea7217..84b2787bd 100644
--- a/lib/bap_types/bap_expi.ml
+++ b/lib/bap_types/bap_expi.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_result
open Bap_expi_types
diff --git a/lib/bap_types/bap_expi.mli b/lib/bap_types/bap_expi.mli
index a90e10a5b..21ef7f339 100644
--- a/lib/bap_types/bap_expi.mli
+++ b/lib/bap_types/bap_expi.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_common
open Bap_bil
diff --git a/lib/bap_types/bap_expi_types.ml b/lib/bap_types/bap_expi_types.ml
index 47c40c7b1..3ad8c29cd 100644
--- a/lib/bap_types/bap_expi_types.ml
+++ b/lib/bap_types/bap_expi_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_result
open Bap_common
open Bap_bil
diff --git a/lib/bap_types/bap_helpers.ml b/lib/bap_types/bap_helpers.ml
index e544ac202..9bff631f5 100644
--- a/lib/bap_types/bap_helpers.ml
+++ b/lib/bap_types/bap_helpers.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_common
open Bap_bil
@@ -1107,7 +1107,7 @@ module Normalize = struct
end) bil
let bil ?normalize_exp:(ne=false) xs =
- let normalize_exp = if ne then normalize_exp else ident in
+ let normalize_exp = if ne then normalize_exp else Fn.id in
let rec run xs =
List.concat_map ~f:hoist_non_generative_expressions xs |>
normalize_conditionals |>
diff --git a/lib/bap_types/bap_helpers.mli b/lib/bap_types/bap_helpers.mli
index 7dce02df4..d424a3090 100644
--- a/lib/bap_types/bap_helpers.mli
+++ b/lib/bap_types/bap_helpers.mli
@@ -1,5 +1,5 @@
(** BIL high level functions. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_common
open Bap_bil
open Bap_visitor
diff --git a/lib/bap_types/bap_int_conversions.ml b/lib/bap_types/bap_int_conversions.ml
index 8a1a78625..bd97fb27b 100644
--- a/lib/bap_types/bap_int_conversions.ml
+++ b/lib/bap_types/bap_int_conversions.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Or_error
diff --git a/lib/bap_types/bap_int_conversions.mli b/lib/bap_types/bap_int_conversions.mli
index ca64b8248..003203b7b 100644
--- a/lib/bap_types/bap_int_conversions.mli
+++ b/lib/bap_types/bap_int_conversions.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
val int_of_int32 : int32 -> int Or_error.t
val int_of_int64 : int64 -> int Or_error.t
diff --git a/lib/bap_types/bap_integer.ml b/lib/bap_types/bap_integer.ml
index 7082ecd22..52cde0c6d 100644
--- a/lib/bap_types/bap_integer.ml
+++ b/lib/bap_types/bap_integer.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_integer_intf
module type Base = Base
diff --git a/lib/bap_types/bap_interval_tree.ml b/lib/bap_types/bap_interval_tree.ml
index 29a8a969e..26f902bb2 100644
--- a/lib/bap_types/bap_interval_tree.ml
+++ b/lib/bap_types/bap_interval_tree.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Option.Monad_infix
module Seq = Sequence
diff --git a/lib/bap_types/bap_interval_tree.mli b/lib/bap_types/bap_interval_tree.mli
index b2a6ff4f2..3c9c94126 100644
--- a/lib/bap_types/bap_interval_tree.mli
+++ b/lib/bap_types/bap_interval_tree.mli
@@ -1,6 +1,6 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
-module type Interval = sig
+module type Interval = sig
type t [@@deriving compare, sexp_of]
type point [@@deriving compare, sexp_of]
val lower : t -> point
@@ -36,10 +36,10 @@ module type S = sig
val remove_dominators : 'a t -> key -> 'a t
val to_sequence : 'a t -> (key * 'a) Sequence.t
include Container.S1 with type 'a t := 'a t
-end
+end
-module Make(Interval : Interval) : S
- with type key := Interval.t
+module Make(Interval : Interval) : S
+ with type key := Interval.t
and type point := Interval.point
module type Interval_binable = sig
diff --git a/lib/bap_types/bap_ir.ml b/lib/bap_types/bap_ir.ml
index 34abcb869..5baab24a7 100644
--- a/lib/bap_types/bap_ir.ml
+++ b/lib/bap_types/bap_ir.ml
@@ -1,6 +1,6 @@
let package = "bap"
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_common
@@ -545,7 +545,7 @@ module Label = struct
let direct x = Direct x
let indirect x = Indirect x
let create () = direct (Tid.create ())
- let change ?(direct=ident) ?(indirect=ident) label =
+ let change ?(direct=Fn.id) ?(indirect=Fn.id) label =
match label with
| Direct x -> Direct (direct x)
| Indirect x -> Indirect (indirect x)
@@ -1328,13 +1328,13 @@ module Term = struct
type 'a map = 'a term -> 'a term
let map_term (type t) (cls : (_,t) cls)
- ?(program : program map = ident)
- ?(sub : sub map = ident)
- ?(arg : arg map = ident)
- ?(blk : blk map = ident)
- ?(phi : phi map = ident)
- ?(def : def map = ident)
- ?(jmp : jmp map = ident)
+ ?(program : program map = Fn.id)
+ ?(sub : sub map = Fn.id)
+ ?(arg : arg map = Fn.id)
+ ?(blk : blk map = Fn.id)
+ ?(phi : phi map = Fn.id)
+ ?(def : def map = Fn.id)
+ ?(jmp : jmp map = Fn.id)
(t : t term) : t term = match cls.typ with
| Nil -> assert false
| Top -> program t
diff --git a/lib/bap_types/bap_ir.mli b/lib/bap_types/bap_ir.mli
index 9260e9132..a9f67f8c5 100644
--- a/lib/bap_types/bap_ir.mli
+++ b/lib/bap_types/bap_ir.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_core_theory
open Bap_common
diff --git a/lib/bap_types/bap_ir_callgraph.ml b/lib/bap_types/bap_ir_callgraph.ml
index 6f48d31f7..eacfda552 100644
--- a/lib/bap_types/bap_ir_callgraph.ml
+++ b/lib/bap_types/bap_ir_callgraph.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Graphlib.Std
open Bap_ir
diff --git a/lib/bap_types/bap_ir_graph.ml b/lib/bap_types/bap_ir_graph.ml
index bb47add71..5d6be98e8 100644
--- a/lib/bap_types/bap_ir_graph.ml
+++ b/lib/bap_types/bap_ir_graph.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Graphlib.Std
open Option.Monad_infix
@@ -119,9 +119,9 @@ module Node = struct
type t = node
type nonrec edge = edge
- let create = ident
+ let create = Fn.id
- let label = ident
+ let label = Fn.id
let mem blk t = Map.mem t.preds (Term.tid blk)
diff --git a/lib/bap_types/bap_ir_graph.mli b/lib/bap_types/bap_ir_graph.mli
index 46f8ef0c7..9512786b0 100644
--- a/lib/bap_types/bap_ir_graph.mli
+++ b/lib/bap_types/bap_ir_graph.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Graphlib.Std
open Bap_common
diff --git a/lib/bap_types/bap_monad.ml b/lib/bap_types/bap_monad.ml
index 631865338..13d2f88c4 100644
--- a/lib/bap_types/bap_monad.ml
+++ b/lib/bap_types/bap_monad.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Legacy = struct
include Bap_monad_types
diff --git a/lib/bap_types/bap_monad.mli b/lib/bap_types/bap_monad.mli
index c45d6f165..24bde22c7 100644
--- a/lib/bap_types/bap_monad.mli
+++ b/lib/bap_types/bap_monad.mli
@@ -1,6 +1,6 @@
[@@@deprecated "[since 2017-04] use new monads library instead"]
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_monad_types
module type Basic = Monad.Basic
diff --git a/lib/bap_types/bap_monad_types.ml b/lib/bap_types/bap_monad_types.ml
index b5d588269..50759d4cd 100644
--- a/lib/bap_types/bap_monad_types.ml
+++ b/lib/bap_types/bap_monad_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module type State = sig
type ('a,'s) t
diff --git a/lib/bap_types/bap_ogre.ml b/lib/bap_types/bap_ogre.ml
index 746e5030b..53967f240 100644
--- a/lib/bap_types/bap_ogre.ml
+++ b/lib/bap_types/bap_ogre.ml
@@ -1,6 +1,6 @@
let package = "bap"
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type t = Ogre.Doc.t [@@deriving compare]
diff --git a/lib/bap_types/bap_ogre.mli b/lib/bap_types/bap_ogre.mli
index 50731be81..6e94c3dcb 100644
--- a/lib/bap_types/bap_ogre.mli
+++ b/lib/bap_types/bap_ogre.mli
@@ -1,5 +1,5 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type t = Ogre.doc [@@deriving bin_io, compare, sexp]
val pp : Format.formatter -> t -> unit
diff --git a/lib/bap_types/bap_result.ml b/lib/bap_types/bap_result.ml
index 920dd5baf..ccc591c44 100644
--- a/lib/bap_types/bap_result.ml
+++ b/lib/bap_types/bap_result.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_result.mli b/lib/bap_types/bap_result.mli
index a4b0549eb..606466fe2 100644
--- a/lib/bap_types/bap_result.mli
+++ b/lib/bap_types/bap_result.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_size.ml b/lib/bap_types/bap_size.ml
index 82cd11e52..ea0242708 100644
--- a/lib/bap_types/bap_size.ml
+++ b/lib/bap_types/bap_size.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Or_error
diff --git a/lib/bap_types/bap_size.mli b/lib/bap_types/bap_size.mli
index e32f463af..ce89fc5f4 100644
--- a/lib/bap_types/bap_size.mli
+++ b/lib/bap_types/bap_size.mli
@@ -1,6 +1,6 @@
(** Extends [size] type. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_stmt.ml b/lib/bap_types/bap_stmt.ml
index d6356843e..09134e12b 100644
--- a/lib/bap_types/bap_stmt.ml
+++ b/lib/bap_types/bap_stmt.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_knowledge
open Regular.Std
@@ -27,24 +27,24 @@ end
module Special = struct
let call = Attribute.declare "call"
- ~encode:ident
- ~decode:ident
+ ~encode:Fn.id
+ ~decode:Fn.id
~package:"bap"
let intrinsic = Attribute.declare "intrinsic"
- ~encode:ident
- ~decode:ident
+ ~encode:Fn.id
+ ~decode:Fn.id
~package:"bap"
let label = Attribute.declare "label"
~package:"bap"
- ~encode:ident
- ~decode:ident
+ ~encode:Fn.id
+ ~decode:Fn.id
let goto = Attribute.declare "goto"
~package:"bap"
- ~encode:ident
- ~decode:ident
+ ~encode:Fn.id
+ ~decode:Fn.id
let prefix = "@attribute:"
diff --git a/lib/bap_types/bap_stmt.mli b/lib/bap_types/bap_stmt.mli
index 1dc6c9d85..6f73e6bac 100644
--- a/lib/bap_types/bap_stmt.mli
+++ b/lib/bap_types/bap_stmt.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_knowledge
open Regular.Std
diff --git a/lib/bap_types/bap_tid_graph.ml b/lib/bap_types/bap_tid_graph.ml
index 7925349f1..59470e57a 100644
--- a/lib/bap_types/bap_tid_graph.ml
+++ b/lib/bap_types/bap_tid_graph.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Graphlib.Std
open Bap_ir
@@ -22,11 +22,11 @@ let start = Tid.for_name ~package:"bap" "start-pseudo-node"
let exit = Tid.for_name ~package:"bap" "exit-pseudo-node"
let connect_with_exit n =
- if Tid.equal n exit then ident
+ if Tid.equal n exit then Fn.id
else G.Edge.insert (G.Edge.create n exit exit)
let connect_with_start n =
- if Tid.equal n start then ident
+ if Tid.equal n start then Fn.id
else
G.Edge.insert @@
G.Edge.create start n start
@@ -34,7 +34,7 @@ let connect_with_start n =
let if_unreachable ~from connect g n =
if G.Node.degree ~dir:from n g = 0
then connect n
- else ident
+ else Fn.id
let create sub =
let g = of_sub sub in
diff --git a/lib/bap_types/bap_toplevel.ml b/lib/bap_types/bap_toplevel.ml
index 5974f413a..bc9968e52 100644
--- a/lib/bap_types/bap_toplevel.ml
+++ b/lib/bap_types/bap_toplevel.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Knowledge.Syntax
diff --git a/lib/bap_types/bap_trie.ml b/lib/bap_types/bap_trie.ml
index fce191ff9..bcfb6a265 100644
--- a/lib/bap_types/bap_trie.ml
+++ b/lib/bap_types/bap_trie.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Format
open Option.Monad_infix
diff --git a/lib/bap_types/bap_trie.mli b/lib/bap_types/bap_trie.mli
index 998ba3cf4..f791837f2 100644
--- a/lib/bap_types/bap_trie.mli
+++ b/lib/bap_types/bap_trie.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
open Bap_trie_intf
diff --git a/lib/bap_types/bap_type.ml b/lib/bap_types/bap_type.ml
index eaed4e631..947353aa6 100644
--- a/lib/bap_types/bap_type.ml
+++ b/lib/bap_types/bap_type.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Format
diff --git a/lib/bap_types/bap_type.mli b/lib/bap_types/bap_type.mli
index ee9d790f5..9eb89e819 100644
--- a/lib/bap_types/bap_type.mli
+++ b/lib/bap_types/bap_type.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_type_error.ml b/lib/bap_types/bap_type_error.ml
index 5c50caafc..47bd7a894 100644
--- a/lib/bap_types/bap_type_error.ml
+++ b/lib/bap_types/bap_type_error.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_type_error.mli b/lib/bap_types/bap_type_error.mli
index 80e9bbd22..25f9715bc 100644
--- a/lib/bap_types/bap_type_error.mli
+++ b/lib/bap_types/bap_type_error.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_types.ml b/lib/bap_types/bap_types.ml
index 99ad1deb4..d5ad5e1ec 100644
--- a/lib/bap_types/bap_types.ml
+++ b/lib/bap_types/bap_types.ml
@@ -5,7 +5,7 @@
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_common
open Bap_knowledge
diff --git a/lib/bap_types/bap_value.ml b/lib/bap_types/bap_value.ml
index 25ee6eda9..d865c09c9 100644
--- a/lib/bap_types/bap_value.ml
+++ b/lib/bap_types/bap_value.ml
@@ -1,5 +1,5 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Format
@@ -115,7 +115,7 @@ let typeid (Value.T (k,_)) = key_typeid k
let info typeid =
Hashtbl.find_and_call types typeid
- ~if_found:ident
+ ~if_found:Fn.id
~if_not_found:(fun typeid ->
invalid_argf "Can't deserialize type %s, \
as it is no longer known to the system"
diff --git a/lib/bap_types/bap_value.mli b/lib/bap_types/bap_value.mli
index ebb9bf18a..847ab4f2a 100644
--- a/lib/bap_types/bap_value.mli
+++ b/lib/bap_types/bap_value.mli
@@ -1,6 +1,6 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
type t [@@deriving bin_io, compare, sexp]
diff --git a/lib/bap_types/bap_var.ml b/lib/bap_types/bap_var.ml
index b84f99c5d..5ea904ddf 100644
--- a/lib/bap_types/bap_var.ml
+++ b/lib/bap_types/bap_var.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap_common
diff --git a/lib/bap_types/bap_var.mli b/lib/bap_types/bap_var.mli
index 2a387ee3c..338781dcb 100644
--- a/lib/bap_types/bap_var.mli
+++ b/lib/bap_types/bap_var.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
diff --git a/lib/bap_types/bap_vector.ml b/lib/bap_types/bap_vector.ml
index 2daa1e812..d7f459b06 100644
--- a/lib/bap_types/bap_vector.ml
+++ b/lib/bap_types/bap_vector.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Format
diff --git a/lib/bap_types/bap_vector.mli b/lib/bap_types/bap_vector.mli
index a051e0fa0..3f7b30ece 100644
--- a/lib/bap_types/bap_vector.mli
+++ b/lib/bap_types/bap_vector.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
type 'a t [@@deriving bin_io, compare, sexp]
diff --git a/lib/bap_types/bap_visitor.ml b/lib/bap_types/bap_visitor.ml
index 19b95dbfd..ec5857c4f 100644
--- a/lib/bap_types/bap_visitor.ml
+++ b/lib/bap_types/bap_visitor.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_common
open Bap_bil
diff --git a/lib/bap_types/bap_visitor.mli b/lib/bap_types/bap_visitor.mli
index 5730fa09b..0393eb77b 100644
--- a/lib/bap_types/bap_visitor.mli
+++ b/lib/bap_types/bap_visitor.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_common
open Bap_bil
diff --git a/lib/bare/bare.ml b/lib/bare/bare.ml
index 81284bcd7..2b766b062 100644
--- a/lib/bare/bare.ml
+++ b/lib/bare/bare.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
(* Algorithm description.
diff --git a/lib/bare/bare.mli b/lib/bare/bare.mli
index f173f8d3c..6e4063ac1 100644
--- a/lib/bare/bare.mli
+++ b/lib/bare/bare.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
(** Binary Analysis Rule Engine (BARE).
diff --git a/lib/beagle/beagle_prey.ml b/lib/beagle/beagle_prey.ml
index 677eaa380..866d4d315 100644
--- a/lib/beagle/beagle_prey.ml
+++ b/lib/beagle/beagle_prey.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
open Format
diff --git a/lib/beagle/beagle_prey.mli b/lib/beagle/beagle_prey.mli
index f4e4fac1e..a9dcfcacf 100644
--- a/lib/beagle/beagle_prey.mli
+++ b/lib/beagle/beagle_prey.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
diff --git a/lib/bitvec_order/bitvec_order.mli b/lib/bitvec_order/bitvec_order.mli
index 67569702f..a53a161d5 100644
--- a/lib/bitvec_order/bitvec_order.mli
+++ b/lib/bitvec_order/bitvec_order.mli
@@ -5,7 +5,7 @@
equality between two comparison functions.
Comparators are extensively used in the Janestreet's suite of
- libraries, e.g., Base, Core_kernel, Core, etc. Comparators are
+ libraries, e.g., Base, Core_kernel[@@warning "-D"], Core, etc. Comparators are
used to create sets, maps, hashtables, to instantiate interfaces,
and algorithms that require comparison.
diff --git a/lib/graphlib/graphlib.mli b/lib/graphlib/graphlib.mli
index a52b5f4b8..b8f33e4e0 100644
--- a/lib/graphlib/graphlib.mli
+++ b/lib/graphlib/graphlib.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
(**
@@ -699,7 +699,7 @@ module Std : sig
interface and has unlabeled nodes of type [Node.t] and edges
labeled with [Edge.t]
- In [Core_kernel] basically any type that is reasonable to be
+ In [Core_kernel[@@warning "-D"]] basically any type that is reasonable to be
used as a graph node, satisfies the {!Opaque.S} interface. So,
a new graph structure can be implemented directly, e.g.,
{[module G = Graphlib.Make(Int64)(Unit)]}
diff --git a/lib/graphlib/graphlib_graph.ml b/lib/graphlib/graphlib_graph.ml
index 4cbe44808..af705673e 100644
--- a/lib/graphlib/graphlib_graph.ml
+++ b/lib/graphlib/graphlib_graph.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Graphlib_intf
open Format
@@ -139,7 +139,7 @@ end
module Equiv = struct
type t = int [@@deriving bin_io, compare, sexp]
- let to_int = ident
+ let to_int = Fn.id
include Regular.Make(struct
include Int
let module_name = Some "Graphlib.Std.Equiv"
@@ -698,10 +698,10 @@ let depth_first_search
let init = match start with
| None -> ord,init
| Some s -> if G.Node.mem s g
- then visit ord s (start_tree s init) ident else ord,init in
+ then visit ord s (start_tree s init) Fn.id else ord,init in
G.nodes g |> Seq.fold ~init ~f:(fun (ord,state) u ->
match Order.number ord u with
- | None -> visit ord u (start_tree u state) ident
+ | None -> visit ord u (start_tree u state) Fn.id
| _ -> ord,state) |> snd
let depth_first_visit graph ?rev ?start g ~init vis =
@@ -833,7 +833,7 @@ let idom (type t) (type n) (type e)
let doms = Array.create ~len ~-1 in
let pnum =
Hashtbl.find_and_call pnums
- ~if_found:ident
+ ~if_found:Fn.id
~if_not_found:(fun _ -> raise Unreachable) in
if len > 0 then doms.(len - 1) <- len - 1;
with_return (fun {return} ->
@@ -1409,7 +1409,7 @@ module Fixpoint = struct
| Done approx -> make_solution iters approx
| Step (visits,works,approx) -> loop visits (iters+1) works approx
else make_solution iters approx in
- let works = List.init (Array.length nodes) ident in
+ let works = List.init (Array.length nodes) Fn.id in
let approx = Map.fold init ~init:Int.Map.empty
~f:(fun ~key:node ~data approx ->
match Map.find rnodes node with
diff --git a/lib/graphlib/graphlib_graph.mli b/lib/graphlib/graphlib_graph.mli
index b4e80a99b..8392e03f9 100644
--- a/lib/graphlib/graphlib_graph.mli
+++ b/lib/graphlib/graphlib_graph.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Graphlib_intf
open Format
diff --git a/lib/graphlib/graphlib_intf.ml b/lib/graphlib/graphlib_intf.ml
index 98fa71016..494230a94 100644
--- a/lib/graphlib/graphlib_intf.ml
+++ b/lib/graphlib/graphlib_intf.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
module type Node = sig
diff --git a/lib/graphlib/graphlib_pp.ml b/lib/graphlib/graphlib_pp.ml
index f50a7f968..501fd6ca6 100644
--- a/lib/graphlib/graphlib_pp.ml
+++ b/lib/graphlib/graphlib_pp.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Format
@@ -35,7 +35,7 @@ let next_num num : string =
let symbols = ("a",next_sym)
let numbers = ("0",next_num)
-let nothing = ("",ident)
+let nothing = ("",Fn.id)
let create_scheme ~next init = init,next
diff --git a/lib/graphlib/graphlib_pp.mli b/lib/graphlib/graphlib_pp.mli
index 007d629cb..342caada8 100644
--- a/lib/graphlib/graphlib_pp.mli
+++ b/lib/graphlib/graphlib_pp.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
type scheme
diff --git a/lib/graphlib/graphlib_regular.ml b/lib/graphlib/graphlib_regular.ml
index df4e59c5c..2c7d86c5f 100644
--- a/lib/graphlib/graphlib_regular.ml
+++ b/lib/graphlib/graphlib_regular.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Graphlib_intf
open Graphlib_regular_intf
@@ -38,8 +38,8 @@ module Make(Node : Opaque.S)(Label : T) = struct
type label = Node.t
type nonrec graph = graph
- let create = ident
- let label = ident
+ let create = Fn.id
+ let label = Fn.id
let mem n g = Map.mem g n
let adj dir n g = Map.find g n |> function
| None -> Seq.empty
diff --git a/lib/graphlib/graphlib_regular.mli b/lib/graphlib/graphlib_regular.mli
index 464e87cef..c6a200c51 100644
--- a/lib/graphlib/graphlib_regular.mli
+++ b/lib/graphlib/graphlib_regular.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Graphlib_intf
open Graphlib_graph
diff --git a/lib/knowledge/bap_knowledge.ml b/lib/knowledge/bap_knowledge.ml
index fd2482a6a..c51cd5351 100644
--- a/lib/knowledge/bap_knowledge.ml
+++ b/lib/knowledge/bap_knowledge.ml
@@ -1,4 +1,4 @@
-open Core_kernel [@@warning "-D"]
+open Core_kernel[@@warning "-D"] [@@warning "-D"]
open Monads.Std
module Unix = Caml_unix [@@warning "-49"]
@@ -2702,8 +2702,8 @@ module Knowledge = struct
include Comparator
include Binable.Of_binable(Oid)(struct
type t = a obj
- let to_binable = ident
- let of_binable = ident
+ let to_binable = Fn.id
+ let of_binable = Fn.id
end) [@@warning "-D"]
include Base.Comparable.Make_using_comparator(Comparator)
end in
diff --git a/lib/knowledge/bap_knowledge.mli b/lib/knowledge/bap_knowledge.mli
index 5d24625b4..175edb549 100644
--- a/lib/knowledge/bap_knowledge.mli
+++ b/lib/knowledge/bap_knowledge.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
diff --git a/lib/microx/microx_concretizer.ml b/lib/microx/microx_concretizer.ml
index f6f1028ea..f7d1b1a5a 100644
--- a/lib/microx/microx_concretizer.ml
+++ b/lib/microx/microx_concretizer.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
diff --git a/lib/microx/microx_conqueror.ml b/lib/microx/microx_conqueror.ml
index 46b93ecab..8bfd00a1d 100644
--- a/lib/microx/microx_conqueror.ml
+++ b/lib/microx/microx_conqueror.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
diff --git a/lib/microx/microx_conqueror.mli b/lib/microx/microx_conqueror.mli
index 0c1ec6506..cd9078767 100644
--- a/lib/microx/microx_conqueror.mli
+++ b/lib/microx/microx_conqueror.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
[@@@warning "-D"]
diff --git a/lib/monads/monads.mli b/lib/monads/monads.mli
index a5ebc7504..f5118e619 100644
--- a/lib/monads/monads.mli
+++ b/lib/monads/monads.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
(** Monad Transformer Library.
diff --git a/lib/monads/monads_monad.ml b/lib/monads/monads_monad.ml
index 062c088b6..058f111ff 100644
--- a/lib/monads/monads_monad.ml
+++ b/lib/monads/monads_monad.ml
@@ -1,4 +1,6 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
+
+let ident = Fn.id
module Monoid = Monads_monoid
module Types = Monads_types
diff --git a/lib/monads/monads_monad.mli b/lib/monads/monads_monad.mli
index 6cf4bf828..fd5dd18ac 100644
--- a/lib/monads/monads_monad.mli
+++ b/lib/monads/monads_monad.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Types = Monads_types
module Monoid = Monads_monoid
diff --git a/lib/monads/monads_monoid.ml b/lib/monads/monads_monoid.ml
index de2d9ec1b..5af2545af 100644
--- a/lib/monads/monads_monoid.ml
+++ b/lib/monads/monads_monoid.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module type Base = sig
type t
diff --git a/lib/monads/monads_monoid.mli b/lib/monads/monads_monoid.mli
index 5ce6c734a..89a65eef5 100644
--- a/lib/monads/monads_monoid.mli
+++ b/lib/monads/monads_monoid.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module type Base = sig
type t
diff --git a/lib/monads/monads_types.ml b/lib/monads/monads_types.ml
index d9ded8e85..89e670565 100644
--- a/lib/monads/monads_types.ml
+++ b/lib/monads/monads_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Monoid = Monads_monoid
diff --git a/lib/ogre/ogre.ml b/lib/ogre/ogre.ml
index 715cf1d64..f6847ff8a 100644
--- a/lib/ogre/ogre.ml
+++ b/lib/ogre/ogre.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Format
@@ -62,7 +62,7 @@ module Type = struct
let str = {
parse = atom string_of_sexp;
- pack = ident;
+ pack = Fn.id;
typ = Str;
}
@@ -845,7 +845,7 @@ module Make(B : Monad.S) = struct
(* foldm rows ~init:[] ~f:(fun xs row -> read row f >>| fun x -> x :: xs) >>| *)
(* Sequence.of_list *)
- let collect q = foreach q ~f:ident
+ let collect q = foreach q ~f:Fn.id
let require ?(that=fun _ -> true) attr : 'a t =
let name = sprintf "required attribute %s" (Attribute.name attr) in
diff --git a/lib/ogre/ogre.mli b/lib/ogre/ogre.mli
index 3758e948c..f6f159f0b 100644
--- a/lib/ogre/ogre.mli
+++ b/lib/ogre/ogre.mli
@@ -60,7 +60,7 @@
to Ogre's field.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Monads.Std
open Format
@@ -662,7 +662,7 @@ module type S = sig
the query EDSL.*)
val foreach : ('a -> 'b) query -> f:'a -> 'b seq t
- (** [collect query] is the same as [foreach query ~f:ident] *)
+ (** [collect query] is the same as [foreach query ~f:Fn.id] *)
val collect : (('a -> 'a) -> 'b) query -> 'b seq t
(** [provide attr v1 v2 ... vm] stores the constituents of an
diff --git a/lib/regular/regular.ml b/lib/regular/regular.ml
index cfdb87312..4527ce935 100644
--- a/lib/regular/regular.ml
+++ b/lib/regular/regular.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Std = struct
diff --git a/lib/regular/regular.mli b/lib/regular/regular.mli
index fc73ed6d2..ad8a888b6 100644
--- a/lib/regular/regular.mli
+++ b/lib/regular/regular.mli
@@ -1,6 +1,6 @@
(** Regular Library. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
(** Interface that should support any regular data type.
@@ -148,7 +148,7 @@ module Std : sig
(** Lazy sequence.
- This is the extension of Core_kernel's [Sequence] module
+ This is the extension of Core_kernel[@@warning "-D"]'s [Sequence] module
@see
diff --git a/lib/regular/regular_bytes.ml b/lib/regular/regular_bytes.ml
index 526ea7794..ec3f41882 100644
--- a/lib/regular/regular_bytes.ml
+++ b/lib/regular/regular_bytes.ml
@@ -1,6 +1,6 @@
module Std_bytes = Bytes
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Binable = Bin_prot.Utils.Make_binable(struct
module Binable = String
diff --git a/lib/regular/regular_bytes.mli b/lib/regular/regular_bytes.mli
index 78e02dda1..c1bc98823 100644
--- a/lib/regular/regular_bytes.mli
+++ b/lib/regular/regular_bytes.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type t = Bytes.t [@@deriving bin_io, compare, sexp]
diff --git a/lib/regular/regular_cache.ml b/lib/regular/regular_cache.ml
index be7adc06b..e5dc7e5c8 100644
--- a/lib/regular/regular_cache.ml
+++ b/lib/regular/regular_cache.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_data_intf
open Format
diff --git a/lib/regular/regular_cache.mli b/lib/regular/regular_cache.mli
index 186819d6a..b5a81cb42 100644
--- a/lib/regular/regular_cache.mli
+++ b/lib/regular/regular_cache.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_data_intf
open Format
diff --git a/lib/regular/regular_data.ml b/lib/regular/regular_data.ml
index 274c81e7e..a16db082a 100644
--- a/lib/regular/regular_data.ml
+++ b/lib/regular/regular_data.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_data_types
open Regular_data_intf
diff --git a/lib/regular/regular_data.mli b/lib/regular/regular_data.mli
index a1227f59d..4d6f362a4 100644
--- a/lib/regular/regular_data.mli
+++ b/lib/regular/regular_data.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_data_types
open Regular_data_intf
diff --git a/lib/regular/regular_data_intf.ml b/lib/regular/regular_data_intf.ml
index c61fc8ee5..4ac6cf68f 100644
--- a/lib/regular/regular_data_intf.ml
+++ b/lib/regular/regular_data_intf.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_data_types
type bytes = Regular_bytes.t [@@deriving bin_io, compare, sexp]
diff --git a/lib/regular/regular_data_read.ml b/lib/regular/regular_data_read.ml
index 30f984bb9..0519829aa 100644
--- a/lib/regular/regular_data_read.ml
+++ b/lib/regular/regular_data_read.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_data_types
type bytes = Regular_bytes.t
diff --git a/lib/regular/regular_data_read.mli b/lib/regular/regular_data_read.mli
index 0662fa7c0..bedc34d89 100644
--- a/lib/regular/regular_data_read.mli
+++ b/lib/regular/regular_data_read.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_data_types
type 'a t
diff --git a/lib/regular/regular_data_types.ml b/lib/regular/regular_data_types.ml
index cba116acd..d6686d1d4 100644
--- a/lib/regular/regular_data_types.ml
+++ b/lib/regular/regular_data_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
(** [copy buf obj pos] is a method to copy object [obj] into a buffer
diff --git a/lib/regular/regular_data_write.ml b/lib/regular/regular_data_write.ml
index aebf01cd9..7fa10d735 100644
--- a/lib/regular/regular_data_write.ml
+++ b/lib/regular/regular_data_write.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_data_types
type bytes = Regular_bytes.t
diff --git a/lib/regular/regular_data_write.mli b/lib/regular/regular_data_write.mli
index cf9c467fa..580ac91a4 100644
--- a/lib/regular/regular_data_write.mli
+++ b/lib/regular/regular_data_write.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_data_types
type 'a t
diff --git a/lib/regular/regular_opaque.ml b/lib/regular/regular_opaque.ml
index 8f640ec6b..5dcedd07e 100644
--- a/lib/regular/regular_opaque.ml
+++ b/lib/regular/regular_opaque.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_regular
open Regular_data_types
open Regular_data_intf
diff --git a/lib/regular/regular_regular.ml b/lib/regular/regular_regular.ml
index 95c16c4d2..f3be27ead 100644
--- a/lib/regular/regular_regular.ml
+++ b/lib/regular/regular_regular.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_data_types
open Regular_data_intf
diff --git a/lib/regular/regular_regular.mli b/lib/regular/regular_regular.mli
index ec66158d7..744798673 100644
--- a/lib/regular/regular_regular.mli
+++ b/lib/regular/regular_regular.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular_data_types
open Regular_data_intf
diff --git a/lib/regular/regular_seq.ml b/lib/regular/regular_seq.ml
index a19ffe250..4baa168ad 100644
--- a/lib/regular/regular_seq.ml
+++ b/lib/regular/regular_seq.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Sequence
diff --git a/lib/regular/regular_seq.mli b/lib/regular/regular_seq.mli
index 40d9d5e14..cd40649ad 100644
--- a/lib/regular/regular_seq.mli
+++ b/lib/regular/regular_seq.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
type 'a seq = 'a Sequence.t [@@deriving bin_io, compare, sexp]
diff --git a/lib/text_tags/text_tags.ml b/lib/text_tags/text_tags.ml
index a70904c6e..3abc4a8db 100644
--- a/lib/text_tags/text_tags.ml
+++ b/lib/text_tags/text_tags.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
module Unix = Caml_unix
@@ -116,8 +116,8 @@ module Attr = struct
and use this ugly reference *)
let clean = ref true
- let foreground tag = sscanf tag " .foreground %s@\n" ident
- let background tag = sscanf tag " .background %s@\n" ident
+ let foreground tag = sscanf tag " .foreground %s@\n" Fn.id
+ let background tag = sscanf tag " .background %s@\n" Fn.id
let name_of_attr tag = sscanf tag " .%s %s@\n" (fun s _ -> s)
diff --git a/lib/x86_cpu/x86_asm_reg.ml b/lib/x86_cpu/x86_asm_reg.ml
index 981ee1c83..379a00eb9 100644
--- a/lib/x86_cpu/x86_asm_reg.ml
+++ b/lib/x86_cpu/x86_asm_reg.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
include X86_asm_reg_types
diff --git a/lib/x86_cpu/x86_asm_reg.mli b/lib/x86_cpu/x86_asm_reg.mli
index f4b242efa..f86ccb3a6 100644
--- a/lib/x86_cpu/x86_asm_reg.mli
+++ b/lib/x86_cpu/x86_asm_reg.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
include module type of X86_asm_reg_types
diff --git a/lib/x86_cpu/x86_cpu.ml b/lib/x86_cpu/x86_cpu.ml
index 274e4b34f..3a56d9ff6 100644
--- a/lib/x86_cpu/x86_cpu.ml
+++ b/lib/x86_cpu/x86_cpu.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_env
diff --git a/lib/x86_cpu/x86_env.ml b/lib/x86_cpu/x86_env.ml
index 291c0ce9e..92d4c49b5 100644
--- a/lib/x86_cpu/x86_env.ml
+++ b/lib/x86_cpu/x86_env.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_types
diff --git a/lib/x86_cpu/x86_target.ml b/lib/x86_cpu/x86_target.ml
index 1b581439f..80ecae138 100644
--- a/lib/x86_cpu/x86_target.ml
+++ b/lib/x86_cpu/x86_target.ml
@@ -1,5 +1,5 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
let package = "bap"
diff --git a/lib/x86_cpu/x86_types.ml b/lib/x86_cpu/x86_types.ml
index a3e826178..d304bb6a2 100644
--- a/lib/x86_cpu/x86_types.ml
+++ b/lib/x86_cpu/x86_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module BV = Bitvector
diff --git a/lib_test/bap/run_tests.ml b/lib_test/bap/run_tests.ml
index 4bd41de41..3302b9e12 100644
--- a/lib_test/bap/run_tests.ml
+++ b/lib_test/bap/run_tests.ml
@@ -1,8 +1,10 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_plugins.Std
open OUnit2
+module Sys = Caml.Sys
+
let suite () =
"BAP" >::: [
Test_optimizations.suite ();
diff --git a/lib_test/bap_disasm/test_disasm.ml b/lib_test/bap_disasm/test_disasm.ml
index ca1c7737b..3313d026f 100644
--- a/lib_test/bap_disasm/test_disasm.ml
+++ b/lib_test/bap_disasm/test_disasm.ml
@@ -1,6 +1,6 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
-open Result
+open Result.Monad_infix
open OUnit2
module Dis = Disasm_expert.Basic
@@ -70,7 +70,7 @@ let insn_of_mem arch data _ctxt =
| mem,(Some insn),`finished ->
assert_equal ~printer:(string_of_int)
(String.length data) (Memory.length mem);
- return (strings_of_insn insn))
+ Result.return (strings_of_insn insn))
let assert_equal_regexp s s' =
let pat = sprintf "%s.?" s in
diff --git a/lib_test/bap_dwarf/dwarf_fbi_test.ml b/lib_test/bap_dwarf/dwarf_fbi_test.ml
index 3c0922876..99b7c3ee6 100644
--- a/lib_test/bap_dwarf/dwarf_fbi_test.ml
+++ b/lib_test/bap_dwarf/dwarf_fbi_test.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Or_error
open Bap_types.Std
diff --git a/lib_test/bap_dwarf/run_tests.ml b/lib_test/bap_dwarf/run_tests.ml
index 91a75d243..92a48b1fc 100644
--- a/lib_test/bap_dwarf/run_tests.ml
+++ b/lib_test/bap_dwarf/run_tests.ml
@@ -1,7 +1,8 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
module Dwarf = Bap_dwarf.Std
+module Sys = Caml.Sys
let suite =
"DWARF" >::: [
diff --git a/lib_test/bap_dwarf/test_leb128.ml b/lib_test/bap_dwarf/test_leb128.ml
index 34c56ba9d..c93ebb1b0 100644
--- a/lib_test/bap_dwarf/test_leb128.ml
+++ b/lib_test/bap_dwarf/test_leb128.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
module Leb128 = Dwarf_leb128
@@ -77,7 +77,7 @@ let write ~expect value t ctxt =
let buf = Bytes.create (Leb128.size leb) in
Leb128.write leb buf ~pos:0;
let buf = Bytes.to_string buf in
- assert_equal ~ctxt ~printer:ident buf expect
+ assert_equal ~ctxt ~printer:Fn.id buf expect
let size ~expect value t ctxt =
let leb = t.enc value in
diff --git a/lib_test/bap_future/test_future.ml b/lib_test/bap_future/test_future.ml
index 0c8d3c3f0..b47c9f3b0 100644
--- a/lib_test/bap_future/test_future.ml
+++ b/lib_test/bap_future/test_future.ml
@@ -1,33 +1,33 @@
open OUnit2
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_future.Std
let magic_value = 42
-let fulfill ctxt =
+let fulfill ctxt =
let future, promise = Future.create () in
Promise.fulfill promise magic_value;
assert_equal ~ctxt magic_value (Future.peek_exn future)
-let is_fulfilled ctxt =
+let is_fulfilled ctxt =
let future, promise = Future.create () in
assert_bool "is_fulfilled" (not (Promise.is_fulfilled promise));
Promise.fulfill promise magic_value;
assert_bool "is_fulfilled" (Promise.is_fulfilled promise)
-let define_twice ctxt =
+let define_twice ctxt =
let future, promise = Future.create () in
Promise.fulfill promise magic_value;
- let result =
+ let result =
try
Promise.fulfill promise magic_value;
false
- with Invalid_argument _ -> true in
+ with Invalid_argument _ -> true in
assert_bool "define twice failed" result
-let upon ctxt =
+let upon ctxt =
let future, promise = Future.create () in
let result = ref None in
let action x = result := Some x in
@@ -36,21 +36,21 @@ let upon ctxt =
Promise.fulfill promise magic_value;
assert_equal ~ctxt magic_value (Option.value_exn !result)
-let is_decided ctxt =
+let is_decided ctxt =
let future, promise = Future.create () in
assert_bool "is_decided: false" (not (Future.is_decided future));
Promise.fulfill promise magic_value;
assert_bool "is_decided: true" (Future.is_decided future)
-let peek ctxt =
+let peek ctxt =
let future, promise = Future.create () in
assert_equal ~ctxt None (Future.peek future);
Promise.fulfill promise magic_value;
assert_equal ~ctxt (Some magic_value) (Future.peek future)
-let peek_exn ctxt =
+let peek_exn ctxt =
let future, promise = Future.create () in
- let result =
+ let result =
try
let _ = Future.peek_exn future in
false
@@ -59,9 +59,9 @@ let peek_exn ctxt =
Promise.fulfill promise magic_value;
assert_equal ~ctxt magic_value (Future.peek_exn future)
-let bind ctxt =
+let bind ctxt =
let future, promise = Future.create () in
- let change x =
+ let change x =
let future', promise' = Future.create () in
Promise.fulfill promise' (Int.succ x);
future' in
@@ -73,13 +73,13 @@ let return ctxt =
let f = Future.return magic_value in
assert_equal ~ctxt magic_value (Future.peek_exn f)
-let map ctxt =
+let map ctxt =
let future, promise = Future.create () in
let future' = Future.map future ~f:Int.succ in
Promise.fulfill promise magic_value;
assert_equal ~ctxt (Int.succ magic_value) (Future.peek_exn future')
-let suite =
+let suite =
"Future" >:::
[
"fulfill" >:: fulfill;
@@ -87,7 +87,7 @@ let suite =
"define_twice" >:: define_twice;
"upon" >:: upon;
"is_decided" >:: is_decided;
- "peek" >:: peek;
+ "peek" >:: peek;
"peek_exn" >:: peek_exn;
"bind" >:: bind;
"map" >:: map;
diff --git a/lib_test/bap_future/test_stream.ml b/lib_test/bap_future/test_stream.ml
index e9c421e89..1d66face7 100644
--- a/lib_test/bap_future/test_stream.ml
+++ b/lib_test/bap_future/test_stream.ml
@@ -1,6 +1,6 @@
open OUnit2
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_future.Std
@@ -9,15 +9,15 @@ let values = [0;1;2;3;4;5;6;7]
let assert_false fail_id v = assert_bool fail_id (not v)
-let make_iota () =
+let make_iota () =
let start = ref 0 in
- fun () ->
+ fun () ->
let v = !start in
start := Int.succ !start;
v
-let is_even x = x mod 2 = 0
-let even_opt x = if is_even x then Some x else None
+let is_even x = x mod 2 = 0
+let even_opt x = if is_even x then Some x else None
let check_stream ctxt expect ss ~repeat signal =
let f,p = Future.create () in
@@ -36,7 +36,7 @@ let send_signal ctxt =
let expect = [0;1;2;] in
assert_equal ~ctxt expect (Queue.to_list buf)
-let repeat_signal ~times ctxt =
+let repeat_signal ~times ctxt =
let buf = Queue.create () in
let ss, signal = Stream.create () in
Stream.observe ss (Queue.enqueue buf);
@@ -44,7 +44,7 @@ let repeat_signal ~times ctxt =
let expect = Array.(to_list (create ~len:times magic_value)) in
assert_equal ~ctxt expect (Queue.to_list buf)
-let create ctxt =
+let create ctxt =
let ss, signal = Stream.create () in
let value = ref None in
Stream.observe ss (fun x -> value := Some x);
@@ -62,26 +62,26 @@ let unfold ctxt =
let expect = [0;1;2;3;] in
check_stream ctxt expect ss ~repeat:4 signal
-let unfold_until ctxt =
- let f x =
- if x > 7 then None
+let unfold_until ctxt =
+ let f x =
+ if x > 7 then None
else Some (x,x + 1) in
let expect = [0;1;2;3;4;5;6;7;] in
let init = Int.zero in
let ss, signal, future = Stream.unfold_until ~init ~f in
check_stream ctxt expect ss ~repeat:(List.length expect + 1) signal;
- assert_bool "unfold_until" (Future.is_decided future)
+ assert_bool "unfold_until" (Future.is_decided future)
let unfold' ctxt =
let f prev = Queue.of_list [prev; prev], Int.succ prev in
let ss, signal = Stream.unfold' ~init:Int.zero ~f in
let expect = [0;0;1;1;2;2;] in
- check_stream ctxt expect ss ~repeat:3 signal
+ check_stream ctxt expect ss ~repeat:3 signal
-let repeat value ~times ctxt =
+let repeat value ~times ctxt =
let ss, signal = Stream.repeat value in
let expect = Array.(to_list (create ~len:times value)) in
- check_stream ctxt expect ss ~repeat:times signal
+ check_stream ctxt expect ss ~repeat:times signal
let of_container ctxt fail_id container ~expect make_stream =
let ss, signal, f = make_stream container in
@@ -89,10 +89,10 @@ let of_container ctxt fail_id container ~expect make_stream =
check_stream ctxt expect ss ~repeat:(List.length expect + 1) signal;
assert_bool fail_id (Future.is_decided f)
-let of_list ctxt =
+let of_list ctxt =
of_container ctxt "of list" values ~expect:values Stream.of_list
-let of_array ctxt =
+let of_array ctxt =
let c = Array.of_list values in
of_container ctxt "of array" c ~expect:values Stream.of_array
@@ -103,14 +103,14 @@ let of_sequence ctxt =
let watch ctxt =
let ss, signal, _ = Stream.of_list values in
let buf = Queue.create () in
- let once id x =
+ let once id x =
if x > 3 then Stream.unsubscribe ss id
else Queue.enqueue buf x in
Stream.watch ss once;
Signal.repeat signal ~times:(List.length values) ();
assert_equal ~ctxt (List.take values 4) (Queue.to_list buf)
-let observe ctxt =
+let observe ctxt =
let ss, signal, _ = Stream.of_list values in
let called = ref Int.zero in
let f x = called := Int.succ !called in
@@ -120,7 +120,7 @@ let observe ctxt =
Signal.repeat signal ~times:2 ();
assert_equal ~ctxt 2 !called
-let subscribe ctxt =
+let subscribe ctxt =
let ss, signal, _ = Stream.of_list values in
let called = ref Int.zero in
let f x = called := Int.succ !called in
@@ -133,7 +133,7 @@ let subscribe ctxt =
Signal.repeat signal ~times:2 ();
assert_equal ~ctxt 2 !called
-let unsubscribe ctxt =
+let unsubscribe ctxt =
let ss, _, _ = Stream.of_list values in
let f x = () in
assert_bool "no subsribers" (not (Stream.has_subscribers ss));
@@ -142,7 +142,7 @@ let unsubscribe ctxt =
Stream.unsubscribe ss id;
assert_bool "no subsribers" (not (Stream.has_subscribers ss))
-let on_wait ctxt =
+let on_wait ctxt =
let ss, _, _ = Stream.of_list values in
let called = ref false in
let f () = called := true in
@@ -150,7 +150,7 @@ let on_wait ctxt =
Stream.wait ss;
assert_bool "on_wait" !called
-let on_subscribe ctxt =
+let on_subscribe ctxt =
let ss, _, _ = Stream.of_list values in
let id = ref None in
let f id' = id := Some id' in
@@ -159,7 +159,7 @@ let on_subscribe ctxt =
let id' = Stream.subscribe ss f' in
assert_equal ~ctxt id' (Option.value_exn !id)
-let on_unsubscribe ctxt =
+let on_unsubscribe ctxt =
let ss, _, _ = Stream.of_list values in
let id = ref None in
let f id' = id := Some id' in
@@ -170,22 +170,22 @@ let on_unsubscribe ctxt =
assert_equal ~ctxt id' (Option.value_exn !id)
let has_subscribers ctxt =
- let assert_no_subscribers ss =
+ let assert_no_subscribers ss =
assert_false "no subscribers" (Stream.has_subscribers ss) in
let assert_exists_subscribers ss =
assert_bool "exists subscribers" (Stream.has_subscribers ss) in
- let ss, _, _ = Stream.of_list values in
+ let ss, _, _ = Stream.of_list values in
let f x = () in
- assert_no_subscribers ss;
+ assert_no_subscribers ss;
let id = Stream.subscribe ss f in
- assert_exists_subscribers ss;
+ assert_exists_subscribers ss;
let id' = Stream.subscribe ss f in
Stream.unsubscribe ss id;
- assert_exists_subscribers ss;
+ assert_exists_subscribers ss;
Stream.unsubscribe ss id';
assert_no_subscribers ss
-let different_subscribe_id ctxt =
+let different_subscribe_id ctxt =
let ss,signal,_ = Stream.of_list values in
let stub _ = () in
let stub' _ = () in
@@ -193,7 +193,7 @@ let different_subscribe_id ctxt =
let id' = Stream.subscribe ss stub' in
assert_false "check id" Poly.(id = id')
-let different_watch_id ctxt =
+let different_watch_id ctxt =
let ss,signal,_ = Stream.of_list values in
let w_id = ref None in
let w_id' = ref None in
@@ -202,28 +202,28 @@ let different_watch_id ctxt =
Stream.watch ss f;
Stream.watch ss f';
Signal.send signal ();
- assert_false "check watch id"
+ assert_false "check watch id"
Poly.((Option.value_exn !w_id) = (Option.value_exn !w_id'))
-let same_watch_id ctxt =
+let same_watch_id ctxt =
let ss,signal,_ = Stream.of_list values in
let w_id = ref None in
let f id _ = w_id := Some id in
- Stream.watch ss f;
+ Stream.watch ss f;
Signal.send signal ();
let id = Option.value_exn !w_id in
Signal.send signal ();
let id' = Option.value_exn !w_id in
assert_equal ~ctxt id id'
-let map' ctxt =
+let map' ctxt =
let ss,signal,_ = Stream.of_list values in
let f x = Queue.of_list [x, x;] in
let ss' = Stream.map' ss ~f in
let expected = List.map values (fun x -> x,x) in
check_stream ctxt expected ss' ~repeat:(List.length expected) signal
-let map ctxt =
+let map ctxt =
let ss,signal,_ = Stream.of_list values in
let ss' = Stream.map ss ~f:Int.succ in
let expected = List.map values ~f:Int.succ in
@@ -234,10 +234,10 @@ let filter_map ~values ~expect ~f ctxt =
let ss' = Stream.filter_map ss ~f:even_opt in
check_stream ctxt expect ss' ~repeat:(List.length values) signal
-let merge ~values ~values' ~expect ~f ctxt =
+let merge ~values ~values' ~expect ~f ctxt =
let ss,signal,_ = Stream.of_list values in
let ss',signal',_ = Stream.of_list values' in
- let rs = Stream.merge ss ss' ~f in
+ let rs = Stream.merge ss ss' ~f in
let repeat = max (List.length values) (List.length values') in
let buf = Queue.create () in
Stream.observe rs (Queue.enqueue buf);
@@ -246,8 +246,8 @@ let merge ~values ~values' ~expect ~f ctxt =
assert_equal ~ctxt expect (Queue.to_list buf)
let apply ctxt =
- let expected = List.mapi ~f:(fun i x -> x + i) values in
- let ss,signal,_ =
+ let expected = List.mapi ~f:(fun i x -> x + i) values in
+ let ss,signal,_ =
Array.init (List.length expected) ~f:(fun i -> fun x -> x + i) |>
Stream.of_array in
let ss',signal',_ = Stream.of_list values in
@@ -258,7 +258,7 @@ let apply ctxt =
Signal.repeat signal' ~times:(List.length values) ();
assert_equal ~ctxt expected (Queue.to_list buf)
-let split ctxt =
+let split ctxt =
let f x = x, Int.succ x in
let ss,signal,_= Stream.of_list values in
let rs, rs' = Stream.split ss ~f in
@@ -286,7 +286,7 @@ let zip ~values ~values' ~expect ctxt =
let unzip ctxt =
let expected = values in
let expected' = List.map ~f:string_of_int values in
- let ss, signal, _ = Stream.of_list values in
+ let ss, signal, _ = Stream.of_list values in
let ss' = Stream.map ~f:(fun x -> x, string_of_int x) ss in
let rs, rs' = Stream.unzip ss' in
let buf = Queue.create () in
@@ -297,13 +297,13 @@ let unzip ctxt =
assert_equal ~ctxt expected (Queue.to_list buf);
assert_equal ~ctxt expected' (Queue.to_list buf')
-let once ctxt =
+let once ctxt =
let ss, signal, _ = Stream.of_list values in
let ss' = Stream.once ss in
let expected = [0;] in
check_stream ctxt expected ss' ~repeat:8 signal
-let parse ctxt =
+let parse ctxt =
let ss, signal, _ = Stream.of_list values in
let expected = List.filter_map ~f:even_opt values in
let f state x =
@@ -315,10 +315,10 @@ let parse ctxt =
let foldw ~stride ~f ~width ~init ~values ~expect ~times ctxt =
let ss,signal,_ = Stream.of_list values in
let ss' = Stream.foldw ~stride ss width ~init ~f in
- check_stream ctxt expect ss' ~repeat:times signal
+ check_stream ctxt expect ss' ~repeat:times signal
-let foldw_range ~max_stride ~max_width ~f ~init ctxt =
- let run (s,w) =
+let foldw_range ~max_stride ~max_width ~f ~init ctxt =
+ let run (s,w) =
let ss,signal,_ = Stream.of_list values in
let ss' = Stream.foldw ~stride:s ss w ~init ~f in
let f,p = Future.create () in
@@ -326,11 +326,11 @@ let foldw_range ~max_stride ~max_width ~f ~init ctxt =
Signal.repeat signal ~times:(List.length values + 1) ();
Promise.fulfill p ();
ignore(Future.peek_exn f') in
- let create_set n = Array.init (n + 1) ident |> Array.to_list in
+ let create_set n = Array.init (n + 1) Fn.id |> Array.to_list in
let stride_set = create_set max_stride in
let width_set = create_set max_width in
let all = List.cartesian_product stride_set width_set in
- let r =
+ let r =
try
List.iter ~f:run all;
true
@@ -340,8 +340,8 @@ let foldw_range ~max_stride ~max_width ~f ~init ctxt =
let run_time_line signal clk_signal time_line =
let rec run ind = function
| [] -> ()
- | (time_ind :: times) as line ->
- let ind', line' =
+ | (time_ind :: times) as line ->
+ let ind', line' =
if time_ind = ind then
let () = Signal.send clk_signal () in
ind, times
@@ -360,7 +360,7 @@ let frame values ~expect ~time_line ctxt =
run_time_line signal signal' time_line;
assert_equal ~ctxt expect (Queue.to_list buf)
-let sample values ~expect ~time_line ctxt =
+let sample values ~expect ~time_line ctxt =
let ss,signal, _ = Stream.of_list values in
let clk,signal' = Stream.from (fun () -> ()) in
let ss' = Stream.sample ~clk ss in
@@ -369,22 +369,22 @@ let sample values ~expect ~time_line ctxt =
run_time_line signal signal' time_line;
assert_equal ~ctxt expect (Queue.to_list buf)
-let hd values ctxt =
+let hd values ctxt =
let ss,signal, _ = Stream.of_list values in
let f = Stream.hd ss in
Signal.repeat signal ~times:2 ();
- match values with
+ match values with
| [] -> assert_false "hd is not decided" (Future.is_decided f)
| _ ->
assert_equal ~ctxt (List.hd_exn values) (Future.peek_exn f)
-let tl ctxt =
+let tl ctxt =
let ss,signal, _ = Stream.of_list values in
let ss' = Stream.tl ss in
let expect = List.drop values 1 in
- check_stream ctxt expect ss' ~repeat:(List.length expect + 1) signal
+ check_stream ctxt expect ss' ~repeat:(List.length expect + 1) signal
-let base_find values ~find f expect ctxt =
+let base_find values ~find f expect ctxt =
let ss,signal, _ = Stream.of_list values in
let future = find ss ~f in
Signal.repeat signal ~times:(List.length values + 1) ();
@@ -395,13 +395,13 @@ let base_find values ~find f expect ctxt =
| Some v ->
assert_equal ~ctxt v (Future.peek_exn future)
-let find values ~f ~expect ctxt =
- base_find values ~find:Stream.find f expect ctxt
+let find values ~f ~expect ctxt =
+ base_find values ~find:Stream.find f expect ctxt
let find_map values ~f ~expect ctxt =
- base_find values ~find:Stream.find_map f expect ctxt
+ base_find values ~find:Stream.find_map f expect ctxt
-let take ~values ~expect ~how_match ctxt =
+let take ~values ~expect ~how_match ctxt =
let ss,signal, _ = Stream.of_list values in
let vals = Stream.take ss how_match in
Signal.repeat signal ~times:(List.length values + 1) ();
@@ -411,15 +411,15 @@ let nth values ~expect ~n ctxt =
let ss,signal, _ = Stream.of_list values in
let f = Stream.nth ss n in
Signal.repeat signal ~times:(n + 1) ();
- match expect with
- | None ->
+ match expect with
+ | None ->
assert_false "nth: future mustn't be decided"
(Future.is_decided f)
- | Some v ->
+ | Some v ->
assert_equal ~ctxt v (Future.peek_exn f)
-let fulfill_after_signals promise ~after ~max signal =
- let rec run ind =
+let fulfill_after_signals promise ~after ~max signal =
+ let rec run ind =
if ind > max then ()
else
let () = Signal.send signal () in
@@ -427,20 +427,20 @@ let fulfill_after_signals promise ~after ~max signal =
run (ind + 1) in
run 0
-let upon values ~expect ~after ctxt =
+let upon values ~expect ~after ctxt =
let ss,signal, _ = Stream.of_list values in
let event, promise = Future.create () in
let f = Stream.upon event ss in
let max = List.length values in
fulfill_after_signals promise ~after ~max signal;
match expect with
- | None ->
+ | None ->
assert_false "upon: future mustn't be decided"
(Future.is_decided f)
- | Some v ->
+ | Some v ->
assert_equal ~ctxt v (Future.peek_exn f)
-let last_before values ~expect ~event_after ~last ctxt =
+let last_before values ~expect ~event_after ~last ctxt =
let ss,signal, _ = Stream.of_list values in
let event, promise = Future.create () in
let f = Stream.last_before event ss last in
@@ -448,7 +448,7 @@ let last_before values ~expect ~event_after ~last ctxt =
fulfill_after_signals promise ~after:event_after ~max signal;
assert_equal ~ctxt expect (Future.peek_exn f)
-let before ctxt =
+let before ctxt =
let ss,signal, _ = Stream.of_list values in
let event, promise = Future.create () in
let f = Stream.before event ss in
@@ -457,7 +457,7 @@ let before ctxt =
let expect = [0;1;2;3;] in
assert_equal ~ctxt expect (Future.peek_exn f)
-let suite =
+let suite =
"Future_Stream" >:::
[
"send signal" >:: send_signal;
@@ -494,7 +494,7 @@ let suite =
"before" >:: before;
"hd" >:: hd values;
"hd empty" >:: hd [];
- "tl" >:: tl;
+ "tl" >:: tl;
"find existed" >:: find values ~f:(fun x -> x = 3) ~expect:(Some 3);
"find not existed" >:: find values ~f:(fun x -> x = 10) ~expect:None;
"take 3" >:: take ~values ~expect:[0;1;2] ~how_match:3;
@@ -504,19 +504,19 @@ let suite =
"upon: after 3" >:: upon values ~expect:(Some 3) ~after:3;
"upon: after 10" >:: upon values ~expect:None ~after:10;
- "zip diff length" >::
- zip ~values:[0;1;2;3;] ~values':[0; 1; 2; 3; 4; 5;]
+ "zip diff length" >::
+ zip ~values:[0;1;2;3;] ~values':[0; 1; 2; 3; 4; 5;]
~expect:[0,0; 1,1; 2,2; 3,3;];
- "filter_map" >::
+ "filter_map" >::
filter_map ~values:[0;1;2;3;4;5;6;7;8] ~expect:[0;2;4;6;8] ~f:even_opt;
- "merge diff length" >::
+ "merge diff length" >::
merge ~values:[0;1;2;3;] ~values':[0.; 1.; 2.; 3.; 4.; 5.; ]
~expect:[0.5; 2.5; 4.5; 6.5] ~f:(fun x y -> float x +. y +. 0.5);
"foldw stride=1 width=3" >::
- foldw ~f:(+) ~init:0 ~stride:1 ~width:3 ~values
+ foldw ~f:(+) ~init:0 ~stride:1 ~width:3 ~values
~times:(List.length values + 1) ~expect:[3; 6; 9; 12; 15; 18] ;
"foldw stride=2 width=3" >::
@@ -646,54 +646,54 @@ let suite =
foldw_range ~f:(fun xs x -> x :: xs) ~init:[]
~max_stride:10 ~max_width:10;
- "frame
- clk: T T T
+ "frame
+ clk: T T T
data: 0 12 34567 " >::
frame values ~expect:[[0]; []; [1;2] ] ~time_line:[1;1;3;];
- "frame
- clk: T T T
+ "frame
+ clk: T T T
data: 0 12 34567 " >::
frame values ~expect:[ []; [0]; [1;2] ] ~time_line:[0;1;3;];
- "frame
- clk: T T T T
+ "frame
+ clk: T T T T
data: 012 3 4567" >::
frame values ~expect:[[]; []; [0; 1; 2;]; [3] ] ~time_line:[0;0;3;4];
- "frame
- clk: T
+ "frame
+ clk: T
data: 01234567" >::
frame values ~expect:[ values;] ~time_line:[List.length values;];
- "sample" >::
+ "sample" >::
sample values ~expect:[Some 0; None; Some 1 ] ~time_line:[1;1;3;];
- "sample" >::
- sample values ~expect:[None; None; Some 0; Some 1 ]
+ "sample" >::
+ sample values ~expect:[None; None; Some 0; Some 1 ]
~time_line:[0; 0; 1; 2;];
- "find_map" >:: find_map values
- ~f:(fun x ->
+ "find_map" >:: find_map values
+ ~f:(fun x ->
if x = 3 then Some (Int.succ x) else None) ~expect:(Some 4);
- "find_map" >:: find_map values
- ~f:(fun x ->
+ "find_map" >:: find_map values
+ ~f:(fun x ->
if x = 10 then Some (Int.succ x) else None) ~expect:None;
"last_before: after=2; length=3:
|event
- data: 0 1 2 3 4 5 6 7 " >::
+ data: 0 1 2 3 4 5 6 7 " >::
last_before values ~expect:[0;1;2] ~event_after:2 ~last:3;
"last_before: after=2; length=4
|event
- data: 0 1 2 3 4 5 6 7 " >::
+ data: 0 1 2 3 4 5 6 7 " >::
last_before values ~expect:[0;1;2] ~event_after:2 ~last:4;
"last_before: after=4; length=2:
|event
- data: 0 1 2 3 4 5 6 7 " >::
+ data: 0 1 2 3 4 5 6 7 " >::
last_before values ~expect:[3;4] ~event_after:4 ~last:2;
]
diff --git a/lib_test/bap_image/test_image.ml b/lib_test/bap_image/test_image.ml
index f299c81ec..513eee9bc 100644
--- a/lib_test/bap_image/test_image.ml
+++ b/lib_test/bap_image/test_image.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
open Or_error
open Word_size
diff --git a/lib_test/bap_image/test_llvm_loader.ml b/lib_test/bap_image/test_llvm_loader.ml
index 0aaa9e95d..7a2c20106 100644
--- a/lib_test/bap_image/test_llvm_loader.ml
+++ b/lib_test/bap_image/test_llvm_loader.ml
@@ -14,7 +14,7 @@
find ../x86_64-binaries/elf/ -type f -name "gcc_*O0*" -exec \
./run_tests.native -only-test BAP:9:Image:0:llvm_loader -loader-binary '{}' \;
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
open Or_error
open Bap_types.Std
diff --git a/lib_test/bap_image/test_memmap.ml b/lib_test/bap_image/test_memmap.ml
index 3098868db..9b6f5a7d4 100644
--- a/lib_test/bap_image/test_memmap.ml
+++ b/lib_test/bap_image/test_memmap.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
open Format
open Bap.Std
@@ -77,8 +77,8 @@ let dominate cons size ctxt =
let msg = sprintf "(%d,[%a,%a]) is not dominated by [%a,%a]" v
Addr.pps (Memory.min_addr k)
Addr.pps (Memory.max_addr k)
- Addr.pps (uw (Memmap.min_addr map))
- Addr.pps (uw (Memmap.max_addr map)) in
+ Addr.pps (Option.value_exn (Memmap.min_addr map))
+ Addr.pps (Option.value_exn (Memmap.max_addr map)) in
assert_bool msg @@ Memmap.dominates map k)
let contains k v =
diff --git a/lib_test/bap_image/test_table.ml b/lib_test/bap_image/test_table.ml
index b641d3a65..18bd2063e 100644
--- a/lib_test/bap_image/test_table.ml
+++ b/lib_test/bap_image/test_table.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
open Or_error
open Word_size
diff --git a/lib_test/bap_project/test_project.ml b/lib_test/bap_project/test_project.ml
index 07dad828d..0cd9b57f0 100644
--- a/lib_test/bap_project/test_project.ml
+++ b/lib_test/bap_project/test_project.ml
@@ -1,6 +1,6 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_future.Std
open OUnit2
open Format
@@ -39,7 +39,7 @@ let normalize = String.filter ~f:(function
| _ -> true)
let assert_normalized ~expect got ctxt : unit =
- assert_equal ~ctxt (normalize expect) (normalize got) ~printer:ident
+ assert_equal ~ctxt (normalize expect) (normalize got) ~printer:Fn.id
let tag = Value.Tag.register (module String)
~name:"test"
@@ -81,7 +81,7 @@ let test_substitute case =
let has_filename = "filename-is-provided" >:: fun ctxt ->
match Project.get p filename with
| None -> assert_failure "filename is not set"
- | Some file' -> assert_equal ~ctxt ~printer:ident file file' in
+ | Some file' -> assert_equal ~ctxt ~printer:Fn.id file file' in
[
test case.asm "$asm";
test case.bil "$bil";
diff --git a/lib_test/bap_sema/test_ir.ml b/lib_test/bap_sema/test_ir.ml
index aa972dc83..81bcc4062 100644
--- a/lib_test/bap_sema/test_ir.ml
+++ b/lib_test/bap_sema/test_ir.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/bap_traces/test_traces.ml b/lib_test/bap_traces/test_traces.ml
index 172d2a76d..82da62117 100644
--- a/lib_test/bap_traces/test_traces.ml
+++ b/lib_test/bap_traces/test_traces.ml
@@ -1,5 +1,5 @@
open OUnit2
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Or_error
open Bap.Std
diff --git a/lib_test/bap_types/test_bili.ml b/lib_test/bap_types/test_bili.ml
index 5b73ff729..2d374e7f0 100644
--- a/lib_test/bap_types/test_bili.ml
+++ b/lib_test/bap_types/test_bili.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
open Bap.Std
diff --git a/lib_test/bap_types/test_bitvector.ml b/lib_test/bap_types/test_bitvector.ml
index eb5b37430..8bef69e16 100644
--- a/lib_test/bap_types/test_bitvector.ml
+++ b/lib_test/bap_types/test_bitvector.ml
@@ -1,5 +1,5 @@
open OUnit2
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
@@ -15,7 +15,7 @@ let normalized ~n ~add ~width ctxt =
(Word.of_int (n + add) ~width)
let to_string ~str v ctxt =
- assert_equal ~ctxt ~printer:ident str (Word.to_string v)
+ assert_equal ~ctxt ~printer:Fn.id str (Word.to_string v)
let of_string ~str v ctxt =
assert_equal ~ctxt ~printer:Word.to_string
diff --git a/lib_test/bap_types/test_bytes.ml b/lib_test/bap_types/test_bytes.ml
index 062b8c5e5..4f9658b94 100644
--- a/lib_test/bap_types/test_bytes.ml
+++ b/lib_test/bap_types/test_bytes.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
open OUnit2
diff --git a/lib_test/bap_types/test_graph.ml b/lib_test/bap_types/test_graph.ml
index 0ee8b5f39..6f37d78c0 100644
--- a/lib_test/bap_types/test_graph.ml
+++ b/lib_test/bap_types/test_graph.ml
@@ -8,7 +8,7 @@
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Graphlib.Std
open Bap.Std
open OUnit2
@@ -523,7 +523,7 @@ module Test_IR = struct
let (++) g x = G.Node.(insert (create x) g)
let (--) g x = G.Node.(remove (create x) g)
- let has = ident
+ let has = Fn.id
let hasn't = not
let nil = G.empty
diff --git a/lib_test/bap_types/test_optimizations.ml b/lib_test/bap_types/test_optimizations.ml
index 4ff36fc9d..911acedf1 100644
--- a/lib_test/bap_types/test_optimizations.ml
+++ b/lib_test/bap_types/test_optimizations.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
open Bap.Std
diff --git a/lib_test/bap_types/test_trie.ml b/lib_test/bap_types/test_trie.ml
index f1930ce2b..0736f97d3 100644
--- a/lib_test/bap_types/test_trie.ml
+++ b/lib_test/bap_types/test_trie.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/powerpc_add_tests.ml b/lib_test/powerpc/powerpc_add_tests.ml
index 60365419e..698e804fd 100644
--- a/lib_test/powerpc/powerpc_add_tests.ml
+++ b/lib_test/powerpc/powerpc_add_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/powerpc_arith_tests.ml b/lib_test/powerpc/powerpc_arith_tests.ml
index aec54d7ea..a81ad2a4d 100644
--- a/lib_test/powerpc/powerpc_arith_tests.ml
+++ b/lib_test/powerpc/powerpc_arith_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/powerpc_branch_tests.ml b/lib_test/powerpc/powerpc_branch_tests.ml
index 9fc402491..e9c1b3666 100644
--- a/lib_test/powerpc/powerpc_branch_tests.ml
+++ b/lib_test/powerpc/powerpc_branch_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/powerpc_compare_tests.ml b/lib_test/powerpc/powerpc_compare_tests.ml
index ba55f2075..189076d4a 100644
--- a/lib_test/powerpc/powerpc_compare_tests.ml
+++ b/lib_test/powerpc/powerpc_compare_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/powerpc_cr_tests.ml b/lib_test/powerpc/powerpc_cr_tests.ml
index 4bd4da9a7..cbef15c2c 100644
--- a/lib_test/powerpc/powerpc_cr_tests.ml
+++ b/lib_test/powerpc/powerpc_cr_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/powerpc_load_tests.ml b/lib_test/powerpc/powerpc_load_tests.ml
index 4b24f073b..4b544e830 100644
--- a/lib_test/powerpc/powerpc_load_tests.ml
+++ b/lib_test/powerpc/powerpc_load_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/powerpc_logical_tests.ml b/lib_test/powerpc/powerpc_logical_tests.ml
index 8f4d7efcf..7ea5f4320 100644
--- a/lib_test/powerpc/powerpc_logical_tests.ml
+++ b/lib_test/powerpc/powerpc_logical_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/powerpc_move_tests.ml b/lib_test/powerpc/powerpc_move_tests.ml
index 27fcc4594..b6cf12dc3 100644
--- a/lib_test/powerpc/powerpc_move_tests.ml
+++ b/lib_test/powerpc/powerpc_move_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/powerpc_rotate_tests.ml b/lib_test/powerpc/powerpc_rotate_tests.ml
index 6a5121c09..602a6dd8c 100644
--- a/lib_test/powerpc/powerpc_rotate_tests.ml
+++ b/lib_test/powerpc/powerpc_rotate_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
open Bap.Std
@@ -20,7 +20,7 @@ let mask64 start stop =
else None in
let (^) = Word.concat in
let concat x y z =
- match List.filter_map ~f:ident [x;y;z;] with
+ match List.filter_map ~f:Fn.id [x;y;z;] with
| [x] -> x
| [x;y] -> x ^ y
| [x;y;z;] -> x ^ y ^ z
diff --git a/lib_test/powerpc/powerpc_shift_tests.ml b/lib_test/powerpc/powerpc_shift_tests.ml
index 664331c3f..05d3c3195 100644
--- a/lib_test/powerpc/powerpc_shift_tests.ml
+++ b/lib_test/powerpc/powerpc_shift_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
open Bap.Std
diff --git a/lib_test/powerpc/powerpc_store_tests.ml b/lib_test/powerpc/powerpc_store_tests.ml
index 15a0b77fd..f583520e4 100644
--- a/lib_test/powerpc/powerpc_store_tests.ml
+++ b/lib_test/powerpc/powerpc_store_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/powerpc_tests_helpers.ml b/lib_test/powerpc/powerpc_tests_helpers.ml
index 831f978c8..0c048672c 100644
--- a/lib_test/powerpc/powerpc_tests_helpers.ml
+++ b/lib_test/powerpc/powerpc_tests_helpers.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/powerpc_tests_helpers.mli b/lib_test/powerpc/powerpc_tests_helpers.mli
index e15e29f7a..c5f046225 100644
--- a/lib_test/powerpc/powerpc_tests_helpers.mli
+++ b/lib_test/powerpc/powerpc_tests_helpers.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/powerpc/run_powerpc_tests.ml b/lib_test/powerpc/run_powerpc_tests.ml
index 11b182bc7..30c679164 100644
--- a/lib_test/powerpc/run_powerpc_tests.ml
+++ b/lib_test/powerpc/run_powerpc_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
open Bap_plugins.Std
diff --git a/lib_test/x86/run_x86_tests.ml b/lib_test/x86/run_x86_tests.ml
index 6e318a6a5..8034c5af1 100644
--- a/lib_test/x86/run_x86_tests.ml
+++ b/lib_test/x86/run_x86_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
open Bap_plugins.Std
diff --git a/lib_test/x86/test_pcmp.ml b/lib_test/x86/test_pcmp.ml
index d2e1639bb..31156d2d5 100644
--- a/lib_test/x86/test_pcmp.ml
+++ b/lib_test/x86/test_pcmp.ml
@@ -55,7 +55,7 @@
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/lib_test/x86/test_pshufb.ml b/lib_test/x86/test_pshufb.ml
index 6f19e64ef..084790131 100644
--- a/lib_test/x86/test_pshufb.ml
+++ b/lib_test/x86/test_pshufb.ml
@@ -56,7 +56,7 @@
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
diff --git a/opam/opam b/opam/opam
index 2dacd1c32..db163493b 100644
--- a/opam/opam
+++ b/opam/opam
@@ -13,7 +13,7 @@ depends: [
"camlzip"
"linenoise" {>= "1.1" & < "2.0"}
"cmdliner" {>= "1.0" & < "2.0"}
- "ppx_bap" {>= "v0.14" & < "v0.15"}
+ "ppx_bap"
"core_kernel" {>= "v0.14" & < "v0.16"}
"ezjsonm"
"fileutils"
diff --git a/plugins/abi/abi_main.ml b/plugins/abi/abi_main.ml
index b5b782894..944212be4 100644
--- a/plugins/abi/abi_main.ml
+++ b/plugins/abi/abi_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
include Self()
diff --git a/plugins/analyze/analyze_core_commands.ml b/plugins/analyze/analyze_core_commands.ml
index a4df0770c..81027a92a 100644
--- a/plugins/analyze/analyze_core_commands.ml
+++ b/plugins/analyze/analyze_core_commands.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_main
open Bap_knowledge
open Bap_core_theory
diff --git a/plugins/analyze/analyze_main.ml b/plugins/analyze/analyze_main.ml
index 6224760a2..da51a6d8b 100644
--- a/plugins/analyze/analyze_main.ml
+++ b/plugins/analyze/analyze_main.ml
@@ -46,7 +46,7 @@ $(b,:) instead of $(b,-) or $(b,--), e.g.,
|}
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_main
open Bap_knowledge
open Bap.Std
diff --git a/plugins/api/api_main.ml b/plugins/api/api_main.ml
index 32c5088b1..f9b5ac099 100644
--- a/plugins/api/api_main.ml
+++ b/plugins/api/api_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Result.Monad_infix
open Bap.Std
module Sys = Caml.Sys
@@ -40,7 +40,7 @@ module Api_path = struct
let to_string = Path.string_of_filename
let expand_home path =
- Option.(value_map ~default:path ~f:ident
+ Option.(value_map ~default:path ~f:Fn.id
(String.chop_prefix ~prefix:"~" (to_string path) >>= fun p ->
getenv "HOME" >>= fun h ->
Some Path.(filename_of_string h / filename_of_string p)))
diff --git a/plugins/arm/arm_gnueabi.ml b/plugins/arm/arm_gnueabi.ml
index 49918cee8..5a9f82e65 100644
--- a/plugins/arm/arm_gnueabi.ml
+++ b/plugins/arm/arm_gnueabi.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_c.Std
@@ -54,7 +54,7 @@ module Define(Arch : sig val name : arch end) = struct
let abi = C.Abi.{
insert_args = args;
- apply_attrs = fun _ -> ident
+ apply_attrs = fun _ -> Fn.id
}
let api size = C.Abi.create_api_processor size abi
diff --git a/plugins/arm/arm_main.ml b/plugins/arm/arm_main.ml
index e6ee60780..32e43bdfe 100644
--- a/plugins/arm/arm_main.ml
+++ b/plugins/arm/arm_main.ml
@@ -5,7 +5,7 @@ The target support package that enables support for the ARM family of
architectures.
"
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_main
open Extension.Syntax
diff --git a/plugins/beagle/beagle_main.ml b/plugins/beagle/beagle_main.ml
index 9fa94f195..78566ef53 100644
--- a/plugins/beagle/beagle_main.ml
+++ b/plugins/beagle/beagle_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
open Monads.Std
diff --git a/plugins/bil/bil_float.ml b/plugins/bil/bil_float.ml
index b76f28f26..e3524b3ff 100644
--- a/plugins/bil/bil_float.ml
+++ b/plugins/bil/bil_float.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_knowledge
@@ -340,7 +340,7 @@ module Make(B : Theory.Core) = struct
let is_round_up rm sign last guard round sticky =
let open B in
- let case m t f = ite (requal rm m) t f and default = ident in
+ let case m t f = ite (requal rm m) t f and default = Fn.id in
case rtn (inv sign) @@
case rtz sign @@
case rna guard @@
diff --git a/plugins/bil/bil_float_tests.ml b/plugins/bil/bil_float_tests.ml
index a5c502865..1779228c1 100644
--- a/plugins/bil/bil_float_tests.ml
+++ b/plugins/bil/bil_float_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
open Bap_plugins.Std
open Bap_primus.Std
diff --git a/plugins/bil/bil_ir.ml b/plugins/bil/bil_ir.ml
index bc6f658e2..de91fc920 100644
--- a/plugins/bil/bil_ir.ml
+++ b/plugins/bil/bil_ir.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
diff --git a/plugins/bil/bil_lifter.ml b/plugins/bil/bil_lifter.ml
index a411b78db..7ce4c7737 100644
--- a/plugins/bil/bil_lifter.ml
+++ b/plugins/bil/bil_lifter.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_future.Std
open Bap_knowledge
diff --git a/plugins/bil/bil_main.ml b/plugins/bil/bil_main.ml
index 23e4e44f1..4af02568b 100644
--- a/plugins/bil/bil_main.ml
+++ b/plugins/bil/bil_main.ml
@@ -38,7 +38,7 @@ argument.
|}
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_main.Extension
diff --git a/plugins/bil/bil_semantics.ml b/plugins/bil/bil_semantics.ml
index e7466e5af..060042005 100644
--- a/plugins/bil/bil_semantics.ml
+++ b/plugins/bil/bil_semantics.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_knowledge
open Bap_core_theory
diff --git a/plugins/byteweight/byteweight_main.ml b/plugins/byteweight/byteweight_main.ml
index 912dfeabf..100e31e63 100644
--- a/plugins/byteweight/byteweight_main.ml
+++ b/plugins/byteweight/byteweight_main.ml
@@ -41,7 +41,7 @@ Security 14). 2014.
$(b,bap-byteweight)(1), $(b,bap-plugin-ida)(1), $(b,bap-plugin-read-symbols)(1)
|}
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_main
open Bap_core_theory
open Bap.Std
diff --git a/plugins/cache/bap_cache.ml b/plugins/cache/bap_cache.ml
index 326d55ff6..15bb5057a 100644
--- a/plugins/cache/bap_cache.ml
+++ b/plugins/cache/bap_cache.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Bap_cache_types
diff --git a/plugins/cache/bap_cache_gc.ml b/plugins/cache/bap_cache_gc.ml
index 20d28ac4e..22dc97bd2 100644
--- a/plugins/cache/bap_cache_gc.ml
+++ b/plugins/cache/bap_cache_gc.ml
@@ -73,7 +73,7 @@
select as many files as we need to remove requested size.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
include Self ()
diff --git a/plugins/cache/bap_cache_main.ml b/plugins/cache/bap_cache_main.ml
index 152ea29e0..790afe108 100644
--- a/plugins/cache/bap_cache_main.ml
+++ b/plugins/cache/bap_cache_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Format
diff --git a/plugins/cache/bap_cache_types.ml b/plugins/cache/bap_cache_types.ml
index c708b8406..1ecc4b6a8 100644
--- a/plugins/cache/bap_cache_types.ml
+++ b/plugins/cache/bap_cache_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
type config = {
diff --git a/plugins/cache/bap_cache_utils.ml b/plugins/cache/bap_cache_utils.ml
index d7aa997b1..49be733fe 100644
--- a/plugins/cache/bap_cache_utils.ml
+++ b/plugins/cache/bap_cache_utils.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
module Filename = Caml.Filename
diff --git a/plugins/cache/bap_cache_utils.mli b/plugins/cache/bap_cache_utils.mli
index 72ee2a8a1..134c21700 100644
--- a/plugins/cache/bap_cache_utils.mli
+++ b/plugins/cache/bap_cache_utils.mli
@@ -1,5 +1,5 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
val binable_from_file :
diff --git a/plugins/callgraph_collator/callgraph_collator_main.ml b/plugins/callgraph_collator/callgraph_collator_main.ml
index aa464a34f..80655de1b 100644
--- a/plugins/callgraph_collator/callgraph_collator_main.ml
+++ b/plugins/callgraph_collator/callgraph_collator_main.ml
@@ -18,7 +18,7 @@ and
means that in the base there is no call from src to dst.
|}
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Graphlib.Std
open Format
diff --git a/plugins/callsites/callsites_main.ml b/plugins/callsites/callsites_main.ml
index 9feb6f5a9..64a105eb4 100644
--- a/plugins/callsites/callsites_main.ml
+++ b/plugins/callsites/callsites_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
include Self()
open Option.Monad_infix
diff --git a/plugins/constant_tracker/constant_tracker_main.ml b/plugins/constant_tracker/constant_tracker_main.ml
index b41e34658..b4b9fc1af 100644
--- a/plugins/constant_tracker/constant_tracker_main.ml
+++ b/plugins/constant_tracker/constant_tracker_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
diff --git a/plugins/core_theory/core_theory_main.ml b/plugins/core_theory/core_theory_main.ml
index 0b350d01f..754194dea 100644
--- a/plugins/core_theory/core_theory_main.ml
+++ b/plugins/core_theory/core_theory_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_main
open KB.Syntax
@@ -27,7 +27,7 @@ let decide_name_from_possible_name () : unit =
let domain = KB.Domain.optional "cst"
~equal:Sexp.equal
- ~inspect:ident
+ ~inspect:Fn.id
let eslot = KB.Class.property Theory.Semantics.cls "eff"
~package:"core"
@@ -196,7 +196,7 @@ module Herbrand : Theory.Core = struct
| _ -> empty s
let concat s xs =
- List.map xs ~f:(fun x -> x >>|> fun _ -> ident) |>
+ List.map xs ~f:(fun x -> x >>|> fun _ -> Fn.id) |>
KB.List.all >>| Option.all >>| function
| None -> empty s
| Some xs -> pure s @@ app "concat" xs
diff --git a/plugins/cxxfilt/cxxfilt_main.ml b/plugins/cxxfilt/cxxfilt_main.ml
index 1835e1cd7..74cafb42c 100644
--- a/plugins/cxxfilt/cxxfilt_main.ml
+++ b/plugins/cxxfilt/cxxfilt_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_demangle.Std
open Cxxfilt_config
diff --git a/plugins/demangle/demangle_main.ml b/plugins/demangle/demangle_main.ml
index 246650039..736eb3b96 100644
--- a/plugins/demangle/demangle_main.ml
+++ b/plugins/demangle/demangle_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_demangle.Std
open Bap_future.Std
diff --git a/plugins/dependencies/dependencies_main.ml b/plugins/dependencies/dependencies_main.ml
index a9f85d897..8218f97dc 100644
--- a/plugins/dependencies/dependencies_main.ml
+++ b/plugins/dependencies/dependencies_main.ml
@@ -54,7 +54,7 @@ bap dependency /bin/ls --root=/mnt/image --ldconfig='cat ld.so.cache'
```
"
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
open Bap_main
diff --git a/plugins/disassemble/disassemble_main.ml b/plugins/disassemble/disassemble_main.ml
index c3882332f..ae0a60ba5 100644
--- a/plugins/disassemble/disassemble_main.ml
+++ b/plugins/disassemble/disassemble_main.ml
@@ -44,7 +44,7 @@ let man = {|
with the following contents:
```
- open Core_kernel
+ open Core_kernel[@@warning "-D"]
open Bap_main
open Bap.Std
@@ -83,7 +83,7 @@ let man = {|
|}
open Bap_knowledge
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_core_theory
open Regular.Std
@@ -302,7 +302,7 @@ let old_style_passes =
Extension.Command.switches
~doc:(sprintf "Enables the pass %s in the old style (DEPRECATED)")
(Plugins.list () |> List.map ~f:Plugin.name)
- ident
+ Fn.id
let passes =
Extension.Command.parameters
@@ -320,7 +320,7 @@ let outputs =
"dump"
let rw_file = Extension.Type.define
- ~name:"" ~print:ident ~parse:ident
+ ~name:"" ~print:Fn.id ~parse:Fn.id
~digest:(fun path ->
if Sys.file_exists path
then Caml.Digest.file path
diff --git a/plugins/disassemble/disassemble_main_rules.ml b/plugins/disassemble/disassemble_main_rules.ml
index 77abc76a7..5e95bdcd2 100644
--- a/plugins/disassemble/disassemble_main_rules.ml
+++ b/plugins/disassemble/disassemble_main_rules.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_main
diff --git a/plugins/dump_symbols/dump_symbols_main.ml b/plugins/dump_symbols/dump_symbols_main.ml
index 1a19c1e41..3056ded4d 100644
--- a/plugins/dump_symbols/dump_symbols_main.ml
+++ b/plugins/dump_symbols/dump_symbols_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Graphlib.Std
open Bap.Std
include Self()
diff --git a/plugins/elf_loader/elf_loader_main.ml b/plugins/elf_loader/elf_loader_main.ml
index 92429c3a1..5d391e05a 100644
--- a/plugins/elf_loader/elf_loader_main.ml
+++ b/plugins/elf_loader/elf_loader_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Or_error
open Bap.Std
diff --git a/plugins/emit_ida_script/emit_ida_script_main.ml b/plugins/emit_ida_script/emit_ida_script_main.ml
index 06aff9cae..8e166c57b 100644
--- a/plugins/emit_ida_script/emit_ida_script_main.ml
+++ b/plugins/emit_ida_script/emit_ida_script_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
include Self()
diff --git a/plugins/flatten/flatten_main.ml b/plugins/flatten/flatten_main.ml
index 3a3866eda..78f901757 100644
--- a/plugins/flatten/flatten_main.ml
+++ b/plugins/flatten/flatten_main.ml
@@ -1,5 +1,5 @@
open Bap.Std
-open Core_kernel
+open Core_kernel[@@warning "-D"]
include Self()
@@ -11,11 +11,11 @@ Config.manpage [
`P "Flatten all AST in the program.";
`S "EXAMPLE";
`Pre {|
- ;; input
+ ;; input
#10 := 11 * (#9 + 13) - 17
;; output
#11 := #9 + 13
- #12 := 11 * #11
+ #12 := 11 * #11
#10 := #12 - 17
|}
diff --git a/plugins/frontc_parser/frontc_parser_main.ml b/plugins/frontc_parser/frontc_parser_main.ml
index 56cec8c66..8a2dd198d 100644
--- a/plugins/frontc_parser/frontc_parser_main.ml
+++ b/plugins/frontc_parser/frontc_parser_main.ml
@@ -1,4 +1,4 @@
-open! Core_kernel
+open! Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_c.Std
include Self()
diff --git a/plugins/ghidra/ghidra_main.ml b/plugins/ghidra/ghidra_main.ml
index 7abe87ec8..510f31310 100644
--- a/plugins/ghidra/ghidra_main.ml
+++ b/plugins/ghidra/ghidra_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_main
let default_paths =
diff --git a/plugins/glibc_runtime/glibc_runtime_main.ml b/plugins/glibc_runtime/glibc_runtime_main.ml
index 3759a353e..286866ed1 100644
--- a/plugins/glibc_runtime/glibc_runtime_main.ml
+++ b/plugins/glibc_runtime/glibc_runtime_main.ml
@@ -3,7 +3,7 @@ Enables ad-hoc support for glibc runtime code. In particular it
detects the locations of $(b,main) and $(b,__libc_start_main)
functions (and adds the latter if it is absent).
"
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_main
open Bap_core_theory
open Bap.Std
@@ -96,7 +96,7 @@ let detect_main_address prog =
| _ -> None
-let reinsert_args_for_new_name ?(abi=ident) sub name =
+let reinsert_args_for_new_name ?(abi=Fn.id) sub name =
List.fold ~init:sub ~f:(|>) [
Term.filter arg_t ~f:(fun _ -> false);
(fun sub -> Term.del_attr sub C.proto);
diff --git a/plugins/ida/bap_ida_info.ml b/plugins/ida/bap_ida_info.ml
index 522ec52d3..0768e156d 100644
--- a/plugins/ida/bap_ida_info.ml
+++ b/plugins/ida/bap_ida_info.ml
@@ -1,7 +1,10 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
include Self()
+module Sys = Caml.Sys
+
+
type version = Vold | Vnew [@@deriving sexp, equal]
type old_kind = [ `idal | `idal64 | `idaq | `idaq64 ] [@@deriving sexp, enumerate, equal]
type new_kind = [ `idat | `idat64 | `ida | `ida64 ] [@@deriving sexp, enumerate, equal]
diff --git a/plugins/ida/bap_ida_info.mli b/plugins/ida/bap_ida_info.mli
index c92141664..c5c6f7704 100644
--- a/plugins/ida/bap_ida_info.mli
+++ b/plugins/ida/bap_ida_info.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type mode = [ `m32 | `m64 ]
diff --git a/plugins/ida/bap_ida_service.ml b/plugins/ida/bap_ida_service.ml
index 059b9f8d9..ea771b2fa 100644
--- a/plugins/ida/bap_ida_service.ml
+++ b/plugins/ida/bap_ida_service.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_ida.Std
open Bap.Std
@@ -7,6 +7,7 @@ include Self ()
module Buffer = Caml.Buffer
module Filename = Caml.Filename
module Unix = Caml_unix
+module Sys = Caml.Sys
module Info = Bap_ida_info
diff --git a/plugins/ida/ida_main.ml b/plugins/ida/ida_main.ml
index 29cb6b724..7b963241d 100644
--- a/plugins/ida/ida_main.ml
+++ b/plugins/ida/ida_main.ml
@@ -1,5 +1,5 @@
open Bap_knowledge
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_future.Std
open Bap.Std
diff --git a/plugins/llvm/llvm_main.ml b/plugins/llvm/llvm_main.ml
index ea14886ac..57b5da9dc 100644
--- a/plugins/llvm/llvm_main.ml
+++ b/plugins/llvm/llvm_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_llvm.Std
open Bap_main
diff --git a/plugins/map_terms/map_terms_features.ml b/plugins/map_terms/map_terms_features.ml
index d09545b6a..fc1d1663d 100644
--- a/plugins/map_terms/map_terms_features.ml
+++ b/plugins/map_terms/map_terms_features.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_bml
diff --git a/plugins/map_terms/map_terms_main.ml b/plugins/map_terms/map_terms_main.ml
index 288aa2673..d8b2cadc4 100644
--- a/plugins/map_terms/map_terms_main.ml
+++ b/plugins/map_terms/map_terms_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Bap_bml
diff --git a/plugins/mc/mc_main.ml b/plugins/mc/mc_main.ml
index 32359bf8b..dd0318ee6 100644
--- a/plugins/mc/mc_main.ml
+++ b/plugins/mc/mc_main.ml
@@ -74,7 +74,7 @@ raw code (i.e., no meta information), then use the $(b,raw) loader.
```
|}
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Format
open Regular.Std
open Bap.Std
@@ -256,7 +256,7 @@ let prepend_slash_x x = "\\x" ^ x
(** [to_binary ?escape s] make a binary string from ascii
representation, (e.g., "\x01\x02..."). Apply optional
escape function for each byte *)
-let to_binary ?(map=ident) s =
+let to_binary ?(map=Fn.id) s =
let seps = [' '; ','; ';'] in
let separated = List.exists seps ~f:(String.mem s) in
let bytes = if separated
diff --git a/plugins/mips/mips.ml b/plugins/mips/mips.ml
index c099a73f9..f0eba4da5 100644
--- a/plugins/mips/mips.ml
+++ b/plugins/mips/mips.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_core_theory
diff --git a/plugins/mips/mips_abi.ml b/plugins/mips/mips_abi.ml
index e95ccb0ff..dfdd85e6c 100644
--- a/plugins/mips/mips_abi.ml
+++ b/plugins/mips/mips_abi.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_c.Std
@@ -103,7 +103,7 @@ let set_abi proj m =
let module A = (val m : abi) in
let abi = C.Abi.{
insert_args = dispatch m (Project.arch proj);
- apply_attrs = fun _ -> ident
+ apply_attrs = fun _ -> Fn.id
} in
C.Abi.register A.name abi;
let api = C.Abi.create_api_processor A.size abi in
diff --git a/plugins/mips/mips_cpu.ml b/plugins/mips/mips_cpu.ml
index c8b77170a..eb4c81e45 100644
--- a/plugins/mips/mips_cpu.ml
+++ b/plugins/mips/mips_cpu.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Mips_rtl
diff --git a/plugins/mips/mips_dsl.ml b/plugins/mips/mips_dsl.ml
index 81fb2b5a2..46dcc3295 100644
--- a/plugins/mips/mips_dsl.ml
+++ b/plugins/mips/mips_dsl.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
open Mips_rtl
@@ -16,7 +16,7 @@ let doubleword = 64
let quadword = 128
let bitwidth x = x
-let int_of_bitwidth = ident
+let int_of_bitwidth = Fn.id
let width_of_size = Size.in_bits
diff --git a/plugins/mips/mips_dsl.mli b/plugins/mips/mips_dsl.mli
index bb776ffd1..188a8943b 100644
--- a/plugins/mips/mips_dsl.mli
+++ b/plugins/mips/mips_dsl.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Mips_rtl
diff --git a/plugins/mips/mips_main.ml b/plugins/mips/mips_main.ml
index f0c485760..efd0efe67 100644
--- a/plugins/mips/mips_main.ml
+++ b/plugins/mips/mips_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Mips.Std
diff --git a/plugins/mips/mips_model.ml b/plugins/mips/mips_model.ml
index 4f7a51c3f..d4530252a 100644
--- a/plugins/mips/mips_model.ml
+++ b/plugins/mips/mips_model.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Mips_rtl
diff --git a/plugins/mips/mips_model.mli b/plugins/mips/mips_model.mli
index 338223175..e57e2ca24 100644
--- a/plugins/mips/mips_model.mli
+++ b/plugins/mips/mips_model.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Mips_rtl
diff --git a/plugins/mips/mips_rtl.ml b/plugins/mips/mips_rtl.ml
index 72a9a1afe..d957362af 100644
--- a/plugins/mips/mips_rtl.ml
+++ b/plugins/mips/mips_rtl.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Mips_utils
diff --git a/plugins/mips/mips_rtl.mli b/plugins/mips/mips_rtl.mli
index 221976800..0c0b43c91 100644
--- a/plugins/mips/mips_rtl.mli
+++ b/plugins/mips/mips_rtl.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
type t [@@deriving bin_io, compare, sexp]
diff --git a/plugins/mips/mips_types.ml b/plugins/mips/mips_types.ml
index f9f166d23..d88e51f3e 100644
--- a/plugins/mips/mips_types.ml
+++ b/plugins/mips/mips_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Mips_rtl
diff --git a/plugins/mips/mips_utils.ml b/plugins/mips/mips_utils.ml
index bcb1d14db..563e5f41a 100644
--- a/plugins/mips/mips_utils.ml
+++ b/plugins/mips/mips_utils.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
let mips_fail format =
diff --git a/plugins/objdump/objdump_main.ml b/plugins/objdump/objdump_main.ml
index b2bd20558..91541a3e5 100644
--- a/plugins/objdump/objdump_main.ml
+++ b/plugins/objdump/objdump_main.ml
@@ -26,7 +26,7 @@ $(b,bap-plugin-ida)(1)
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Objdump_config
open Bap_main
@@ -96,7 +96,7 @@ let with_objdump_output demangler ~file ~f ~init =
List.fold_until ~init ~f:(fun data objdump ->
let cmd = sprintf "%s %S" objdump file in
run cmd ~f ~init:data)
- ~finish:ident
+ ~finish:Fn.id
let agent =
KB.Agent.register ~package:"bap" "objdump-symbolizer"
@@ -160,12 +160,12 @@ end = struct
names
let to_real size = function
- | None -> ident
+ | None -> Fn.id
| Some bias -> fun addr ->
Bitvec.((addr - bias) mod modulus size)
let of_real size = function
- | None -> ident
+ | None -> Fn.id
| Some bias -> fun addr ->
Bitvec.((addr + bias) mod modulus size)
@@ -200,7 +200,7 @@ let provide_function_starts_and_names ctxt : unit =
declare "subroutines" addr is_subroutine;
declare "names" addr possible_name;
property KB.promise is_subroutine addr is_known;
- property (KB.propose agent) possible_name addr ident
+ property (KB.propose agent) possible_name addr Fn.id
let main ctxt =
provide_function_starts_and_names ctxt;
diff --git a/plugins/optimization/optimization_data.ml b/plugins/optimization/optimization_data.ml
index 8233eaa16..15c07407e 100644
--- a/plugins/optimization/optimization_data.ml
+++ b/plugins/optimization/optimization_data.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
open Graphlib.Std
@@ -108,7 +108,7 @@ let update sub {updates} =
Term.map def_t b ~f:(update_def updates) |>
Term.map jmp_t ~f:(update_jmp updates))
-let filter_map_alive deads cls ?(f=ident) x =
+let filter_map_alive deads cls ?(f=Fn.id) x =
Term.filter_map cls x ~f:(fun t ->
if Set.mem deads (Term.tid t) then None
else Some (f t))
diff --git a/plugins/optimization/optimization_data.mli b/plugins/optimization/optimization_data.mli
index a76dc514d..911247217 100644
--- a/plugins/optimization/optimization_data.mli
+++ b/plugins/optimization/optimization_data.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
diff --git a/plugins/optimization/optimization_main.ml b/plugins/optimization/optimization_main.ml
index 5fb23fe46..374c5678a 100644
--- a/plugins/optimization/optimization_main.ml
+++ b/plugins/optimization/optimization_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
open Format
diff --git a/plugins/patterns/patterns_main.ml b/plugins/patterns/patterns_main.ml
index 55402e85f..8406ad09c 100644
--- a/plugins/patterns/patterns_main.ml
+++ b/plugins/patterns/patterns_main.ml
@@ -108,7 +108,7 @@ let doc = "
"
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_main
@@ -831,9 +831,9 @@ module Target = struct
| _ -> fail Wrong_endianness in
let variant = match List.hd rest with
| None -> None
- | Some var -> with_default var ident in
+ | Some var -> with_default var Fn.id in
let compiler = match rest with
- | [_;comp] -> with_default comp ident
+ | [_;comp] -> with_default comp Fn.id
| _ -> None in
Spec {arch; bits; order; variant; compiler}
diff --git a/plugins/phoenix/phoenix_dot.ml b/plugins/phoenix/phoenix_dot.ml
index 1d4301e6d..bae297eb4 100644
--- a/plugins/phoenix/phoenix_dot.ml
+++ b/plugins/phoenix/phoenix_dot.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Graphlib.Std
open Phoenix_options
diff --git a/plugins/phoenix/phoenix_dot.mli b/plugins/phoenix/phoenix_dot.mli
index f11dd7839..57bd16d2a 100644
--- a/plugins/phoenix/phoenix_dot.mli
+++ b/plugins/phoenix/phoenix_dot.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module Make(Env : sig
diff --git a/plugins/phoenix/phoenix_helpers.ml b/plugins/phoenix/phoenix_helpers.ml
index 236a0b504..47650b0d5 100644
--- a/plugins/phoenix/phoenix_helpers.ml
+++ b/plugins/phoenix/phoenix_helpers.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Phoenix_options
diff --git a/plugins/phoenix/phoenix_helpers.mli b/plugins/phoenix/phoenix_helpers.mli
index 39e6701d8..315509f7a 100644
--- a/plugins/phoenix/phoenix_helpers.mli
+++ b/plugins/phoenix/phoenix_helpers.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
(** [bil_of_block blk] *)
diff --git a/plugins/phoenix/phoenix_main.ml b/plugins/phoenix/phoenix_main.ml
index cf4fe92b0..fc2a69b96 100644
--- a/plugins/phoenix/phoenix_main.ml
+++ b/plugins/phoenix/phoenix_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
diff --git a/plugins/phoenix/phoenix_options.ml b/plugins/phoenix/phoenix_options.ml
index 709e86dbc..53ebf9039 100644
--- a/plugins/phoenix/phoenix_options.ml
+++ b/plugins/phoenix/phoenix_options.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
type label_format = [ `with_asm | `with_bil | `with_name ]
diff --git a/plugins/phoenix/phoenix_output.ml b/plugins/phoenix/phoenix_output.ml
index 7b089c189..c1a6bf493 100644
--- a/plugins/phoenix/phoenix_output.ml
+++ b/plugins/phoenix/phoenix_output.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Graphlib.Std
open Bap.Std
open Phoenix_options
diff --git a/plugins/phoenix/phoenix_output.mli b/plugins/phoenix/phoenix_output.mli
index 1c6597a2c..355cecc5b 100644
--- a/plugins/phoenix/phoenix_output.mli
+++ b/plugins/phoenix/phoenix_output.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
diff --git a/plugins/phoenix/phoenix_printing.ml b/plugins/phoenix/phoenix_printing.ml
index c53662e89..61c40d10a 100644
--- a/plugins/phoenix/phoenix_printing.ml
+++ b/plugins/phoenix/phoenix_printing.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Graphlib.Std
open Bap.Std
open Format
diff --git a/plugins/phoenix/phoenix_printing.mli b/plugins/phoenix/phoenix_printing.mli
index 1c262820e..a7ad4c9ba 100644
--- a/plugins/phoenix/phoenix_printing.mli
+++ b/plugins/phoenix/phoenix_printing.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
type 'a pp = Format.formatter -> 'a -> unit
diff --git a/plugins/phoenix/phoenix_root.ml b/plugins/phoenix/phoenix_root.ml
index a0f602bc3..02142002b 100644
--- a/plugins/phoenix/phoenix_root.ml
+++ b/plugins/phoenix/phoenix_root.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Sys = Caml.Sys
module Unix = Caml_unix
diff --git a/plugins/piqi_printers/piqi_printers_main.ml b/plugins/piqi_printers/piqi_printers_main.ml
index 4e9763a9e..52f3f3994 100644
--- a/plugins/piqi_printers/piqi_printers_main.ml
+++ b/plugins/piqi_printers/piqi_printers_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
include Self()
diff --git a/plugins/powerpc/powerpc.ml b/plugins/powerpc/powerpc.ml
index aac5fde1c..18d5e7053 100644
--- a/plugins/powerpc/powerpc.ml
+++ b/plugins/powerpc/powerpc.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Powerpc_types
diff --git a/plugins/powerpc/powerpc.mli b/plugins/powerpc/powerpc.mli
index ee518a1a6..9ac219d38 100644
--- a/plugins/powerpc/powerpc.mli
+++ b/plugins/powerpc/powerpc.mli
@@ -330,7 +330,7 @@
doubleword.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module Std : sig
diff --git a/plugins/powerpc/powerpc_abi.ml b/plugins/powerpc/powerpc_abi.ml
index c0c8cfad6..9644222c3 100644
--- a/plugins/powerpc/powerpc_abi.ml
+++ b/plugins/powerpc/powerpc_abi.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_c.Std
@@ -78,7 +78,7 @@ let main proj = match Project.arch proj with
info "using powerpc ABI";
let abi = C.Abi.{
insert_args = dispatch (module Abi32);
- apply_attrs = fun _ -> ident
+ apply_attrs = fun _ -> Fn.id
} in
C.Abi.register Abi32.name abi;
let api = C.Abi.create_api_processor Abi32.size abi in
diff --git a/plugins/powerpc/powerpc_cpu.ml b/plugins/powerpc/powerpc_cpu.ml
index 8fd70abae..c0ac77d04 100644
--- a/plugins/powerpc/powerpc_cpu.ml
+++ b/plugins/powerpc/powerpc_cpu.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Powerpc_rtl
open Powerpc_dsl
diff --git a/plugins/powerpc/powerpc_dsl.ml b/plugins/powerpc/powerpc_dsl.ml
index 3682f3e9d..c1664d590 100644
--- a/plugins/powerpc/powerpc_dsl.ml
+++ b/plugins/powerpc/powerpc_dsl.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Regular.Std
@@ -17,7 +17,7 @@ let doubleword = 64
let quadword = 128
let bitwidth x = x
-let int_of_bitwidth = ident
+let int_of_bitwidth = Fn.id
let width_of_size = Size.in_bits
diff --git a/plugins/powerpc/powerpc_dsl.mli b/plugins/powerpc/powerpc_dsl.mli
index bdb2ec93e..f83c29ede 100644
--- a/plugins/powerpc/powerpc_dsl.mli
+++ b/plugins/powerpc/powerpc_dsl.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Powerpc_rtl
diff --git a/plugins/powerpc/powerpc_main.ml b/plugins/powerpc/powerpc_main.ml
index 6afc34ead..6d9427831 100644
--- a/plugins/powerpc/powerpc_main.ml
+++ b/plugins/powerpc/powerpc_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Powerpc.Std
diff --git a/plugins/powerpc/powerpc_model.ml b/plugins/powerpc/powerpc_model.ml
index 866a63e7a..26bd12c2a 100644
--- a/plugins/powerpc/powerpc_model.ml
+++ b/plugins/powerpc/powerpc_model.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Powerpc_rtl
diff --git a/plugins/powerpc/powerpc_model.mli b/plugins/powerpc/powerpc_model.mli
index 2cbf54168..286bebf1d 100644
--- a/plugins/powerpc/powerpc_model.mli
+++ b/plugins/powerpc/powerpc_model.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Powerpc_rtl
diff --git a/plugins/powerpc/powerpc_rtl.ml b/plugins/powerpc/powerpc_rtl.ml
index b4cfe1a37..c2c62bd7b 100644
--- a/plugins/powerpc/powerpc_rtl.ml
+++ b/plugins/powerpc/powerpc_rtl.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Powerpc_utils
diff --git a/plugins/powerpc/powerpc_rtl.mli b/plugins/powerpc/powerpc_rtl.mli
index 23349099b..8f1787240 100644
--- a/plugins/powerpc/powerpc_rtl.mli
+++ b/plugins/powerpc/powerpc_rtl.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
type t [@@deriving bin_io, compare, sexp]
diff --git a/plugins/powerpc/powerpc_utils.ml b/plugins/powerpc/powerpc_utils.ml
index 946f0ffef..f64ec4f2d 100644
--- a/plugins/powerpc/powerpc_utils.ml
+++ b/plugins/powerpc/powerpc_utils.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
let ppc_fail format =
diff --git a/plugins/primus_approximation/approximation.ml b/plugins/primus_approximation/approximation.ml
index 5d0fd15a4..aa93c74cf 100644
--- a/plugins/primus_approximation/approximation.ml
+++ b/plugins/primus_approximation/approximation.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_primus.Std
open Bap.Std
open Monads.Std
diff --git a/plugins/primus_dictionary/primus_dictionary_main.ml b/plugins/primus_dictionary/primus_dictionary_main.ml
index a50174a13..e731cbd18 100644
--- a/plugins/primus_dictionary/primus_dictionary_main.ml
+++ b/plugins/primus_dictionary/primus_dictionary_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_primus.Std
diff --git a/plugins/primus_exploring/primus_exploring_main.ml b/plugins/primus_exploring/primus_exploring_main.ml
index 34e89b1dc..7bdf710d8 100644
--- a/plugins/primus_exploring/primus_exploring_main.ml
+++ b/plugins/primus_exploring/primus_exploring_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_primus.Std
diff --git a/plugins/primus_greedy/primus_greedy_main.ml b/plugins/primus_greedy/primus_greedy_main.ml
index 62401688e..6122bde54 100644
--- a/plugins/primus_greedy/primus_greedy_main.ml
+++ b/plugins/primus_greedy/primus_greedy_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
open Monads.Std
diff --git a/plugins/primus_limit/primus_limit_main.ml b/plugins/primus_limit/primus_limit_main.ml
index cea812b7b..750345cf1 100644
--- a/plugins/primus_limit/primus_limit_main.ml
+++ b/plugins/primus_limit/primus_limit_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_primus.Std
diff --git a/plugins/primus_lisp/primus_lisp_documentation.ml b/plugins/primus_lisp/primus_lisp_documentation.ml
index 246deeb12..090d80a5a 100644
--- a/plugins/primus_lisp/primus_lisp_documentation.ml
+++ b/plugins/primus_lisp/primus_lisp_documentation.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_main
open Bap.Std
diff --git a/plugins/primus_lisp/primus_lisp_ieee754.ml b/plugins/primus_lisp/primus_lisp_ieee754.ml
index 2125a8974..b07bf4475 100644
--- a/plugins/primus_lisp/primus_lisp_ieee754.ml
+++ b/plugins/primus_lisp/primus_lisp_ieee754.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
diff --git a/plugins/primus_lisp/primus_lisp_io.ml b/plugins/primus_lisp/primus_lisp_io.ml
index 993fbc097..0f20aeb64 100644
--- a/plugins/primus_lisp/primus_lisp_io.ml
+++ b/plugins/primus_lisp/primus_lisp_io.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_primus.Std
diff --git a/plugins/primus_lisp/primus_lisp_main.ml b/plugins/primus_lisp/primus_lisp_main.ml
index 395829dcb..e3442a804 100644
--- a/plugins/primus_lisp/primus_lisp_main.ml
+++ b/plugins/primus_lisp/primus_lisp_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Monads.Std
diff --git a/plugins/primus_lisp/primus_lisp_primitives.ml b/plugins/primus_lisp/primus_lisp_primitives.ml
index 8982e04fa..6f9356ca5 100644
--- a/plugins/primus_lisp/primus_lisp_primitives.ml
+++ b/plugins/primus_lisp/primus_lisp_primitives.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_primus.Std
diff --git a/plugins/primus_lisp/primus_lisp_run.ml b/plugins/primus_lisp/primus_lisp_run.ml
index 247decc29..fce56586a 100644
--- a/plugins/primus_lisp/primus_lisp_run.ml
+++ b/plugins/primus_lisp/primus_lisp_run.ml
@@ -1,6 +1,6 @@
let doc = "Runs the Primus lisp program."
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_main
open Extension.Syntax
diff --git a/plugins/primus_lisp/primus_lisp_semantic_primitives.ml b/plugins/primus_lisp/primus_lisp_semantic_primitives.ml
index 63dae346f..0bf5800f7 100644
--- a/plugins/primus_lisp/primus_lisp_semantic_primitives.ml
+++ b/plugins/primus_lisp/primus_lisp_semantic_primitives.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_primus.Std
open KB.Syntax
@@ -635,7 +635,7 @@ module Primitives(CT : Theory.Core)(T : Target) = struct
unary xs >>= bitv >>= fun addr ->
forget@@CT.(loadw s b mem !!addr)
- let load_word = word_loader ident
+ let load_word = word_loader Fn.id
let load_half = word_loader (fun s -> s / 2)
let load_double = word_loader @@ ( * ) 2
let load_quad = word_loader @@ ( * ) 4
diff --git a/plugins/primus_lisp/primus_lisp_show.ml b/plugins/primus_lisp/primus_lisp_show.ml
index 815220193..ab707e1d9 100644
--- a/plugins/primus_lisp/primus_lisp_show.ml
+++ b/plugins/primus_lisp/primus_lisp_show.ml
@@ -36,7 +36,7 @@ bap show foo --primus-lisp-load=demo -tarmv5+le -obap:bil
"
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_main
open Bap.Std
diff --git a/plugins/primus_loader/primus_loader_basic.ml b/plugins/primus_loader/primus_loader_basic.ml
index 1f7ad5eb7..2ca0221fd 100644
--- a/plugins/primus_loader/primus_loader_basic.ml
+++ b/plugins/primus_loader/primus_loader_basic.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_primus.Std
@@ -76,7 +76,7 @@ module Make(Param : Param)(Machine : Primus.Machine.S) = struct
Ogre.foreach Ogre.Query.(begin
select (from segment)
end)
- ~f:ident
+ ~f:Fn.id
let get_segmentations proj =
match Project.get proj Image.specification with
diff --git a/plugins/primus_loader/primus_loader_main.ml b/plugins/primus_loader/primus_loader_main.ml
index 2d666f3d3..1218fb2ae 100644
--- a/plugins/primus_loader/primus_loader_main.ml
+++ b/plugins/primus_loader/primus_loader_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
include Self()
diff --git a/plugins/primus_powerpc/primus_powerpc_main.ml b/plugins/primus_powerpc/primus_powerpc_main.ml
index 8cc69279e..eb00ec702 100644
--- a/plugins/primus_powerpc/primus_powerpc_main.ml
+++ b/plugins/primus_powerpc/primus_powerpc_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
diff --git a/plugins/primus_print/primus_print_main.ml b/plugins/primus_print/primus_print_main.ml
index 93613728e..d445d1c7f 100644
--- a/plugins/primus_print/primus_print_main.ml
+++ b/plugins/primus_print/primus_print_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_primus.Std
diff --git a/plugins/primus_promiscuous/primus_promiscuous_main.ml b/plugins/primus_promiscuous/primus_promiscuous_main.ml
index 6106fc863..f2a480737 100644
--- a/plugins/primus_promiscuous/primus_promiscuous_main.ml
+++ b/plugins/primus_promiscuous/primus_promiscuous_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_primus.Std
diff --git a/plugins/primus_propagate_taint/primus_propagate_taint_main.ml b/plugins/primus_propagate_taint/primus_propagate_taint_main.ml
index 13826d5fa..3a915e7b1 100644
--- a/plugins/primus_propagate_taint/primus_propagate_taint_main.ml
+++ b/plugins/primus_propagate_taint/primus_propagate_taint_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_primus.Std
diff --git a/plugins/primus_random/primus_random_main.ml b/plugins/primus_random/primus_random_main.ml
index b5650136e..9303020f6 100644
--- a/plugins/primus_random/primus_random_main.ml
+++ b/plugins/primus_random/primus_random_main.ml
@@ -179,7 +179,7 @@ when the $(b,--primus-promiscuous-mode) is enabled.
|}
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_main
open Bap.Std
@@ -337,7 +337,7 @@ module Generator = struct
let max = Option.value_exn max
let next i = i
let value i = xs.(i mod Array.length xs)
- end) 0 ~to_bitvec:ident ?width
+ end) 0 ~to_bitvec:Fn.id ?width
let create ?seed ?width n ps = match n with
diff --git a/plugins/primus_region/primus_region_main.ml b/plugins/primus_region/primus_region_main.ml
index bb135f099..ed2292717 100644
--- a/plugins/primus_region/primus_region_main.ml
+++ b/plugins/primus_region/primus_region_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_primus.Std
diff --git a/plugins/primus_round_robin/primus_round_robin_main.ml b/plugins/primus_round_robin/primus_round_robin_main.ml
index 38e9a0dd1..1d3d9a14b 100644
--- a/plugins/primus_round_robin/primus_round_robin_main.ml
+++ b/plugins/primus_round_robin/primus_round_robin_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_primus.Std
diff --git a/plugins/primus_symbolic_executor/primus_symbolic_executor_main.ml b/plugins/primus_symbolic_executor/primus_symbolic_executor_main.ml
index 3aec3cfdb..35733d635 100644
--- a/plugins/primus_symbolic_executor/primus_symbolic_executor_main.ml
+++ b/plugins/primus_symbolic_executor/primus_symbolic_executor_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_primus.Std
@@ -335,7 +335,7 @@ end = struct
module Value = struct
type t = value
- let to_formula = ident
+ let to_formula = Fn.id
let to_bigint x =
let s = Expr.to_string x in
let len = String.length s in
diff --git a/plugins/primus_systems/primus_systems_main.ml b/plugins/primus_systems/primus_systems_main.ml
index 04e91550b..0a155e6c6 100644
--- a/plugins/primus_systems/primus_systems_main.ml
+++ b/plugins/primus_systems/primus_systems_main.ml
@@ -41,7 +41,7 @@ corresponding command help pages for more information.
```
|}
open Bap_knowledge
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_main
open Bap_primus.Std
open Format
diff --git a/plugins/primus_taint/primus_taint_main.ml b/plugins/primus_taint/primus_taint_main.ml
index 15dcaec1a..b60680f6c 100644
--- a/plugins/primus_taint/primus_taint_main.ml
+++ b/plugins/primus_taint/primus_taint_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Bap_primus.Std
diff --git a/plugins/primus_taint/primus_taint_policies.ml b/plugins/primus_taint/primus_taint_policies.ml
index e32c56227..1b8bc6dfd 100644
--- a/plugins/primus_taint/primus_taint_policies.ml
+++ b/plugins/primus_taint/primus_taint_policies.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_primus.Std
open Bap_taint.Std
open Format
diff --git a/plugins/primus_test/primus_test_main.ml b/plugins/primus_test/primus_test_main.ml
index cb263223b..d4909f0e4 100644
--- a/plugins/primus_test/primus_test_main.ml
+++ b/plugins/primus_test/primus_test_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_primus.Std
open Monads.Std
diff --git a/plugins/primus_wandering/primus_wandering_main.ml b/plugins/primus_wandering/primus_wandering_main.ml
index ca9c3a0e4..c57847024 100644
--- a/plugins/primus_wandering/primus_wandering_main.ml
+++ b/plugins/primus_wandering/primus_wandering_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_future.Std
diff --git a/plugins/primus_x86/primus_x86_loader.ml b/plugins/primus_x86/primus_x86_loader.ml
index ad0fa3e1d..de18adb28 100644
--- a/plugins/primus_x86/primus_x86_loader.ml
+++ b/plugins/primus_x86/primus_x86_loader.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open Bap_primus.Std
diff --git a/plugins/print/print_main.ml b/plugins/print/print_main.ml
index 5d2ecc001..c4e18b66f 100644
--- a/plugins/print/print_main.ml
+++ b/plugins/print/print_main.ml
@@ -1,5 +1,5 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Graphlib.Std
open Bap.Std
@@ -22,13 +22,13 @@ let find_in_memory extract element proj addr =
let properties = [
"symbol", {
- extract = find_in_memory ident Image.symbol;
+ extract = find_in_memory Fn.id Image.symbol;
explain = "name of the enclosing symbol, where the symbol is \
looked up in the file symbol table or debuging \
information, if any";
};
"section", {
- extract = find_in_memory ident Image.section;
+ extract = find_in_memory Fn.id Image.section;
explain = "name of the enclosing section of the file";
};
"segment", {
@@ -66,7 +66,7 @@ let print_spec ppf proj =
| Some spec -> Format.fprintf ppf "%a" Ogre.Doc.pp spec
let create_demangler = function
- | None -> ident
+ | None -> Fn.id
| Some name ->
Demanglers.available () |>
List.find ~f:(fun d -> String.equal (Demangler.name d) name) |> function
diff --git a/plugins/propagate_taint/propagate_taint_main.ml b/plugins/propagate_taint/propagate_taint_main.ml
index dce4a422d..78dff78a5 100644
--- a/plugins/propagate_taint/propagate_taint_main.ml
+++ b/plugins/propagate_taint/propagate_taint_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Graphlib.Std
open Bap.Std
diff --git a/plugins/propagate_taint/propagator.ml b/plugins/propagate_taint/propagator.ml
index 861494f76..cb0aae100 100644
--- a/plugins/propagate_taint/propagator.ml
+++ b/plugins/propagate_taint/propagator.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Regular.Std
open Bap.Std
diff --git a/plugins/propagate_taint/propagator.mli b/plugins/propagate_taint/propagator.mli
index 83506cc87..6ffdf27a3 100644
--- a/plugins/propagate_taint/propagator.mli
+++ b/plugins/propagate_taint/propagator.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
diff --git a/plugins/radare2/radare2_main.ml b/plugins/radare2/radare2_main.ml
index 03ae46876..736d22220 100644
--- a/plugins/radare2/radare2_main.ml
+++ b/plugins/radare2/radare2_main.ml
@@ -1,5 +1,5 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_future.Std
open Bap.Std
include Self()
diff --git a/plugins/raw/raw_main.ml b/plugins/raw/raw_main.ml
index 14b4257e4..aba396903 100644
--- a/plugins/raw/raw_main.ml
+++ b/plugins/raw/raw_main.ml
@@ -9,7 +9,7 @@ form the outside.
open Bap.Std
open Bap_main
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Extension.Syntax
module Buffer = Caml.Buffer
diff --git a/plugins/read_symbols/read_symbols_main.ml b/plugins/read_symbols/read_symbols_main.ml
index 56f454fbf..6ebd46a7f 100644
--- a/plugins/read_symbols/read_symbols_main.ml
+++ b/plugins/read_symbols/read_symbols_main.ml
@@ -84,7 +84,7 @@ bap \\$binary --read-symbols-from=mv.scm --read-symbols-when-matches
"
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_main
open Bap_core_theory
open KB.Syntax
diff --git a/plugins/relocatable/rel_symbolizer.ml b/plugins/relocatable/rel_symbolizer.ml
index 1fbd6acda..190509066 100644
--- a/plugins/relocatable/rel_symbolizer.ml
+++ b/plugins/relocatable/rel_symbolizer.ml
@@ -15,7 +15,7 @@ $(b,bap-plugin-llvm)(1)
open Bap_main
open Bap_knowledge
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_core_theory
diff --git a/plugins/report/report_main.ml b/plugins/report/report_main.ml
index ee6ba6081..3fa955f27 100644
--- a/plugins/report/report_main.ml
+++ b/plugins/report/report_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_future.Std
open Format
diff --git a/plugins/resolve_indirects/resolve_indirects_main.ml b/plugins/resolve_indirects/resolve_indirects_main.ml
index 571213bcd..8767015e7 100644
--- a/plugins/resolve_indirects/resolve_indirects_main.ml
+++ b/plugins/resolve_indirects/resolve_indirects_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
(** substitute loads with the value of corresponding memory *)
diff --git a/plugins/riscv/riscv_main.ml b/plugins/riscv/riscv_main.ml
index 45d1ebb32..6b80e309a 100644
--- a/plugins/riscv/riscv_main.ml
+++ b/plugins/riscv/riscv_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_main
open Bap.Std
open Bap_core_theory
diff --git a/plugins/run/run_main.ml b/plugins/run/run_main.ml
index e4518b9e8..e66d67c26 100644
--- a/plugins/run/run_main.ml
+++ b/plugins/run/run_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_core_theory
open Bap.Std
diff --git a/plugins/specification/specification_main.ml b/plugins/specification/specification_main.ml
index 88ee03bae..ba006f93e 100644
--- a/plugins/specification/specification_main.ml
+++ b/plugins/specification/specification_main.ml
@@ -5,7 +5,7 @@ Displays information about the binary. The information is printed in
the OGRE format.
"
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_main
open Bap.Std
open Regular.Std
diff --git a/plugins/strings/strings_main.ml b/plugins/strings/strings_main.ml
index f005e9bba..5b513eafa 100644
--- a/plugins/strings/strings_main.ml
+++ b/plugins/strings/strings_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap.Std
open Bap_strings.Std
diff --git a/plugins/stub_resolver/run_stub_resolver_tests.ml b/plugins/stub_resolver/run_stub_resolver_tests.ml
index 5c69db379..133d2e116 100644
--- a/plugins/stub_resolver/run_stub_resolver_tests.ml
+++ b/plugins/stub_resolver/run_stub_resolver_tests.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open OUnit2
let suite = "Stub_resolver" >::: [
diff --git a/plugins/stub_resolver/stub_resolver.ml b/plugins/stub_resolver/stub_resolver.ml
index 284eb418a..95718ec63 100644
--- a/plugins/stub_resolver/stub_resolver.ml
+++ b/plugins/stub_resolver/stub_resolver.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_core_theory
open Bap_knowledge
diff --git a/plugins/stub_resolver/stub_resolver.mli b/plugins/stub_resolver/stub_resolver.mli
index 66ff31f1d..7380211be 100644
--- a/plugins/stub_resolver/stub_resolver.mli
+++ b/plugins/stub_resolver/stub_resolver.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_core_theory
open Bap_knowledge
diff --git a/plugins/stub_resolver/stub_resolver_main.ml b/plugins/stub_resolver/stub_resolver_main.ml
index e64ff073a..978afd50e 100644
--- a/plugins/stub_resolver/stub_resolver_main.ml
+++ b/plugins/stub_resolver/stub_resolver_main.ml
@@ -37,7 +37,7 @@ for more details on the format of accepted inputs):
|}
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_core_theory
open Bap_knowledge
diff --git a/plugins/stub_resolver/stub_resolver_tests.ml b/plugins/stub_resolver/stub_resolver_tests.ml
index ebf4c8d94..5e7112298 100644
--- a/plugins/stub_resolver/stub_resolver_tests.ml
+++ b/plugins/stub_resolver/stub_resolver_tests.ml
@@ -18,7 +18,7 @@
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_knowledge
open Bap.Std
diff --git a/plugins/systemz/systemz_lifter.ml b/plugins/systemz/systemz_lifter.ml
index 5d37b3ae6..6b3eb56d1 100644
--- a/plugins/systemz/systemz_lifter.ml
+++ b/plugins/systemz/systemz_lifter.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
@@ -15,7 +15,7 @@ let make_regs regs =
Map.find_exn regs
let gpr = make_regs Target.gpr
-let regnum s = Scanf.sscanf s "R%d" ident
+let regnum s = Scanf.sscanf s "R%d" Fn.id
(** [require_gpr insn n f] parses the machine instruction operands and
requires that the [n]th register should be a GPR register and if
diff --git a/plugins/taint/taint_main.ml b/plugins/taint/taint_main.ml
index e59a0c768..7e400db74 100644
--- a/plugins/taint/taint_main.ml
+++ b/plugins/taint/taint_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
include Self()
open Format
diff --git a/plugins/thumb/thumb_branch.ml b/plugins/thumb/thumb_branch.ml
index 4e2603b01..a2c3720ea 100644
--- a/plugins/thumb/thumb_branch.ml
+++ b/plugins/thumb/thumb_branch.ml
@@ -1,5 +1,5 @@
open Bap_core_theory
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open KB.Syntax
open Thumb_core
diff --git a/plugins/thumb/thumb_core.ml b/plugins/thumb/thumb_core.ml
index 53f2593ed..ccf9e1177 100644
--- a/plugins/thumb/thumb_core.ml
+++ b/plugins/thumb/thumb_core.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open KB.Syntax
diff --git a/plugins/thumb/thumb_env.ml b/plugins/thumb/thumb_env.ml
index 480ee741d..1ea96f52c 100644
--- a/plugins/thumb/thumb_env.ml
+++ b/plugins/thumb/thumb_env.ml
@@ -1,7 +1,7 @@
(* This module is left temporary for backward compatibility,
we will remove it later.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open KB.Syntax
diff --git a/plugins/thumb/thumb_main.ml b/plugins/thumb/thumb_main.ml
index 17f367c9c..57af81133 100644
--- a/plugins/thumb/thumb_main.ml
+++ b/plugins/thumb/thumb_main.ml
@@ -1,6 +1,6 @@
let package = "bap"
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap.Std
open KB.Syntax
diff --git a/plugins/thumb/thumb_opcodes.ml b/plugins/thumb/thumb_opcodes.ml
index e6678bf99..25afd57c8 100644
--- a/plugins/thumb/thumb_opcodes.ml
+++ b/plugins/thumb/thumb_opcodes.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
(* all the `mov` series, registers marked with `e` means extended *)
diff --git a/plugins/trace/trace_main.ml b/plugins/trace/trace_main.ml
index 8ac83934a..b89712b72 100644
--- a/plugins/trace/trace_main.ml
+++ b/plugins/trace/trace_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_plugins.Std
open Bap_future.Std
open Bap.Std
diff --git a/plugins/trivial_condition_form/trivial_condition_form_main.ml b/plugins/trivial_condition_form/trivial_condition_form_main.ml
index 4283bdfdf..abfd1a16e 100644
--- a/plugins/trivial_condition_form/trivial_condition_form_main.ml
+++ b/plugins/trivial_condition_form/trivial_condition_form_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
diff --git a/plugins/warn_unused/warn_unused_main.ml b/plugins/warn_unused/warn_unused_main.ml
index ffb41ea09..2c0077ebb 100644
--- a/plugins/warn_unused/warn_unused_main.ml
+++ b/plugins/warn_unused/warn_unused_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
include Self()
open Format
diff --git a/plugins/x86/x86_abi.ml b/plugins/x86/x86_abi.ml
index 75260a251..f8a3ac208 100644
--- a/plugins/x86/x86_abi.ml
+++ b/plugins/x86/x86_abi.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_c.Std
open Bap_future.Std
@@ -57,7 +57,7 @@ module SysV = struct
let size = object
inherit C.Size.base `LP64
end
- let demangle = ident
+ let demangle = Fn.id
let autodetect _ = false
end
@@ -76,7 +76,7 @@ module CDECL = struct
inherit C.Size.base `ILP32
end
- let demangle = ident
+ let demangle = Fn.id
let autodetect _ = false
end
@@ -256,7 +256,7 @@ let setup ?(abi=fun _ -> None) () =
info "using %s ABI" Abi.name;
let abi = C.Abi.{
insert_args = dispatch abi;
- apply_attrs = fun _ -> ident
+ apply_attrs = fun _ -> Fn.id
} in
C.Abi.register Abi.name abi;
let api = C.Abi.create_api_processor Abi.size abi in
diff --git a/plugins/x86/x86_backend.ml b/plugins/x86/x86_backend.ml
index 8c05c8e41..1c4ff9d5f 100644
--- a/plugins/x86/x86_backend.ml
+++ b/plugins/x86/x86_backend.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Or_error
open Bap.Std
open X86_tools_types
diff --git a/plugins/x86/x86_backend.mli b/plugins/x86/x86_backend.mli
index 4b092d2ea..6ef3308a2 100644
--- a/plugins/x86/x86_backend.mli
+++ b/plugins/x86/x86_backend.mli
@@ -1,10 +1,10 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
type opcode = string
module type S = sig
- val register : opcode -> lifter -> unit
+ val register : opcode -> lifter -> unit
module Make (T : Target) : Target
end
diff --git a/plugins/x86/x86_btx.ml b/plugins/x86/x86_btx.ml
index 211b5be45..52ace8945 100644
--- a/plugins/x86/x86_btx.ml
+++ b/plugins/x86/x86_btx.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_opcode_btx
diff --git a/plugins/x86/x86_cdq.ml b/plugins/x86/x86_cdq.ml
index 860f94fd0..ab870a3d5 100644
--- a/plugins/x86/x86_cdq.ml
+++ b/plugins/x86/x86_cdq.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_opcode_cdq
diff --git a/plugins/x86/x86_cmpxchg.ml b/plugins/x86/x86_cmpxchg.ml
index 91ed823d2..28b73eb65 100644
--- a/plugins/x86/x86_cmpxchg.ml
+++ b/plugins/x86/x86_cmpxchg.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_opcode_cmpxchg
open X86_asm.Reg
diff --git a/plugins/x86/x86_disasm.ml b/plugins/x86/x86_disasm.ml
index 57de18dc4..43c852fe6 100644
--- a/plugins/x86/x86_disasm.ml
+++ b/plugins/x86/x86_disasm.ml
@@ -1,5 +1,5 @@
(** Native lifter of x86 instructions to the BAP IL *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_types
diff --git a/plugins/x86/x86_disasm.mli b/plugins/x86/x86_disasm.mli
index 820416d64..e440cab1d 100644
--- a/plugins/x86/x86_disasm.mli
+++ b/plugins/x86/x86_disasm.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_types
diff --git a/plugins/x86/x86_endbr.ml b/plugins/x86/x86_endbr.ml
index 49055c931..a0c7acf84 100644
--- a/plugins/x86/x86_endbr.ml
+++ b/plugins/x86/x86_endbr.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_asm.Reg
diff --git a/plugins/x86/x86_legacy_bil_ast.ml b/plugins/x86/x86_legacy_bil_ast.ml
index 8429be0bd..81cc57246 100644
--- a/plugins/x86/x86_legacy_bil_ast.ml
+++ b/plugins/x86/x86_legacy_bil_ast.ml
@@ -16,16 +16,18 @@ open Big_int_Z
module Type = X86_legacy_bil_type
module Var = X86_legacy_bil_var
+module Core = Core_kernel[@@warning "-D"]
+
(* TODO: remove if Core.Std is opened in this file. *)
-let string_of_sexp = Core_kernel.string_of_sexp
-let sexp_of_string = Core_kernel.sexp_of_string
+let string_of_sexp = Core.string_of_sexp
+let sexp_of_string = Core.sexp_of_string
(** Support for s-expressions *)
let big_int_of_sexp sexp =
- Core_kernel.String.t_of_sexp sexp |> Big_int_Z.big_int_of_string
+ Core.String.t_of_sexp sexp |> Big_int_Z.big_int_of_string
let sexp_of_big_int bi =
- Big_int_Z.string_of_big_int bi |> Core_kernel.String.sexp_of_t
+ Big_int_Z.string_of_big_int bi |> Core.String.sexp_of_t
type var = Var.t [@@deriving sexp]
diff --git a/plugins/x86/x86_legacy_bil_convenience.ml b/plugins/x86/x86_legacy_bil_convenience.ml
index cad5b6b0d..0a4c5934c 100644
--- a/plugins/x86/x86_legacy_bil_convenience.ml
+++ b/plugins/x86/x86_legacy_bil_convenience.ml
@@ -6,7 +6,7 @@ module Bil = X86_legacy_bil
open Bil.Ast
open Bil.Type
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Arithmetic = X86_legacy_bil_arithmetic
module Big_int_convenience = X86_legacy_bil_big_int_convenience
diff --git a/plugins/x86/x86_legacy_bil_disasm_i386.ml b/plugins/x86/x86_legacy_bil_disasm_i386.ml
index 304839f09..d71378ce1 100644
--- a/plugins/x86/x86_legacy_bil_disasm_i386.ml
+++ b/plugins/x86/x86_legacy_bil_disasm_i386.ml
@@ -1,6 +1,7 @@
(* Copyright (C) 2017 ForAllSecure, Inc. - All Rights Reserved. *)
(** Native lifter of x86 instructions to the BAP IL *)
module Bil = X86_legacy_bil
+module Core = Core_kernel[@@warning "-D"]
open Big_int_Z
open Bil
@@ -13,10 +14,10 @@ module Var_temp = X86_legacy_bil_var_temp
open Big_int_convenience
open X86_legacy_bil_convenience
-(* Note: remove these if we open Core_kernel here. *)
-module List = Core_kernel.List
-module Int = Core_kernel.Int
-module Option = Core_kernel.Option
+(* Note: remove these if we open Core_kernel[@@warning "-D"] here. *)
+module List = Core.List
+module Int = Core.Int
+module Option = Core.Option
let compute_segment_bases = ref false
@@ -542,19 +543,19 @@ module ToIR = struct
(X86_legacy_bil_convenience.exp_ite (cmp_pc 0b10) convert_10 convert_11)
let get_x87_stack ~index =
- Core_kernel.Array.foldi ~f:(
+ Core.Array.foldi ~f:(
fun i acc st_exp ->
X86_legacy_bil_convenience.exp_ite (x87_top_exp ==* X86_legacy_bil_convenience.it ((i - index) mod 8) (Reg 3)) st_exp acc
) ~init:st_exps.(0) st_exps
let get_x87_tag ~index =
- Core_kernel.Array.foldi ~f:(
+ Core.Array.foldi ~f:(
fun i acc st_tag ->
X86_legacy_bil_convenience.exp_ite (x87_top_exp ==* X86_legacy_bil_convenience.it ((i - index) mod 8) (Reg 3)) st_tag acc
) ~init:st_tag_exps.(0) st_tag_exps
let set_x87_stack ~index value =
- Core_kernel.Array.mapi ~f:(
+ Core.Array.mapi ~f:(
fun i st_var ->
let selector = x87_top_exp ==* X86_legacy_bil_convenience.it ((i - index) mod 8) (Reg 3) in
let tag =
@@ -566,10 +567,10 @@ module ToIR = struct
move st_tag.(i) (X86_legacy_bil_convenience.exp_ite selector tag st_tag_exps.(i));
move st_var (X86_legacy_bil_convenience.exp_ite selector bv_value st_exps.(i));
]
- ) st |> Array.to_list |> Core_kernel.List.concat
+ ) st |> Array.to_list |> Core.List.concat
let empty_x87_stack ~index =
- Core_kernel.Array.mapi ~f:(
+ Core.Array.mapi ~f:(
fun i st_tag_var ->
let selector = x87_top_exp ==* X86_legacy_bil_convenience.it i (Reg 3) in
move st_tag_var (X86_legacy_bil_convenience.exp_ite selector fempty st_tag_exps.(i))
diff --git a/plugins/x86/x86_legacy_bil_lifter.ml b/plugins/x86/x86_legacy_bil_lifter.ml
index 371145dad..b2c4d813e 100644
--- a/plugins/x86/x86_legacy_bil_lifter.ml
+++ b/plugins/x86/x86_legacy_bil_lifter.ml
@@ -1,6 +1,6 @@
[@@@warning "-40"]
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_core_theory
module Bil = X86_legacy_bil
diff --git a/plugins/x86/x86_legacy_bil_pp.ml b/plugins/x86/x86_legacy_bil_pp.ml
index 757d6b452..afa9365ef 100644
--- a/plugins/x86/x86_legacy_bil_pp.ml
+++ b/plugins/x86/x86_legacy_bil_pp.ml
@@ -8,7 +8,8 @@ module Bil = X86_legacy_bil
open Big_int_Z
open Bil
open Bil.Type
-open Core_kernel
+module Core = Core_kernel[@@warning "-D"]
+open Core
module Arithmetic = X86_legacy_bil_arithmetic
module Big_int_convenience = X86_legacy_bil_big_int_convenience
diff --git a/plugins/x86/x86_legacy_bil_pp.mli b/plugins/x86/x86_legacy_bil_pp.mli
index 974297ea3..c1579c7d4 100644
--- a/plugins/x86/x86_legacy_bil_pp.mli
+++ b/plugins/x86/x86_legacy_bil_pp.mli
@@ -3,10 +3,12 @@
module Bil = X86_legacy_bil
open Bil
+module Core = Core_kernel[@@warning "-D"]
+
module VH = Var.Table
module F = Format
-val output_varnums : bool Core_kernel.ref
-val many_parens : bool Core_kernel.ref
+val output_varnums : bool Core.ref
+val many_parens : bool Core.ref
val typ_to_string : Type.typ -> string
val ct_to_string : Type.cast_type -> string
val fbinop_to_string : Type.fbinop_type -> string
@@ -16,20 +18,20 @@ val binop_to_string : Type.binop_type -> string
val unop_to_string : Type.unop_type -> string
val option_may : f:('a -> unit) -> 'a option -> unit
val reasonable_size_varctx : int
-val printed_varctx_warning : bool Core_kernel.ref
-type varctx = string VH.t * (string, unit) Core_kernel.Hashtbl.t
+val printed_varctx_warning : bool Core.ref
+type varctx = string VH.t * (string, unit) Core.Hashtbl.t
val var_to_string :
- ?ctx:('a, string) VH.t_ * (string, unit) Core_kernel.Hashtbl.t ->
+ ?ctx:('a, string) VH.t_ * (string, unit) Core.Hashtbl.t ->
Var.t -> string
class pp :
F.formatter ->
object
method ast_endian : Ast.exp -> unit
method ast_exp : ?prec:int -> Ast.exp -> unit
- method ast_program : Ast.stmt Core_kernel.List.t -> unit
+ method ast_program : Ast.stmt Core.List.t -> unit
method ast_stmt : Ast.stmt -> unit
method attr : Type.attribute -> unit
- method attrs : Type.attribute Core_kernel.List.t -> unit
+ method attrs : Type.attribute Core.List.t -> unit
method close : unit
method du : Var.defuse -> unit
method int : Big_int_Z.big_int -> Type.typ -> unit
@@ -46,4 +48,4 @@ val make_varctx : unit -> pp
val label_to_string : Type.label -> string
val ast_exp_to_string : Ast.exp -> string
val ast_stmt_to_string : Ast.stmt -> string
-val ast_prog_to_string : Ast.stmt Core_kernel.List.t -> Core_kernel.String.t
+val ast_prog_to_string : Ast.stmt Core.List.t -> Core.String.t
diff --git a/plugins/x86/x86_legacy_bil_semantics.ml b/plugins/x86/x86_legacy_bil_semantics.ml
index c2894aeaf..f7dab4162 100644
--- a/plugins/x86/x86_legacy_bil_semantics.ml
+++ b/plugins/x86/x86_legacy_bil_semantics.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_core_theory
open Bap_knowledge
@@ -121,7 +121,7 @@ module Semantics = struct
module Base = struct
module KB = Knowledge
- let simpl = ident
+ let simpl = Fn.id
let ret = Knowledge.return
let bool = Theory.Bool.t
let bool_t = Type.Reg 1
diff --git a/plugins/x86/x86_legacy_bil_type.ml b/plugins/x86/x86_legacy_bil_type.ml
index d49793fdb..d2d4c68d7 100644
--- a/plugins/x86/x86_legacy_bil_type.ml
+++ b/plugins/x86/x86_legacy_bil_type.ml
@@ -4,15 +4,15 @@
@author Ivan Jager
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
(** Addresses are big_ints *)
type addr = Big_int_Z.big_int
(** Support for s-expressions *)
let addr_of_sexp sexp =
- Core_kernel.String.t_of_sexp sexp |> Big_int_Z.big_int_of_string
+ String.t_of_sexp sexp |> Big_int_Z.big_int_of_string
let sexp_of_addr bi =
- Big_int_Z.string_of_big_int bi |> Core_kernel.String.sexp_of_t
+ Big_int_Z.string_of_big_int bi |> String.sexp_of_t
let compare_addr = Big_int_Z.compare_big_int
type bv_size = int
diff --git a/plugins/x86/x86_legacy_bil_var.ml b/plugins/x86/x86_legacy_bil_var.ml
index 14f66acc0..e0a26f1f2 100644
--- a/plugins/x86/x86_legacy_bil_var.ml
+++ b/plugins/x86/x86_legacy_bil_var.ml
@@ -2,7 +2,7 @@
(**
The type used for variables and functions to create and use them.
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Type = X86_legacy_bil_type
diff --git a/plugins/x86/x86_legacy_bil_var.mli b/plugins/x86/x86_legacy_bil_var.mli
index 5aa281847..eca9354f8 100644
--- a/plugins/x86/x86_legacy_bil_var.mli
+++ b/plugins/x86/x86_legacy_bil_var.mli
@@ -3,7 +3,7 @@
@author Ivan Jager
*)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
module Type = X86_legacy_bil_type
diff --git a/plugins/x86/x86_legacy_fp_lifter.ml b/plugins/x86/x86_legacy_fp_lifter.ml
index d7083b2dc..9c6908eae 100644
--- a/plugins/x86/x86_legacy_fp_lifter.ml
+++ b/plugins/x86/x86_legacy_fp_lifter.ml
@@ -5,7 +5,7 @@ module Bil = X86_legacy_bil
open Bil
open Bil.Ast
open Bil.Type
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open X86_legacy_bil_convenience
open X86_legacy_bil_disasm_i386
@@ -441,7 +441,7 @@ module Fp_lifter = struct
[ToIR.dec_x87_stack;]
@ ToIR.set_x87_stack ~index:0 value
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
let ild_fm mem ~typ ~seg ~base ~scale ~index ~disp =
@@ -461,7 +461,7 @@ module Fp_lifter = struct
[ToIR.dec_x87_stack;]
@ ToIR.set_x87_stack ~index:0 value
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
let ld_fprr mem src =
@@ -492,7 +492,7 @@ module Fp_lifter = struct
] @
(if pop then ToIR.pop_x87_stack else [])
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
let ist_fm mem ~typ ~pop ~seg ~base ~scale ~index ~disp =
@@ -510,7 +510,7 @@ module Fp_lifter = struct
] @
(if pop then ToIR.pop_x87_stack else [])
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
(* Converting integers to double precision FP *)
@@ -520,7 +520,7 @@ module Fp_lifter = struct
let max_vl = Typecheck.bits_of_width (Var.typ dst) in
let bv_size = 64 in
let upper_part = extract (max_vl-1) bv_size (Var dst) in
- Core_kernel.Result.Ok [
+ Result.Ok [
ToIR.move dst (upper_part ++* fp_to_sse_bv ~bv_size double)
]
in
@@ -544,7 +544,7 @@ module Fp_lifter = struct
let max_vl = Typecheck.bits_of_width (Var.typ dst) in
let bv_size = 32 in
let upper_part = extract (max_vl-1) bv_size (Var dst) in
- Core_kernel.Result.Ok [
+ Result.Ok [
ToIR.move dst (upper_part ++* fp_to_sse_bv ~bv_size double)
]
in
@@ -567,7 +567,7 @@ module Fp_lifter = struct
let max_vl = Typecheck.bits_of_width (Var.typ dst) in
let bv_size = 64 in
let upper_part = extract (max_vl-1) bv_size (Var dst) in
- Core_kernel.Result.Ok [
+ Result.Ok [
ToIR.move dst (upper_part ++* fp_to_sse_bv ~bv_size double)
]
in
@@ -587,7 +587,7 @@ module Fp_lifter = struct
(* Converting double precision FP to signed integers *)
let cvttsd2si dst exp =
let integer = convert_double_precision_fp_to_int32 exp in
- Core_kernel.Result.Ok [
+ Result.Ok [
ToIR.move dst integer
]
in
@@ -601,7 +601,7 @@ module Fp_lifter = struct
(* Converting double precision FP to single precision *)
let cvtsd2ss upper_part dst exp =
let double = convert_double_precision_fp_to_single_precision_fp exp in
- Core_kernel.Result.Ok [
+ Result.Ok [
ToIR.move dst (upper_part ++* fp_to_sse_bv ~bv_size:32 double)
]
in
@@ -627,7 +627,7 @@ module Fp_lifter = struct
let stmts =
[ToIR.move dst (upper_part ++* double)]
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
let sse_binopsd_rrr ~typ ~binop arch mem dst src1 src2 =
@@ -649,7 +649,7 @@ module Fp_lifter = struct
let stmts =
[ToIR.move dst (upper_part ++* double)]
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
let sse_binopsd_rrm ~typ ~binop arch mem dst src1
@@ -675,7 +675,7 @@ module Fp_lifter = struct
let stmts =
[ToIR.move dst (upper_part ++* double)]
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
let x87_binop style ~binop ?(reversed=false) mem sti =
@@ -735,7 +735,7 @@ module Fp_lifter = struct
ToIR.move sf exp_false;
]
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
let ucomisx_rm ~typ arch mem src1 ~seg ~base ~scale ~index ~disp =
let src1 = decode src1 |> value_exn |> exp_of_reg_t arch in
@@ -761,7 +761,7 @@ module Fp_lifter = struct
ToIR.move sf exp_false;
]
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
let ucomfi_r ~pop mem sti =
@@ -781,7 +781,7 @@ module Fp_lifter = struct
ToIR.move cf @@ exp_ite has_nan i1 (flt st0 sti);
] @ (if pop then ToIR.pop_x87_stack else [])
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
let fcom_r ~pop ?(pop2=false) ~unordered mem sti =
@@ -807,7 +807,7 @@ module Fp_lifter = struct
| false, true -> assert false
)
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
let fcom_m mem ~typ ~pop ~seg ~base ~scale ~index ~disp =
@@ -831,7 +831,7 @@ module Fp_lifter = struct
ToIR.move x87_c3 @@ exp_ite has_nan i1 (feq st0 op);
] @ (if pop then ToIR.pop_x87_stack else [])
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
let fidiv mem ~typ ~seg ~base ~scale ~index ~disp =
@@ -863,7 +863,7 @@ module Fp_lifter = struct
let stmts =
[ ToIR.move dest (y1 ++* x1 ++* y0 ++* x0) ]
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
(** FXCH ST(i): Exchange the contents of ST(0) and ST(i). *)
@@ -927,7 +927,7 @@ module Fp_lifter = struct
if max_vl = dst_size then !acc
else Int(Big_int_convenience.bi0, Reg (max_vl - dst_size)) ++* !acc
in
- Core_kernel.Result.Ok [ ToIR.move dst acc ]
+ Result.Ok [ ToIR.move dst acc ]
in
let vinserti128_rrri arch mem dst src1 src2 imm =
@@ -950,7 +950,7 @@ module Fp_lifter = struct
ToIR.move dst final_value
]
in
- Core_kernel.Result.Ok stmts
+ Result.Ok stmts
in
(* Pack with Unsigned Saturation *)
diff --git a/plugins/x86/x86_legacy_fp_lifter.mli b/plugins/x86/x86_legacy_fp_lifter.mli
index defc9935a..90b68b502 100644
--- a/plugins/x86/x86_legacy_fp_lifter.mli
+++ b/plugins/x86/x86_legacy_fp_lifter.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module Bil = X86_legacy_bil
module MC = Disasm_expert.Basic
diff --git a/plugins/x86/x86_legacy_operands.ml b/plugins/x86/x86_legacy_operands.ml
index ead754fe5..f1a002ba4 100644
--- a/plugins/x86/x86_legacy_operands.ml
+++ b/plugins/x86/x86_legacy_operands.ml
@@ -1,6 +1,6 @@
(* Copyright (C) 2017 ForAllSecure, Inc. - All Rights Reserved. *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
(* Operands module is used for compatibility with BAP and avoiding
diff --git a/plugins/x86/x86_legacy_operands.mli b/plugins/x86/x86_legacy_operands.mli
index e715a9c21..f7d8ca186 100644
--- a/plugins/x86/x86_legacy_operands.mli
+++ b/plugins/x86/x86_legacy_operands.mli
@@ -1,19 +1,20 @@
(* Copyright (C) 2017 ForAllSecure, Inc. - All Rights Reserved. *)
+open Core_kernel[@@warning "-D"]
module Dis = Bap.Std.Disasm_expert.Basic
module Insn = Dis.Insn
val r :
f:('a ->
- Bap.Std.reg -> ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ Bap.Std.reg -> ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val i :
f:('a ->
- Bap.Std.imm -> ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ Bap.Std.imm -> ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val m :
f:('a ->
seg:Bap.Std.reg ->
@@ -21,31 +22,31 @@ val m :
scale:Bap.Std.imm ->
index:Bap.Std.reg ->
disp:Bap.Std.imm ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val rr :
f:('a ->
Bap.Std.reg ->
- Bap.Std.reg -> ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ Bap.Std.reg -> ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val ri :
f:('a ->
Bap.Std.reg ->
- Bap.Std.imm -> ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ Bap.Std.imm -> ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val ir :
f:('a ->
Bap.Std.imm ->
- Bap.Std.reg -> ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ Bap.Std.reg -> ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val rm :
f:('a ->
Bap.Std.reg ->
@@ -54,10 +55,10 @@ val rm :
scale:Bap.Std.imm ->
index:Bap.Std.reg ->
disp:Bap.Std.imm ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val mr :
f:('a ->
seg:Bap.Std.reg ->
@@ -65,10 +66,10 @@ val mr :
scale:Bap.Std.imm ->
index:Bap.Std.reg ->
disp:Bap.Std.imm ->
- Bap.Std.reg -> ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ Bap.Std.reg -> ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val mi :
f:('a ->
seg:Bap.Std.reg ->
@@ -76,26 +77,26 @@ val mi :
scale:Bap.Std.imm ->
index:Bap.Std.reg ->
disp:Bap.Std.imm ->
- Bap.Std.imm -> ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ Bap.Std.imm -> ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val rrr :
f:('a ->
Bap.Std.reg ->
Bap.Std.reg ->
- Bap.Std.reg -> ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ Bap.Std.reg -> ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val rri :
f:('a ->
Bap.Std.reg ->
Bap.Std.reg ->
- Bap.Std.imm -> ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ Bap.Std.imm -> ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val rrm :
f:('a ->
Bap.Std.reg ->
@@ -105,16 +106,16 @@ val rrm :
scale:Bap.Std.imm ->
index:Bap.Std.reg ->
disp:Bap.Std.imm ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
val rrri :
f:('a ->
Bap.Std.reg ->
Bap.Std.reg ->
Bap.Std.reg ->
- Bap.Std.imm -> ('b, Core_kernel.Error.t) Core_kernel.Result.t) ->
+ Bap.Std.imm -> ('b, Error.t) Result.t) ->
'a ->
(Dis.asm, Dis.kinds) Insn.t ->
- ('b, Core_kernel.Error.t) Core_kernel.Result.t
+ ('b, Error.t) Result.t
diff --git a/plugins/x86/x86_lifter.ml b/plugins/x86/x86_lifter.ml
index 52709d518..5db51f02d 100644
--- a/plugins/x86/x86_lifter.ml
+++ b/plugins/x86/x86_lifter.ml
@@ -1,6 +1,6 @@
(** Native lifter of x86 instructions to the BAP IL *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
open Bil.Types
@@ -1178,7 +1178,7 @@ module ToIR = struct
| 32 -> clz32 res
| 64 -> clz64 res
| _ -> disfailwith "Invalid bitscan width" in
- let assn_result =
+ let assn_result =
let n1 = width - 1 in
assn t dst @@ if is_zero_count || is_fwd then Bil.var res
else Bil.(var res lxor int Word.(of_int n1 ~width)) in
diff --git a/plugins/x86/x86_lifter.mli b/plugins/x86/x86_lifter.mli
index f9df3e0f5..741877bd6 100644
--- a/plugins/x86/x86_lifter.mli
+++ b/plugins/x86/x86_lifter.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module IA32 : sig
diff --git a/plugins/x86/x86_main.ml b/plugins/x86/x86_main.ml
index 976725ce4..cd1cc62e3 100644
--- a/plugins/x86/x86_main.ml
+++ b/plugins/x86/x86_main.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Poly
open Bap.Std
open X86_targets
diff --git a/plugins/x86/x86_mov.ml b/plugins/x86/x86_mov.ml
index 361a9eb5b..80ae6679a 100644
--- a/plugins/x86/x86_mov.ml
+++ b/plugins/x86/x86_mov.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_opcode_mov
open X86_asm.Reg
diff --git a/plugins/x86/x86_mov_offset.ml b/plugins/x86/x86_mov_offset.ml
index ccf0bb85f..43a64582f 100644
--- a/plugins/x86/x86_mov_offset.ml
+++ b/plugins/x86/x86_mov_offset.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_llvm.Std
open X86_asm.Reg
diff --git a/plugins/x86/x86_opcode_btx.ml b/plugins/x86/x86_opcode_btx.ml
index 2949f6ddb..b0fbce401 100644
--- a/plugins/x86/x86_opcode_btx.ml
+++ b/plugins/x86/x86_opcode_btx.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
(** BT *)
type bt_rr_ia32 = [
diff --git a/plugins/x86/x86_opcode_cdq.ml b/plugins/x86/x86_opcode_cdq.ml
index 5481eb036..d2a41d226 100644
--- a/plugins/x86/x86_opcode_cdq.ml
+++ b/plugins/x86/x86_opcode_cdq.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type cdq = [
| `CBW
diff --git a/plugins/x86/x86_opcode_cmps.ml b/plugins/x86/x86_opcode_cmps.ml
index 7be749259..a25d93e9d 100644
--- a/plugins/x86/x86_opcode_cmps.ml
+++ b/plugins/x86/x86_opcode_cmps.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type cmps = [
| `CMPS8
@@ -6,4 +6,3 @@ type cmps = [
| `CMPS32
| `CMPS64
] [@@deriving bin_io, sexp, compare, enumerate]
-
diff --git a/plugins/x86/x86_opcode_cmpxchg.ml b/plugins/x86/x86_opcode_cmpxchg.ml
index bb97d1aee..59333e1b1 100644
--- a/plugins/x86/x86_opcode_cmpxchg.ml
+++ b/plugins/x86/x86_opcode_cmpxchg.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type cmpxchg_rr_ia32 = [
| `CMPXCHG8rr
diff --git a/plugins/x86/x86_opcode_ins.ml b/plugins/x86/x86_opcode_ins.ml
index 8a7b1d4b3..85190e827 100644
--- a/plugins/x86/x86_opcode_ins.ml
+++ b/plugins/x86/x86_opcode_ins.ml
@@ -1,9 +1,7 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type ins = [
| `IN8
| `IN16
| `IN32
] [@@deriving bin_io, sexp, compare, enumerate]
-
-
diff --git a/plugins/x86/x86_opcode_lods.ml b/plugins/x86/x86_opcode_lods.ml
index 879e1924c..8a3f018c6 100644
--- a/plugins/x86/x86_opcode_lods.ml
+++ b/plugins/x86/x86_opcode_lods.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type lods = [
| `LODSB
diff --git a/plugins/x86/x86_opcode_mov.ml b/plugins/x86/x86_opcode_mov.ml
index 90b944305..41aa91351 100644
--- a/plugins/x86/x86_opcode_mov.ml
+++ b/plugins/x86/x86_opcode_mov.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type mov_rr_ia32 = [
| `MOV8rr
diff --git a/plugins/x86/x86_opcode_movs.ml b/plugins/x86/x86_opcode_movs.ml
index e1e27581d..b4e971528 100644
--- a/plugins/x86/x86_opcode_movs.ml
+++ b/plugins/x86/x86_opcode_movs.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type movs = [
| `MOVSB
diff --git a/plugins/x86/x86_opcode_outs.ml b/plugins/x86/x86_opcode_outs.ml
index 4c92ab98d..0c19c3d5c 100644
--- a/plugins/x86/x86_opcode_outs.ml
+++ b/plugins/x86/x86_opcode_outs.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type outs = [
| `OUTSB
diff --git a/plugins/x86/x86_opcode_scas.ml b/plugins/x86/x86_opcode_scas.ml
index 9617ff8de..f099d0b5e 100644
--- a/plugins/x86/x86_opcode_scas.ml
+++ b/plugins/x86/x86_opcode_scas.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type scas = [
| `SCAS8
diff --git a/plugins/x86/x86_opcode_stos.ml b/plugins/x86/x86_opcode_stos.ml
index 9e24dca63..32b5afbc2 100644
--- a/plugins/x86/x86_opcode_stos.ml
+++ b/plugins/x86/x86_opcode_stos.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
type stos = [
| `STOSB
diff --git a/plugins/x86/x86_operands.ml b/plugins/x86/x86_operands.ml
index 7601e6619..cbeb1b2cc 100644
--- a/plugins/x86/x86_operands.ml
+++ b/plugins/x86/x86_operands.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Sexplib.Std
open Bap.Std
diff --git a/plugins/x86/x86_operands.mli b/plugins/x86/x86_operands.mli
index b0bae3b95..2c3d180c0 100644
--- a/plugins/x86/x86_operands.mli
+++ b/plugins/x86/x86_operands.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
val r : f:(mem -> reg -> bil Or_error.t) -> lifter
diff --git a/plugins/x86/x86_prefix.ml b/plugins/x86/x86_prefix.ml
index 6d8cbec87..ca7ad867f 100644
--- a/plugins/x86/x86_prefix.ml
+++ b/plugins/x86/x86_prefix.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Or_error
open Bap.Std
diff --git a/plugins/x86/x86_prefix.mli b/plugins/x86/x86_prefix.mli
index 1bd3910a0..de902ec70 100644
--- a/plugins/x86/x86_prefix.mli
+++ b/plugins/x86/x86_prefix.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
type t = [
diff --git a/plugins/x86/x86_targets.ml b/plugins/x86/x86_targets.ml
index 81d38145e..13ea21366 100644
--- a/plugins/x86/x86_targets.ml
+++ b/plugins/x86/x86_targets.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module Insn = Disasm_expert.Basic.Insn
diff --git a/plugins/x86/x86_targets.mli b/plugins/x86/x86_targets.mli
index 54b4e84c5..95161cb21 100644
--- a/plugins/x86/x86_targets.mli
+++ b/plugins/x86/x86_targets.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
(** IA32 target *)
diff --git a/plugins/x86/x86_tools.ml b/plugins/x86/x86_tools.ml
index 8a23bd55b..f25054c31 100644
--- a/plugins/x86/x86_tools.ml
+++ b/plugins/x86/x86_tools.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_tools_types
diff --git a/plugins/x86/x86_tools.mli b/plugins/x86/x86_tools.mli
index 44adcf135..c43b71770 100644
--- a/plugins/x86/x86_tools.mli
+++ b/plugins/x86/x86_tools.mli
@@ -1,8 +1,7 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
module type S = X86_tools_types.S
module IA32 : S
module AMD64 : S
-
diff --git a/plugins/x86/x86_tools_flags.ml b/plugins/x86/x86_tools_flags.ml
index 830aeee4f..1c73ac761 100644
--- a/plugins/x86/x86_tools_flags.ml
+++ b/plugins/x86/x86_tools_flags.ml
@@ -1,9 +1,9 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_tools_types
module Make(CPU : X86CPU) : FR = struct
- type t = cpu_flag
+ type t = cpu_flag
let var = function
| `CF -> CPU.cf
diff --git a/plugins/x86/x86_tools_flags.mli b/plugins/x86/x86_tools_flags.mli
index 0f4919250..43e1fc907 100644
--- a/plugins/x86/x86_tools_flags.mli
+++ b/plugins/x86/x86_tools_flags.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_tools_types
diff --git a/plugins/x86/x86_tools_imm.ml b/plugins/x86/x86_tools_imm.ml
index a81319b9d..ab3d26f6e 100644
--- a/plugins/x86/x86_tools_imm.ml
+++ b/plugins/x86/x86_tools_imm.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
type t = imm
diff --git a/plugins/x86/x86_tools_mem.ml b/plugins/x86/x86_tools_mem.ml
index 7526d13e5..eee08a658 100644
--- a/plugins/x86/x86_tools_mem.ml
+++ b/plugins/x86/x86_tools_mem.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_tools_types
diff --git a/plugins/x86/x86_tools_mem.mli b/plugins/x86/x86_tools_mem.mli
index b22367181..3907b85e1 100644
--- a/plugins/x86/x86_tools_mem.mli
+++ b/plugins/x86/x86_tools_mem.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_tools_types
diff --git a/plugins/x86/x86_tools_prefix.ml b/plugins/x86/x86_tools_prefix.ml
index 1210525e9..f90f0b3da 100644
--- a/plugins/x86/x86_tools_prefix.ml
+++ b/plugins/x86/x86_tools_prefix.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_tools_types
diff --git a/plugins/x86/x86_tools_prefix.mli b/plugins/x86/x86_tools_prefix.mli
index 5548daaf5..508f9697b 100644
--- a/plugins/x86/x86_tools_prefix.mli
+++ b/plugins/x86/x86_tools_prefix.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_tools_types
diff --git a/plugins/x86/x86_tools_reg.ml b/plugins/x86/x86_tools_reg.ml
index 0ca626726..fa02f9ee4 100644
--- a/plugins/x86/x86_tools_reg.ml
+++ b/plugins/x86/x86_tools_reg.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_tools_types
diff --git a/plugins/x86/x86_tools_reg.mli b/plugins/x86/x86_tools_reg.mli
index 835183f18..178697223 100644
--- a/plugins/x86/x86_tools_reg.mli
+++ b/plugins/x86/x86_tools_reg.mli
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_tools_types
diff --git a/plugins/x86/x86_tools_types.ml b/plugins/x86/x86_tools_types.ml
index 122c3113d..560644d6d 100644
--- a/plugins/x86/x86_tools_types.ml
+++ b/plugins/x86/x86_tools_types.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
(** Register representation *)
diff --git a/plugins/x86/x86_utils.ml b/plugins/x86/x86_utils.ml
index b6c61da62..42a1da715 100644
--- a/plugins/x86/x86_utils.ml
+++ b/plugins/x86/x86_utils.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open X86_types
diff --git a/src/bap_byteweight_main.ml b/src/bap_byteweight_main.ml
index 739092d96..b0c60cbfa 100644
--- a/src/bap_byteweight_main.ml
+++ b/src/bap_byteweight_main.ml
@@ -63,7 +63,7 @@ following interpretations:
```
|}
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap.Std
open Result.Monad_infix
open Format
diff --git a/src/bap_frontend.ml b/src/bap_frontend.ml
index 4ce64c03b..a657baa25 100644
--- a/src/bap_frontend.ml
+++ b/src/bap_frontend.ml
@@ -24,7 +24,7 @@ Report bugs to
$(b,bapbundle)(1), $(b,bapbuild)(1), $(b,bap)(3)
|}
open Bap.Std
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_main.Extension
diff --git a/tools/bapbundle.ml b/tools/bapbundle.ml
index 76210cb2a..db4676581 100644
--- a/tools/bapbundle.ml
+++ b/tools/bapbundle.ml
@@ -1,4 +1,4 @@
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Bap_bundle.Std
open Format
@@ -180,7 +180,7 @@ module Show = struct
let show_files k m b =
let choose = match k with
- | `libraries when libraries.contents -> ident
+ | `libraries when libraries.contents -> Fn.id
| `resources when resources.contents -> not
| _ -> fun _ -> false in
let is_library name =
@@ -228,7 +228,7 @@ end
let args = ref []
let parse = ref ignore
-let main = ref ident
+let main = ref Fn.id
module type Command = sig
val args : (string * Arg.spec * string) list
diff --git a/tools/bapdoc.ml b/tools/bapdoc.ml
index 3f50ed0cf..791f9785d 100644
--- a/tools/bapdoc.ml
+++ b/tools/bapdoc.ml
@@ -1,9 +1,10 @@
(** Builds BAP Annotated Reference . *)
-open Core_kernel
+open Core_kernel[@@warning "-D"]
open Poly
open Bap_plugins.Std
+module Sys = Caml.Sys
module Unix = Caml_unix
module Filename = Caml.Filename
@@ -133,7 +134,7 @@ type info = {
}
let program = {
- man = ident;
+ man = Fn.id;
help = sprintf "%s --help=groff"
}