diff --git a/bap-abi.opam b/bap-abi.opam index f9b888bcd..9edb5a984 100644 --- a/bap-abi.opam +++ b/bap-abi.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bap-analyze.opam b/bap-analyze.opam index 46ecdfa53..6abcb66c6 100644 --- a/bap-analyze.opam +++ b/bap-analyze.opam @@ -15,7 +15,7 @@ depends: [ "bap-main" {= version} "bap-std" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "linenoise" {>= "1.1.0" & < "2.0.0"} "monads" {= version} "bap-common" {= version} diff --git a/bap-api.opam b/bap-api.opam index 646e14c57..4bdf34b5f 100644 --- a/bap-api.opam +++ b/bap-api.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "fileutils" "ppx_bap" {= version} "regular" {= version} diff --git a/bap-arm.opam b/bap-arm.opam index b83285d8f..7e9c21845 100644 --- a/bap-arm.opam +++ b/bap-arm.opam @@ -21,7 +21,7 @@ depends: [ "bap-traces" {= version} "bitvec-order" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "bap-common" {= version} "ogre" {= version} diff --git a/bap-beagle-strings.opam b/bap-beagle-strings.opam index 9a6d57979..274d656f5 100644 --- a/bap-beagle-strings.opam +++ b/bap-beagle-strings.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "bap-beagle" {= version} "ppx_bap" {= version} diff --git a/bap-beagle.opam b/bap-beagle.opam index 7270ca63c..a6115b9d3 100644 --- a/bap-beagle.opam +++ b/bap-beagle.opam @@ -15,7 +15,7 @@ depends: [ "bap-primus" {= version} "bap-std" {= version} "bap-strings" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-bil.opam b/bap-bil.opam index e83bc7991..371f1db80 100644 --- a/bap-bil.opam +++ b/bap-bil.opam @@ -17,7 +17,7 @@ depends: [ "bap-std" {= version} "bitvec-order" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "bap-common" {= version} "ogre" {= version} diff --git a/bap-bml.opam b/bap-bml.opam index e8b751a24..7939926d0 100644 --- a/bap-bml.opam +++ b/bap-bml.opam @@ -11,7 +11,7 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-build.opam b/bap-build.opam index 91519beba..1ea02b239 100644 --- a/bap-build.opam +++ b/bap-build.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ocamlbuild" "ocamlfind" diff --git a/bap-bundle.opam b/bap-bundle.opam index ac9cc7adf..579b02788 100644 --- a/bap-bundle.opam +++ b/bap-bundle.opam @@ -11,7 +11,7 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "camlzip" {>= "1.0" & < "2.0"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "fileutils" "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-byteweight-frontend.opam b/bap-byteweight-frontend.opam index 82ce3b459..dc9e4a096 100644 --- a/bap-byteweight-frontend.opam +++ b/bap-byteweight-frontend.opam @@ -13,7 +13,7 @@ depends: [ "bap-byteweight" {= version} "bap-std" {= version} "cmdliner" {>= "1.0" & < "2.0"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "fileutils" "bap-common" {= version} "ocurl" {>= "0.9.0"} diff --git a/bap-byteweight.opam b/bap-byteweight.opam index 30eebb787..1a0aa6e32 100644 --- a/bap-byteweight.opam +++ b/bap-byteweight.opam @@ -13,7 +13,7 @@ depends: [ "bap-signatures" {= version} "bap-std" {= version} "camlzip" {>= "1.0" & < "2.0"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bap-c.opam b/bap-c.opam index 03065f4c5..85950c1cb 100644 --- a/bap-c.opam +++ b/bap-c.opam @@ -15,7 +15,7 @@ depends: [ "bap-core-theory" {= version} "bap-knowledge" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-cache.opam b/bap-cache.opam index 5091474c2..e525b26fa 100644 --- a/bap-cache.opam +++ b/bap-cache.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "fileutils" "mmap" "bap-common" {= version} diff --git a/bap-callgraph-collator.opam b/bap-callgraph-collator.opam index 818d1bba6..5b4f94443 100644 --- a/bap-callgraph-collator.opam +++ b/bap-callgraph-collator.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "graphlib" {= version} "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-callsites.opam b/bap-callsites.opam index f3ab5be24..b6d4f669d 100644 --- a/bap-callsites.opam +++ b/bap-callsites.opam @@ -11,7 +11,7 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "odoc" {with-doc} ] diff --git a/bap-common.opam b/bap-common.opam index 38b5e8d38..d82d250fc 100644 --- a/bap-common.opam +++ b/bap-common.opam @@ -9,12 +9,12 @@ tags: ["bap" "meta"] homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ - "base" {>= "v0.14" & < "v0.16"} + "base" {>= "v0.17"} "dune" {>= "3.1"} "dune-configurator" "dune-site" - "ocaml" {> "4.08.0"} - "stdio" {>= "v0.14" & < "v0.16"} + "ocaml" {>= "5.1.0"} + "stdio" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-constant-tracker.opam b/bap-constant-tracker.opam index 5694ea248..b17a79b04 100644 --- a/bap-constant-tracker.opam +++ b/bap-constant-tracker.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "odoc" {with-doc} ] diff --git a/bap-core-theory.opam b/bap-core-theory.opam index 23dba49f1..43c8bd123 100644 --- a/bap-core-theory.opam +++ b/bap-core-theory.opam @@ -18,7 +18,7 @@ depends: [ "bitvec-binprot" {= version} "bitvec-order" {= version} "bitvec-sexp" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-cxxfilt.opam b/bap-cxxfilt.opam index cacc15a35..389c1566c 100644 --- a/bap-cxxfilt.opam +++ b/bap-cxxfilt.opam @@ -13,7 +13,7 @@ depends: [ "bap-demangle" {= version} "bap-std" {= version} "conf-binutils" {>= "0.3"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "odoc" {with-doc} ] diff --git a/bap-demangle.opam b/bap-demangle.opam index 35563b8a5..75cda84e7 100644 --- a/bap-demangle.opam +++ b/bap-demangle.opam @@ -13,7 +13,7 @@ depends: [ "bap-core-theory" {= version} "bap-knowledge" {= version} "bap-main" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "odoc" {with-doc} ] diff --git a/bap-dependencies.opam b/bap-dependencies.opam index d7410b4cf..ea4d32541 100644 --- a/bap-dependencies.opam +++ b/bap-dependencies.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-disassemble.opam b/bap-disassemble.opam index 86181fbd0..705162b9a 100644 --- a/bap-disassemble.opam +++ b/bap-disassemble.opam @@ -19,7 +19,7 @@ depends: [ "bitvec-order" {= version} "bitvec-sexp" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "bap-common" {= version} "ogre" {= version} diff --git a/bap-dump-symbols.opam b/bap-dump-symbols.opam index f5e68a388..a80c47535 100644 --- a/bap-dump-symbols.opam +++ b/bap-dump-symbols.opam @@ -11,7 +11,7 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "graphlib" {= version} "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-dwarf.opam b/bap-dwarf.opam index 04f466622..53fab56e1 100644 --- a/bap-dwarf.opam +++ b/bap-dwarf.opam @@ -11,7 +11,7 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bap-elementary.opam b/bap-elementary.opam index 23ada57ad..8602a9530 100644 --- a/bap-elementary.opam +++ b/bap-elementary.opam @@ -15,7 +15,7 @@ depends: [ "bap-knowledge" {= version} "bap-std" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-elf.opam b/bap-elf.opam index 000bfa8e4..5e4db7bf8 100644 --- a/bap-elf.opam +++ b/bap-elf.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-dwarf" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "ppx_bitstring" {>= "4.0.0" & < "5.0.0"} diff --git a/bap-flatten.opam b/bap-flatten.opam index bbd4f305a..0b70ab4d3 100644 --- a/bap-flatten.opam +++ b/bap-flatten.opam @@ -11,7 +11,7 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "odoc" {with-doc} ] diff --git a/bap-frontc.opam b/bap-frontc.opam index aaa71bcb4..a89326ebd 100644 --- a/bap-frontc.opam +++ b/bap-frontc.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-c" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "FrontC" {>= "4.1.0"} "bap-common" {= version} "odoc" {with-doc} diff --git a/bap-frontend.opam b/bap-frontend.opam index 9352f4ce0..9020f60cf 100644 --- a/bap-frontend.opam +++ b/bap-frontend.opam @@ -14,7 +14,7 @@ depends: [ "bap-knowledge" {= version} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ocamlfind" "regular" {= version} diff --git a/bap-future.opam b/bap-future.opam index f3de322c7..4e744c0ca 100644 --- a/bap-future.opam +++ b/bap-future.opam @@ -12,7 +12,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "bap-common" {= version} "odoc" {with-doc} diff --git a/bap-ghidra.opam b/bap-ghidra.opam index eead1e0f5..abc3e9c37 100644 --- a/bap-ghidra.opam +++ b/bap-ghidra.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ppx_bap" {= version} "bap-common" {= version} "bap-std" {= version} diff --git a/bap-glibc-runtime.opam b/bap-glibc-runtime.opam index e45ad10b0..5490148b3 100644 --- a/bap-glibc-runtime.opam +++ b/bap-glibc-runtime.opam @@ -14,7 +14,7 @@ depends: [ "bap-c" {= version} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ogre" {= version} "odoc" {with-doc} diff --git a/bap-ida-plugin.opam b/bap-ida-plugin.opam index 64e0120f6..b88a0994a 100644 --- a/bap-ida-plugin.opam +++ b/bap-ida-plugin.opam @@ -11,7 +11,7 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bap-ida.opam b/bap-ida.opam index 3e7a7c1c8..0ed431b08 100644 --- a/bap-ida.opam +++ b/bap-ida.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "regular" {= version} "fileutils" "bap-common" {= version} diff --git a/bap-knowledge.opam b/bap-knowledge.opam index 0d7ace58d..bd80034c2 100644 --- a/bap-knowledge.opam +++ b/bap-knowledge.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ppx_bap" {= version} "bap-common" {= version} "monads" {= version} diff --git a/bap-llvm.opam b/bap-llvm.opam index 310b363ae..8f647f180 100644 --- a/bap-llvm.opam +++ b/bap-llvm.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-std" {= version} "conf-bap-llvm" {>= "1.8"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "mmap" "monads" {= version} "bap-common" {= version} @@ -26,6 +26,7 @@ build: [ [ "ocaml" "tools/configure.ml" "--with-llvm-config=%{conf-bap-llvm:config}%" + "--%{llvm-shared?disable:enable}%-llvm-static" ] [ "dune" diff --git a/bap-main.opam b/bap-main.opam index 1384328d1..67933a526 100644 --- a/bap-main.opam +++ b/bap-main.opam @@ -14,10 +14,10 @@ depends: [ "bap-future" {= version} "bap-plugins" {= version} "bap-recipe" {= version} - "base" {>= "v0.14" & < "v0.16"} + "base" {>= "v0.17"} "cmdliner" {>= "1.0" & < "2.0"} "bap-common" {= version} - "stdio" {>= "v0.14" & < "v0.16"} + "stdio" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-mc.opam b/bap-mc.opam index 40a9a4496..f3022baf1 100644 --- a/bap-mc.opam +++ b/bap-mc.opam @@ -15,7 +15,7 @@ depends: [ "bap-main" {= version} "bap-std" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-microx.opam b/bap-microx.opam index 5ca6452db..05bec7ba9 100644 --- a/bap-microx.opam +++ b/bap-microx.opam @@ -11,7 +11,7 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-mips.opam b/bap-mips.opam index f1ea9e606..290ad69df 100644 --- a/bap-mips.opam +++ b/bap-mips.opam @@ -17,7 +17,7 @@ depends: [ "bap-knowledge" {= version} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-objdump.opam b/bap-objdump.opam index 0aebe19d9..d4263c6b6 100644 --- a/bap-objdump.opam +++ b/bap-objdump.opam @@ -19,7 +19,7 @@ depends: [ "bitvec-sexp" {= version} "bitvec" {= version} "conf-binutils" {>= "0.3"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "re" {>= "1.0" & < "2.0"} diff --git a/bap-optimization.opam b/bap-optimization.opam index 3a7cc8a3c..0dac51e0a 100644 --- a/bap-optimization.opam +++ b/bap-optimization.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "bap-std" {= version} diff --git a/bap-patterns.opam b/bap-patterns.opam index 7b9676e8b..7f2cac629 100644 --- a/bap-patterns.opam +++ b/bap-patterns.opam @@ -20,7 +20,7 @@ depends: [ "bitvec-order" {= version} "bitvec-sexp" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "fileutils" "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-phoenix.opam b/bap-phoenix.opam index d8abb8ba0..c02ef4833 100644 --- a/bap-phoenix.opam +++ b/bap-phoenix.opam @@ -14,7 +14,7 @@ depends: [ "bap-std" {= version} "cmdliner" "cmdliner" {>= "1.0" & < "2.0"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ezjsonm" "graphlib" {= version} "ppx_bap" {= version} diff --git a/bap-piqi.opam b/bap-piqi.opam deleted file mode 100644 index 61b3b62ab..000000000 --- a/bap-piqi.opam +++ /dev/null @@ -1,35 +0,0 @@ -# This file is generated by dune, edit dune-project instead -opam-version: "2.0" -version: "dev" -synopsis: "Serializes BAP Project in various formats using piqi" -maintainer: ["Ivan Gotovchits "] -authors: ["The BAP Team"] -license: "MIT" -tags: ["bap" "bap-plugin"] -homepage: "https://github.com/BinaryAnalysisPlatform/bap" -bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" -depends: [ - "dune" {>= "3.1"} - "bap-common" {= version} - "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} - "piqi" {>= "0.7.8"} - "odoc" {with-doc} -] -build: [ - ["dune" "subst"] {dev} - [ - "dune" - "build" - "-p" - name - "-j" - jobs - "--promote-install-files=false" - "@install" - "@runtest" {with-test} - "@doc" {with-doc} - ] - ["dune" "install" "-p" name "--create-install-files" name] -] -dev-repo: "git+https://github.com/BinaryAnalysisPlatform/bap.git" diff --git a/bap-plugins.opam b/bap-plugins.opam index 784ef9f73..a3b950e7c 100644 --- a/bap-plugins.opam +++ b/bap-plugins.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-bundle" {= version} "bap-future" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "fileutils" "ocamlfind" "ppx_bap" {= version} diff --git a/bap-powerpc.opam b/bap-powerpc.opam index ac5cee521..8a789c4af 100644 --- a/bap-powerpc.opam +++ b/bap-powerpc.opam @@ -18,7 +18,7 @@ depends: [ "bap-knowledge" {= version} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-primus-dictionary.opam b/bap-primus-dictionary.opam index 450a6485a..3c6be7a2e 100644 --- a/bap-primus-dictionary.opam +++ b/bap-primus-dictionary.opam @@ -14,7 +14,7 @@ depends: [ "bap-core-theory" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-primus-exploring-scheduler.opam b/bap-primus-exploring-scheduler.opam index e8d0b2bf0..8be1a3e02 100644 --- a/bap-primus-exploring-scheduler.opam +++ b/bap-primus-exploring-scheduler.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-greedy-scheduler.opam b/bap-primus-greedy-scheduler.opam index e8d0b2bf0..8be1a3e02 100644 --- a/bap-primus-greedy-scheduler.opam +++ b/bap-primus-greedy-scheduler.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-limit.opam b/bap-primus-limit.opam index b461ad79a..94d8adbbe 100644 --- a/bap-primus-limit.opam +++ b/bap-primus-limit.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-primus-lisp.opam b/bap-primus-lisp.opam index 1b2adc595..fbd30e7d7 100644 --- a/bap-primus-lisp.opam +++ b/bap-primus-lisp.opam @@ -17,7 +17,7 @@ depends: [ "bap-primus" {= version} "bap-std" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "regular" {= version} "odoc" {with-doc} diff --git a/bap-primus-loader.opam b/bap-primus-loader.opam index d8072e954..a9f32aa9c 100644 --- a/bap-primus-loader.opam +++ b/bap-primus-loader.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ogre" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-mark-visited.opam b/bap-primus-mark-visited.opam index f0dbd8429..cd0b03d34 100644 --- a/bap-primus-mark-visited.opam +++ b/bap-primus-mark-visited.opam @@ -14,7 +14,7 @@ depends: [ "bap-primus-track-visited" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-primus-powerpc.opam b/bap-primus-powerpc.opam index ca01881cc..241dfaddf 100644 --- a/bap-primus-powerpc.opam +++ b/bap-primus-powerpc.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-primus-print.opam b/bap-primus-print.opam index 9c7a5e889..f4e657186 100644 --- a/bap-primus-print.opam +++ b/bap-primus-print.opam @@ -16,7 +16,7 @@ depends: [ "bap-primus" {= version} "bap-std" {= version} "bare" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-promiscuous.opam b/bap-primus-promiscuous.opam index b98fbb057..11a7089ce 100644 --- a/bap-primus-promiscuous.opam +++ b/bap-primus-promiscuous.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-propagate-taint.opam b/bap-primus-propagate-taint.opam index 849dcf30f..afbc82482 100644 --- a/bap-primus-propagate-taint.opam +++ b/bap-primus-propagate-taint.opam @@ -14,7 +14,7 @@ depends: [ "bap-primus" {= version} "bap-std" {= version} "bap-taint" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-random.opam b/bap-primus-random.opam index 6c2fe76a2..7b774dec0 100644 --- a/bap-primus-random.opam +++ b/bap-primus-random.opam @@ -16,7 +16,7 @@ depends: [ "bap-std" {= version} "bitvec-sexp" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "zarith" "odoc" {with-doc} diff --git a/bap-primus-region.opam b/bap-primus-region.opam index c331c980c..13799ec6d 100644 --- a/bap-primus-region.opam +++ b/bap-primus-region.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-round-robin-scheduler.opam b/bap-primus-round-robin-scheduler.opam index e8d0b2bf0..8be1a3e02 100644 --- a/bap-primus-round-robin-scheduler.opam +++ b/bap-primus-round-robin-scheduler.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-symbolic-executor.opam b/bap-primus-symbolic-executor.opam index bdd4bd3a1..6998e00c4 100644 --- a/bap-primus-symbolic-executor.opam +++ b/bap-primus-symbolic-executor.opam @@ -15,7 +15,7 @@ depends: [ "bap-primus-track-visited" {= version} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "regular" {= version} "bitvec" {= version} diff --git a/bap-primus-systems.opam b/bap-primus-systems.opam index a5ea180a2..21d76b20e 100644 --- a/bap-primus-systems.opam +++ b/bap-primus-systems.opam @@ -15,7 +15,7 @@ depends: [ "bap-main" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-taint.opam b/bap-primus-taint.opam index 26e77081b..2cba921ce 100644 --- a/bap-primus-taint.opam +++ b/bap-primus-taint.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-taint" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-test.opam b/bap-primus-test.opam index 93c8c67ad..653765fb7 100644 --- a/bap-primus-test.opam +++ b/bap-primus-test.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-primus-track-visited.opam b/bap-primus-track-visited.opam index b9b4d4b4e..eeb903e21 100644 --- a/bap-primus-track-visited.opam +++ b/bap-primus-track-visited.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-primus-wandering-scheduler.opam b/bap-primus-wandering-scheduler.opam index e8d0b2bf0..8be1a3e02 100644 --- a/bap-primus-wandering-scheduler.opam +++ b/bap-primus-wandering-scheduler.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-x86.opam b/bap-primus-x86.opam index 8287f7ff6..533af693a 100644 --- a/bap-primus-x86.opam +++ b/bap-primus-x86.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-x86" {= version} "odoc" {with-doc} ] diff --git a/bap-primus.opam b/bap-primus.opam index c5d395e63..ed966ba05 100644 --- a/bap-primus.opam +++ b/bap-primus.opam @@ -20,10 +20,10 @@ depends: [ "bap-strings" {= version} "bitvec-binprot" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "graphlib" {= version} "monads" {= version} - "parsexp" {>= "v0.14" & < "v0.16"} + "parsexp" {>= "v0.17"} "ppx_bap" {= version} "regular" {= version} "uuidm" {>= "0.9.7"} diff --git a/bap-print.opam b/bap-print.opam index e96015b10..feea1298f 100644 --- a/bap-print.opam +++ b/bap-print.opam @@ -14,7 +14,7 @@ depends: [ "bap-demangle" {= version} "bap-knowledge" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "graphlib" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-radare2.opam b/bap-radare2.opam index 6dec2df3f..78a4475e1 100644 --- a/bap-radare2.opam +++ b/bap-radare2.opam @@ -21,7 +21,7 @@ depends: [ "bap-std" {= version} "bitvec" {= version} "conf-radare2" - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ogre" {= version} "ppx_bap" {= version} "re" {>= "1.0" & < "2.0"} diff --git a/bap-raw.opam b/bap-raw.opam index 8d8a4935d..284bb12f5 100644 --- a/bap-raw.opam +++ b/bap-raw.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "bap-std" {= version} diff --git a/bap-recipe-command.opam b/bap-recipe-command.opam index 1c83d1688..134c7bea8 100644 --- a/bap-recipe-command.opam +++ b/bap-recipe-command.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-main" {= version} "bap-recipe" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-recipe.opam b/bap-recipe.opam index 30bfdf7d2..421aadd09 100644 --- a/bap-recipe.opam +++ b/bap-recipe.opam @@ -13,8 +13,8 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-common" {= version} - "parsexp" {>= "v0.14" & < "v0.16"} - "stdio" {>= "v0.14" & < "v0.16"} + "parsexp" {>= "v0.17"} + "stdio" {>= "v0.17"} "stdlib-shims" "uuidm" {>= "0.9.7"} "odoc" {with-doc} diff --git a/bap-relocatable.opam b/bap-relocatable.opam index 5ca8913cd..aa0351411 100644 --- a/bap-relocatable.opam +++ b/bap-relocatable.opam @@ -23,7 +23,7 @@ depends: [ "bitvec-order" {= version} "bitvec-sexp" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-report.opam b/bap-report.opam index bd1decb2c..c972bcd9f 100644 --- a/bap-report.opam +++ b/bap-report.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "bap-std" {= version} "odoc" {with-doc} diff --git a/bap-riscv.opam b/bap-riscv.opam index ba986487e..3b397f84b 100644 --- a/bap-riscv.opam +++ b/bap-riscv.opam @@ -17,7 +17,7 @@ depends: [ "bap-c" {= version} "bap-knowledge" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-run.opam b/bap-run.opam index 38acb0bfb..63b318a29 100644 --- a/bap-run.opam +++ b/bap-run.opam @@ -15,7 +15,7 @@ depends: [ "bap-knowledge" {= version} "bap-primus" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "graphlib" {= version} "monads" {= version} "regular" {= version} diff --git a/bap-specification.opam b/bap-specification.opam index 74e4dff1d..e5ac896de 100644 --- a/bap-specification.opam +++ b/bap-specification.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ogre" {= version} "odoc" {with-doc} ] diff --git a/bap-ssa.opam b/bap-ssa.opam index bbf6c0638..938e650a1 100644 --- a/bap-ssa.opam +++ b/bap-ssa.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-common" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-std.opam b/bap-std.opam index 91c0c275b..fb56d24d5 100644 --- a/bap-std.opam +++ b/bap-std.opam @@ -23,7 +23,7 @@ depends: [ "bitvec" {= version} "camlzip" {>= "1.07" & < "2.0"} "cmdliner" - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "fileutils" "graphlib" {= version} "mmap" diff --git a/bap-strings.opam b/bap-strings.opam index 2a1970abd..4a4f01b8c 100644 --- a/bap-strings.opam +++ b/bap-strings.opam @@ -22,7 +22,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-stub-resolver.opam b/bap-stub-resolver.opam index d1dd3c727..ba40719eb 100644 --- a/bap-stub-resolver.opam +++ b/bap-stub-resolver.opam @@ -19,7 +19,7 @@ depends: [ "bitvec-order" {= version} "bitvec-sexp" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ogre" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-symbol-reader.opam b/bap-symbol-reader.opam index f4a6d0124..63d42eb8c 100644 --- a/bap-symbol-reader.opam +++ b/bap-symbol-reader.opam @@ -16,7 +16,7 @@ depends: [ "bap-main" {= version} "bap-relation" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bap-systemz.opam b/bap-systemz.opam index 46f2949d4..e8ef01a04 100644 --- a/bap-systemz.opam +++ b/bap-systemz.opam @@ -16,7 +16,7 @@ depends: [ "bap-main" {= version} "bap-std" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ogre" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-taint-propagator.opam b/bap-taint-propagator.opam index b7918b6cc..fd6a0216e 100644 --- a/bap-taint-propagator.opam +++ b/bap-taint-propagator.opam @@ -13,7 +13,7 @@ depends: [ "bap-common" {= version} "bap-core-theory" {= version} "bap-microx" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "graphlib" {= version} "monads" {= version} "regular" {= version} diff --git a/bap-taint.opam b/bap-taint.opam index 4fc2a1581..5ae4be9d7 100644 --- a/bap-taint.opam +++ b/bap-taint.opam @@ -14,7 +14,7 @@ depends: [ "bap-primus" {= version} "bap-std" {= version} "bap-strings" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "monads" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bap-term-mapper.opam b/bap-term-mapper.opam index b57b3d56c..7fc398e7e 100644 --- a/bap-term-mapper.opam +++ b/bap-term-mapper.opam @@ -14,7 +14,7 @@ depends: [ "bap-common" {= version} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ppx_bap" {= version} "regular" {= version} "odoc" {with-doc} diff --git a/bap-thumb.opam b/bap-thumb.opam index 96c77c4bc..bce86b138 100644 --- a/bap-thumb.opam +++ b/bap-thumb.opam @@ -17,7 +17,7 @@ depends: [ "bap-main" {= version} "bap-std" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ogre" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-toplevel.opam b/bap-toplevel.opam index 3c4179888..c49bab96f 100644 --- a/bap-toplevel.opam +++ b/bap-toplevel.opam @@ -14,7 +14,7 @@ depends: [ "dune" {>= "3.1"} "bap-common" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ocamlfind" "odoc" {with-doc} ] diff --git a/bap-trace.opam b/bap-trace.opam index 3d18922c2..0803981e8 100644 --- a/bap-trace.opam +++ b/bap-trace.opam @@ -15,7 +15,7 @@ depends: [ "bap-plugins" {= version} "bap-std" {= version} "bap-traces" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ppx_bap" {= version} "regular" {= version} "uri" diff --git a/bap-traces.opam b/bap-traces.opam index fd3a34b41..6435c4c8d 100644 --- a/bap-traces.opam +++ b/bap-traces.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-common" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ppx_bap" {= version} "regular" {= version} "uri" {>= "1.9.0"} diff --git a/bap-trivial-condition-form.opam b/bap-trivial-condition-form.opam index c4ae59347..b8699061a 100644 --- a/bap-trivial-condition-form.opam +++ b/bap-trivial-condition-form.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "bap-std" {= version} "odoc" {with-doc} diff --git a/bap-warn-unused.opam b/bap-warn-unused.opam index 0bb27692c..60176d05b 100644 --- a/bap-warn-unused.opam +++ b/bap-warn-unused.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "bap-std" {= version} "odoc" {with-doc} diff --git a/bap-x86.opam b/bap-x86.opam index 4305b3a1a..66cb06380 100644 --- a/bap-x86.opam +++ b/bap-x86.opam @@ -23,7 +23,7 @@ depends: [ "bap-primus" {= version} "bap-std" {= version} "bitvec" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ogre" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bare.opam b/bare.opam index 3cd1fc74d..652645fec 100644 --- a/bare.opam +++ b/bare.opam @@ -13,8 +13,8 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-common" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} - "parsexp" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} + "parsexp" {>= "v0.17"} "odoc" {with-doc} ] build: [ diff --git a/bitvec-binprot.opam b/bitvec-binprot.opam index 3d7b3f5fa..560651399 100644 --- a/bitvec-binprot.opam +++ b/bitvec-binprot.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "bin_prot" {>= "v0.14" & < "v0.16"} + "bin_prot" {>= "v0.17"} "bitvec" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/configure-omake b/configure-omake index 50bb86ba4..be6a8a909 100755 --- a/configure-omake +++ b/configure-omake @@ -4,7 +4,6 @@ export OPAMCLI=2.0 rm -f _oasis setup.log.om setup.data _oasis_setup.om mv oasis/benchmarks oasis/benchmarks.backup -mv oasis/piqi-printers oasis/piqi-printers.backup mv oasis/common oasis/common.backup cp oasis/common.omake oasis/common SECTIONS=`ocaml tools/oasis_sections.ml --sections --enable-everything` @@ -14,7 +13,6 @@ ocaml tools/cat.ml '"\n# $name\n"' -- $SECTIONS $AB _oasis ocaml tools/cat.ml '"\n#1 \"$name\"\n"' -- setup.ml.pre.in $SETUPS setup.ml.in setup.ml cp oasis/common.backup oasis/common cp oasis/benchmarks.backup oasis/benchmarks -cp oasis/piqi-printers.backup oasis/piqi-printers sed -i 's/.*Build$.*//' _oasis sed -i 's/.*CCOpt:.*//' _oasis sed -i 's/.*CCLib:.*//' _oasis diff --git a/dune-project b/dune-project index 32c2e9753..f73bf62b9 100644 --- a/dune-project +++ b/dune-project @@ -136,12 +136,12 @@ (share signatures) (share site_lisp)) (depends - (base (and (>= v0.14) (< v0.16))) + (base (>= v0.17)) dune dune-configurator dune-site - (ocaml (> 4.08.0)) - (stdio (and (>= v0.14) (< v0.16))))) + (ocaml (>= 5.1.0)) + (stdio (>= v0.17)))) (package (name bap-primus-support) @@ -176,7 +176,7 @@ (depends (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)) (regular (= :version)))) @@ -191,7 +191,7 @@ (bap-main (= :version)) (bap-std (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (linenoise (and (>= 1.1.0) (< 2.0.0))) (monads (= :version)) (bap-common (= :version)) @@ -204,7 +204,7 @@ (depends (bap-common (= :version)) (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) fileutils (ppx_bap (= :version)) (regular (= :version)))) @@ -225,7 +225,7 @@ (bap-traces (= :version)) (bitvec-order (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (bap-common (= :version)) (ogre (= :version)) @@ -243,7 +243,7 @@ (bap-primus (= :version)) (bap-std (= :version)) (bap-strings (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (bap-common (= :version)) (ppx_bap (= :version)) @@ -261,7 +261,7 @@ (bap-std (= :version)) (bitvec-order (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (bap-common (= :version)) (ogre (= :version)) @@ -273,7 +273,7 @@ (tags (bap bap-library)) (depends (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)))) @@ -285,7 +285,7 @@ (bap-signatures (= :version)) (bap-std (= :version)) (camlzip (and (>= 1.0) (< 2.0))) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)) (regular (= :version)) @@ -299,7 +299,7 @@ (bap-byteweight (= :version)) (bap-std (= :version)) (cmdliner (and (>= 1.0) (< 2.0))) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) fileutils (bap-common (= :version)) (ocurl (>= 0.9.0)) @@ -311,7 +311,7 @@ (synopsis "BAP Build Tool (ocamlbuild+bap)") (tags (bap bap-tool ocamlbuild)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) ocamlbuild ocamlfind @@ -323,7 +323,7 @@ (tags (bap bap-tool)) (depends (camlzip (and (>= 1.0) (< 2.0))) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) fileutils (bap-common (= :version)) (ppx_bap (= :version)) @@ -339,7 +339,7 @@ (bap-core-theory (= :version)) (bap-knowledge (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)))) @@ -350,7 +350,7 @@ (depends (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) fileutils mmap (bap-common (= :version)) @@ -365,7 +365,7 @@ (depends (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (graphlib (= :version)) (bap-common (= :version)) (ppx_bap (= :version)) @@ -378,7 +378,7 @@ (tags (bap bap-plugin bap-pass)) (depends (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)))) (package @@ -398,7 +398,7 @@ details of the program behavior.") (bitvec-binprot (= :version)) (bitvec-order (= :version)) (bitvec-sexp (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)))) @@ -409,7 +409,7 @@ details of the program behavior.") (depends (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)))) (package @@ -420,7 +420,7 @@ details of the program behavior.") (bap-demangle (= :version)) (bap-std (= :version)) (conf-binutils (>= 0.3)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)))) (package @@ -431,7 +431,7 @@ details of the program behavior.") (bap-core-theory (= :version)) (bap-knowledge (= :version)) (bap-main (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)))) (package @@ -441,7 +441,7 @@ details of the program behavior.") (depends (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ogre (= :version)) (ppx_bap (= :version)) @@ -461,7 +461,7 @@ details of the program behavior.") (bitvec-order (= :version)) (bitvec-sexp (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (bap-common (= :version)) (ogre (= :version)) @@ -474,7 +474,7 @@ details of the program behavior.") (tags (bap bap-plugin)) (depends (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (graphlib (= :version)) (bap-common (= :version)) (ppx_bap (= :version)) @@ -486,7 +486,7 @@ details of the program behavior.") (tags (bap bap-library dwarf)) (depends (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)) (regular (= :version)))) @@ -501,7 +501,7 @@ details of the program behavior.") (bap-knowledge (= :version)) (bap-std (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + (core_kernel (>= v0.17)))) (package (name bap-elf) @@ -510,7 +510,7 @@ details of the program behavior.") (depends (bap-dwarf (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)) (ppx_bitstring (and (>= 4.0.0) (< 5.0.0))) @@ -522,7 +522,7 @@ details of the program behavior.") (tags (bap bap-plugin)) (depends (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)))) (package @@ -534,7 +534,7 @@ details of the program behavior.") (bap-knowledge (= :version)) (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) ocamlfind (regular (= :version)))) @@ -546,7 +546,7 @@ details of the program behavior.") (depends (bap-c (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (FrontC (>= 4.1.0)) (bap-common (= :version)))) @@ -558,7 +558,7 @@ A library for reasoning about state based dynamic systems. This can \ be seen as a common denominator between Lwt and Async libraries.") (tags (bap future)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (bap-common (= :version)))) @@ -568,7 +568,7 @@ be seen as a common denominator between Lwt and Async libraries.") (tags (bap ghidra disassembler)) (allow_empty) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ppx_bap (= :version)) (bap-common (= :version)) (bap-std (= :version)) @@ -583,7 +583,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-c (= :version)) (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ogre (= :version)))) @@ -591,7 +591,7 @@ be seen as a common denominator between Lwt and Async libraries.") (synopsis "BAP IDA Pro integration") (tags (bap bap-library ida-pro)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (regular (= :version)) fileutils (bap-common (= :version)) @@ -604,7 +604,7 @@ be seen as a common denominator between Lwt and Async libraries.") (tags (bap bap-plugin bap-ida ida-pro)) (depends (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)) (regular (= :version)))) @@ -614,7 +614,7 @@ be seen as a common denominator between Lwt and Async libraries.") (synopsis "Knowledge Reasoning and Representation Framework") (tags (bap bap-library knowledge)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ppx_bap (= :version)) (bap-common (= :version)) (monads (= :version)))) @@ -626,7 +626,7 @@ be seen as a common denominator between Lwt and Async libraries.") (depends (bap-std (= :version)) (conf-bap-llvm (>= 1.8)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) mmap (monads (= :version)) (bap-common (= :version)) @@ -642,10 +642,10 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-future (= :version)) (bap-plugins (= :version)) (bap-recipe (= :version)) - (base (and (>= v0.14) (< v0.16))) + (base (>= v0.17)) (cmdliner (and (>= 1.0) (< 2.0))) (bap-common (= :version)) - (stdio (and (>= v0.14) (< v0.16))))) + (stdio (>= v0.17)))) (package (name bap-mc) @@ -657,7 +657,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-main (= :version)) (bap-std (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ogre (= :version)) (ppx_bap (= :version)) @@ -669,7 +669,7 @@ be seen as a common denominator between Lwt and Async libraries.") (tags (bap bap-plugin)) (depends (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (bap-common (= :version)) (ppx_bap (= :version)))) @@ -686,7 +686,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-knowledge (= :version)) (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ogre (= :version)) (ppx_bap (= :version)) @@ -707,7 +707,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bitvec-sexp (= :version)) (bitvec (= :version)) (conf-binutils (>= 0.3)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)) (re (and (>= 1.0) (< 2.0))))) @@ -717,7 +717,7 @@ be seen as a common denominator between Lwt and Async libraries.") (synopsis "A BAP IR optimization pass") (tags (bap bap-plugin bap-pass)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)) (bap-std (= :version)) @@ -739,7 +739,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bitvec-order (= :version)) (bitvec-sexp (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) fileutils (bap-common (= :version)) (ppx_bap (= :version)) @@ -755,23 +755,13 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-std (= :version)) cmdliner (cmdliner (and (>= 1.0) (< 2.0))) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) ezjsonm (graphlib (= :version)) (ppx_bap (= :version)) (regular (= :version)) (text-tags (= :version)))) -(package - (name bap-piqi) - (synopsis "Serializes BAP Project in various formats using piqi") - (tags (bap bap-plugin)) - (depends - (bap-common (= :version)) - (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) - (piqi (>= 0.7.8)))) - (package (name bap-plugins) (synopsis "BAP Plugin management library") @@ -780,7 +770,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-bundle (= :version)) (bap-future (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) fileutils ocamlfind (ppx_bap (= :version)) @@ -799,7 +789,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-knowledge (= :version)) (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (ogre (= :version)) (ppx_bap (= :version)) @@ -821,10 +811,10 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-strings (= :version)) (bitvec-binprot (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (graphlib (= :version)) (monads (= :version)) - (parsexp (and (>= v0.14) (< v0.16))) + (parsexp (>= v0.17)) (ppx_bap (= :version)) (regular (= :version)) (uuidm (>= 0.9.7)))) @@ -838,7 +828,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-core-theory (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + (core_kernel (>= v0.17)))) (package (name bap-primus-exploring-scheduler) @@ -848,7 +838,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)))) (package @@ -859,7 +849,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)))) (package @@ -870,7 +860,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + (core_kernel (>= v0.17)))) (package (name bap-primus-lisp) @@ -884,7 +874,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-primus (= :version)) (bap-std (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (regular (= :version)))) @@ -896,7 +886,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ogre (= :version)))) (package @@ -908,7 +898,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-primus-track-visited (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + (core_kernel (>= v0.17)))) (package (name bap-primus-powerpc) @@ -918,7 +908,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + (core_kernel (>= v0.17)))) (package (name bap-primus-print) @@ -931,7 +921,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-primus (= :version)) (bap-std (= :version)) (bare (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)))) (package @@ -942,7 +932,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)))) (package @@ -954,7 +944,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-primus (= :version)) (bap-std (= :version)) (bap-taint (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)))) (package @@ -968,7 +958,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-std (= :version)) (bitvec-sexp (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) zarith)) @@ -980,7 +970,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)))) (package @@ -991,7 +981,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)))) (package @@ -1005,7 +995,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-primus-track-visited (= :version)) (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (regular (= :version)) (bitvec (= :version)) @@ -1022,7 +1012,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-main (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)))) (package @@ -1033,7 +1023,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-taint (= :version)))) (package @@ -1044,7 +1034,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + (core_kernel (>= v0.17)))) (package (name bap-primus-track-visited) @@ -1054,7 +1044,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + (core_kernel (>= v0.17)))) (package (name bap-primus-wandering-scheduler) @@ -1064,7 +1054,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)))) (package @@ -1075,7 +1065,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-common (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-x86 (= :version)))) (package @@ -1087,7 +1077,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-demangle (= :version)) (bap-knowledge (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (graphlib (= :version)) (ogre (= :version)) (ppx_bap (= :version)) @@ -1112,7 +1102,7 @@ be seen as a common denominator between Lwt and Async libraries.") (bap-std (= :version)) (bitvec (= :version)) conf-radare2 - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ogre (= :version)) (ppx_bap (= :version)) (re (and (>= 1.0) (< 2.0))) @@ -1124,7 +1114,7 @@ be seen as a common denominator between Lwt and Async libraries.") (synopsis "BAP raw files loader") (tags (bap bap-plugin)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)) (bap-std (= :version)) @@ -1140,8 +1130,8 @@ and support files if necessary.") (tags (bap bap-tool command-line)) (depends (bap-common (= :version)) - (parsexp (and (>= v0.14) (< v0.16))) - (stdio (and (>= v0.14) (< v0.16))) + (parsexp (>= v0.17)) + (stdio (>= v0.17)) stdlib-shims (uuidm (>= 0.9.7)))) @@ -1153,7 +1143,7 @@ and support files if necessary.") (bap-common (= :version)) (bap-main (= :version)) (bap-recipe (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + (core_kernel (>= v0.17)))) (package (name bap-relation) @@ -1184,7 +1174,7 @@ between the sets.") (bitvec-order (= :version)) (bitvec-sexp (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (ogre (= :version)) (ppx_bap (= :version)))) @@ -1194,7 +1184,7 @@ between the sets.") (synopsis "BAP plugin for reporting progress bars and statuses") (tags (bap bap-plugin)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (bap-std (= :version)))) @@ -1210,7 +1200,7 @@ between the sets.") (bap-c (= :version)) (bap-knowledge (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (ogre (= :version)) (ppx_bap (= :version)))) @@ -1225,7 +1215,7 @@ between the sets.") (bap-knowledge (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (graphlib (= :version)) (monads (= :version)) (regular (= :version)))) @@ -1238,7 +1228,7 @@ between the sets.") (bap-common (= :version)) (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ogre (= :version)))) (package @@ -1248,7 +1238,7 @@ between the sets.") (depends (bap-common (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + (core_kernel (>= v0.17)))) (package (name bap-std) @@ -1268,7 +1258,7 @@ between the sets.") (bitvec (= :version)) (camlzip (and (>= 1.07) (< 2.0))) cmdliner - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) fileutils (graphlib (= :version)) mmap @@ -1301,7 +1291,7 @@ The library provides several algorithms: - Scanner - a generic algorithm for finding strings of characters (a library variant of strings tool)") (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)))) @@ -1310,7 +1300,7 @@ The library provides several algorithms: (synopsis "Finds strings in binaries using microexecution") (tags (bap bap-plugin)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (bap-beagle (= :version)) (ppx_bap (= :version)) @@ -1332,7 +1322,7 @@ The library provides several algorithms: (bitvec-order (= :version)) (bitvec-sexp (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ogre (= :version)) (ppx_bap (= :version)))) @@ -1347,7 +1337,7 @@ The library provides several algorithms: (bap-main (= :version)) (bap-relation (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + (core_kernel (>= v0.17)))) (package (name bap-systemz) @@ -1360,7 +1350,7 @@ The library provides several algorithms: (bap-main (= :version)) (bap-std (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ogre (= :version)) (ppx_bap (= :version)))) @@ -1373,7 +1363,7 @@ The library provides several algorithms: (bap-primus (= :version)) (bap-std (= :version)) (bap-strings (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (monads (= :version)) (ppx_bap (= :version)) (regular (= :version)))) @@ -1386,7 +1376,7 @@ The library provides several algorithms: (bap-common (= :version)) (bap-core-theory (= :version)) (bap-microx (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (graphlib (= :version)) (monads (= :version)) (regular (= :version)))) @@ -1400,7 +1390,7 @@ The library provides several algorithms: (bap-common (= :version)) (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ppx_bap (= :version)) (regular (= :version)))) @@ -1416,7 +1406,7 @@ The library provides several algorithms: (bap-main (= :version)) (bap-std (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ogre (= :version)) (ppx_bap (= :version)))) @@ -1432,7 +1422,7 @@ as the interpreter for your BAP scripts, e.g., `baptop myprog.ml`") (depends (bap-common (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) ocamlfind)) (package @@ -1445,7 +1435,7 @@ as the interpreter for your BAP scripts, e.g., `baptop myprog.ml`") (bap-plugins (= :version)) (bap-std (= :version)) (bap-traces (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ppx_bap (= :version)) (regular (= :version)) uri)) @@ -1457,7 +1447,7 @@ as the interpreter for your BAP scripts, e.g., `baptop myprog.ml`") (depends (bap-common (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ppx_bap (= :version)) (regular (= :version)) (uri (>= 1.9.0)) @@ -1468,7 +1458,7 @@ as the interpreter for your BAP scripts, e.g., `baptop myprog.ml`") (synopsis "Eliminates complex branch conditions") (tags (bap bap-plugin)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (bap-std (= :version)))) @@ -1477,7 +1467,7 @@ as the interpreter for your BAP scripts, e.g., `baptop myprog.ml`") (synopsis "Warns if an unused argument may cause an issue") (tags (bap bap-plugin)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (bap-std (= :version)))) @@ -1500,7 +1490,7 @@ as the interpreter for your BAP scripts, e.g., `baptop myprog.ml`") (bap-primus (= :version)) (bap-std (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (ogre (= :version)) (ppx_bap (= :version)) (regular (= :version)) @@ -1515,8 +1505,8 @@ of facts that are represented as s-expressions.") (tags (bap bap-library)) (depends (bap-common (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) - (parsexp (and (>= v0.14) (< v0.16))))) + (core_kernel (>= v0.17)) + (parsexp (>= v0.17)))) (package (name bitvec) @@ -1529,7 +1519,7 @@ of facts that are represented as s-expressions.") (synopsis "Janestreet's Binprot serialization for Bitvec") (tags (bap)) (depends - (bin_prot (and (>= v0.14) (< v0.16))) + (bin_prot (>= v0.17)) (bitvec (= :version)) (ppx_bap (= :version)))) @@ -1564,7 +1554,7 @@ these functors, any algorithm written for OCamlGraph can be used on \ (tags (bap graph)) (depends (bap-common (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) ocamlgraph (ppx_bap (= :version)) (regular (= :version)))) @@ -1576,7 +1566,8 @@ these functors, any algorithm written for OCamlGraph can be used on \ (tags (bap monad)) (depends (bap-common (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) + (jane_rope (>= v0.17)) (ppx_bap (= :version)))) (package @@ -1588,7 +1579,7 @@ representation and provides a type safe monadic interface for quering \ and updating documents") (tags (bap sexp)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (monads (= :version)))) @@ -1597,22 +1588,22 @@ and updating documents") (synopsis "BAP-blessed ppx rewriters") (tags (bap ppx)) (depends - (ppx_assert (and (>= v0.14) (< v0.16))) - (ppx_bench (and (>= v0.14) (< v0.16))) - (ppx_bin_prot (and (>= v0.14) (< v0.16))) - (ppx_cold (and (>= v0.14) (< v0.16))) - (ppx_compare (and (>= v0.14) (< v0.16))) - (ppx_enumerate (and (>= v0.14) (< v0.16))) - (ppx_fields_conv (and (>= v0.14) (< v0.16))) - (ppx_hash (and (>= v0.14) (< v0.16))) - (ppx_here (and (>= v0.14) (< v0.16))) + (ppx_assert (>= v0.17)) + (ppx_bench (>= v0.17)) + (ppx_bin_prot (>= v0.17)) + (ppx_cold (>= v0.17)) + (ppx_compare (>= v0.17)) + (ppx_enumerate (>= v0.17)) + (ppx_fields_conv (>= v0.17)) + (ppx_hash (>= v0.17)) + (ppx_here (>= v0.17)) (ppxlib (>= 0.15.0)) - (ppx_optcomp (and (>= v0.14) (< v0.16))) - (ppx_expect (and (>= v0.14) (< v0.16))) - (ppx_inline_test (and (>= v0.14) (< v0.16))) - (ppx_sexp_conv (and (>= v0.14) (< v0.16))) - (ppx_sexp_value (and (>= v0.14) (< v0.16))) - (ppx_variants_conv (and (>= v0.14) (< v0.16))))) + (ppx_optcomp (>= v0.17)) + (ppx_expect (>= v0.17)) + (ppx_inline_test (>= v0.17)) + (ppx_sexp_conv (>= v0.17)) + (ppx_sexp_value (>= v0.17)) + (ppx_variants_conv (>= v0.17)))) (package (name regular) @@ -1631,7 +1622,7 @@ In particular, the library includes: \ - module Seq that extends Core_kernel's sequence module \ - module Bytes that provides a rich core-like interface for Bytes data type.") (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)) (ppx_bap (= :version)))) @@ -1640,7 +1631,7 @@ In particular, the library includes: \ (synopsis "A library for rich formatting using semantic tags") (tags (bap)) (depends - (core_kernel (and (>= v0.14) (< v0.16))) + (core_kernel (>= v0.17)) (bap-common (= :version)))) (generate_opam_files true) diff --git a/graphlib.opam b/graphlib.opam index db28362d1..4bb852144 100644 --- a/graphlib.opam +++ b/graphlib.opam @@ -13,7 +13,7 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-common" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "ocamlgraph" "ppx_bap" {= version} "regular" {= version} diff --git a/lib/arm/arm_lifter.ml b/lib/arm/arm_lifter.ml index 38f242c85..3161010c7 100644 --- a/lib/arm/arm_lifter.ml +++ b/lib/arm/arm_lifter.ml @@ -1073,7 +1073,7 @@ module CPU = struct pc; spsr; cpsr; itstate; ] - let gpr = Var.Set.diff regs non_gpr + let gpr = Set.diff regs non_gpr let perms = Var.Set.of_list [ r4; r5; r6; r7; r8; r9; r10; r11; diff --git a/lib/bap/bap_project.ml b/lib/bap/bap_project.ml index 8327749ff..41ebcd922 100644 --- a/lib/bap/bap_project.ml +++ b/lib/bap/bap_project.ml @@ -13,7 +13,7 @@ open Format module Driver = Bap_disasm_driver -module Buffer = Caml.Buffer +module Buffer = Stdlib.Buffer include Bap_self.Create() let query doc attr = @@ -713,7 +713,7 @@ module Pass = struct let fail = function | Unsat_dep _ as err -> raise (Failed err) | Runtime_error (pass,exn) -> - let backtrace = Caml.Printexc.get_backtrace () in + let backtrace = Stdlib.Printexc.get_backtrace () in raise (Failed (Runtime_error (pass, Exn.Reraised (backtrace, exn)))) let is_evaled pass proj = diff --git a/lib/bap/bap_self.ml b/lib/bap/bap_self.ml index f972f2dd4..a4a129ffb 100644 --- a/lib/bap/bap_self.ml +++ b/lib/bap/bap_self.ml @@ -6,8 +6,8 @@ open Format open Cmdliner module Event = Bap_main_event -module Buffer = Caml.Buffer -module Sys = Caml.Sys +module Buffer = Stdlib.Buffer +module Sys = Stdlib.Sys module Create() = struct let main = @@ -50,7 +50,7 @@ module Create() = struct else filter_args name let has_var v = match Sys.getenv ("BAP_" ^ String.uppercase v) with - | exception Caml.Not_found -> false + | exception Stdlib.Not_found -> false | "false" | "0" -> false | _ -> true @@ -123,7 +123,7 @@ module Create() = struct try Ok (f {get = fun x -> Future.peek_exn x}) with | Invalid_argument s -> Error (Error.Invalid s) | exn -> - let backtrace = Caml.Printexc.get_backtrace () in + let backtrace = Stdlib.Printexc.get_backtrace () in Error (Error.Bug (exn,backtrace)) let when_ready f = declare_extension f diff --git a/lib/bap_bundle/bap_bundle.ml b/lib/bap_bundle/bap_bundle.ml index 28d092dbf..545481f7c 100644 --- a/lib/bap_bundle/bap_bundle.ml +++ b/lib/bap_bundle/bap_bundle.ml @@ -1,14 +1,14 @@ open Core_kernel[@@warning "-D"] -module Filename = Caml.Filename -module Sys = Caml.Sys +module Filename = Stdlib.Filename +module Sys = Stdlib.Sys module Std = struct exception Not_a_bundle module Manifest = struct - let getenv key = try Sys.getenv key with Caml.Not_found -> "unknown" + let getenv key = try Sys.getenv key with Stdlib.Not_found -> "unknown" type t = { name : string; @@ -165,12 +165,12 @@ module Std = struct let name = Option.value name ~default:path in Zip.copy_entry_to_file zip entry name; Some (Uri.of_string name) - with Caml.Not_found -> None + with Stdlib.Not_found -> None let get_data b name = b >>> fun zip -> try Some Zip.(read_entry zip (find_entry zip name)) - with Caml.Not_found -> None + with Stdlib.Not_found -> None let list b = b >>> fun zip -> diff --git a/lib/bap_byteweight/bap_byteweight.ml b/lib/bap_byteweight/bap_byteweight.ml index 3fc8e609d..1faa5a90a 100644 --- a/lib/bap_byteweight/bap_byteweight.ml +++ b/lib/bap_byteweight/bap_byteweight.ml @@ -117,9 +117,9 @@ module Bytes = struct let t = Bap_byteweight_signatures.Data.declare "bytes" ~load:(fun bytes -> Binable.of_string (module Self) - (Caml.Bytes.unsafe_to_string bytes)) + (Stdlib.Bytes.unsafe_to_string bytes)) ~save:(fun data -> - Caml.Bytes.unsafe_of_string @@ + Stdlib.Bytes.unsafe_of_string @@ Binable.to_string (module Self) data) include Self diff --git a/lib/bap_byteweight/bap_byteweight_signatures.ml b/lib/bap_byteweight/bap_byteweight_signatures.ml index 0ecc78596..581fb4092 100644 --- a/lib/bap_byteweight/bap_byteweight_signatures.ml +++ b/lib/bap_byteweight/bap_byteweight_signatures.ml @@ -1,7 +1,7 @@ open Core_kernel[@@warning "-D"] open Bap_core_theory open Bap.Std -module Sys = Caml.Sys +module Sys = Stdlib.Sys module Config = Bap_main.Extension.Configuration @@ -122,7 +122,7 @@ let copy input output = loop () let temporary_copy file = - let tmp,output = Caml.Filename.open_temp_file "byteweight" "copy" in + let tmp,output = Stdlib.Filename.open_temp_file "byteweight" "copy" in In_channel.with_file file ~f:(fun input -> copy input output); Out_channel.close output; tmp @@ -169,8 +169,8 @@ let load_exn ?comp ?path ~mode arch = let entry_path = entry ?comp ~mode arch in let r = try let entry = Zip.find_entry zip entry_path in - Ok (Zip.read_entry zip entry |> Caml.Bytes.unsafe_of_string) - with Caml.Not_found -> fail (`No_entry entry_path) + Ok (Zip.read_entry zip entry |> Stdlib.Bytes.unsafe_of_string) + with Stdlib.Not_found -> fail (`No_entry entry_path) | Zip.Error (_,ent,err) -> zip_error ent err in Zip.close_in zip; r diff --git a/lib/bap_core_theory/bap_core_theory.ml b/lib/bap_core_theory/bap_core_theory.ml index 54cc3740f..129025f78 100644 --- a/lib/bap_core_theory/bap_core_theory.ml +++ b/lib/bap_core_theory/bap_core_theory.ml @@ -45,9 +45,9 @@ module Theory = struct type filetype = Filetype.t type 'a value = 'a Value.t - type 'a effect = 'a Effect.t + type 'a effect_ = 'a Effect.t type 'a pure = 'a value knowledge - type 'a eff = 'a effect knowledge + type 'a eff = 'a effect_ knowledge type bool = Bool.t pure diff --git a/lib/bap_core_theory/bap_core_theory.mli b/lib/bap_core_theory/bap_core_theory.mli index d0968f920..42a9e42ce 100644 --- a/lib/bap_core_theory/bap_core_theory.mli +++ b/lib/bap_core_theory/bap_core_theory.mli @@ -364,7 +364,7 @@ *) open Core_kernel[@@warning "-D"] -open Caml.Format +open Stdlib.Format open Bap_knowledge @@ -953,7 +953,7 @@ module Theory : sig end type 'a value = 'a Value.t - type 'a effect = 'a Effect.t + type 'a effect_ = 'a Effect.t (** The sort for boolean values. @@ -1074,7 +1074,7 @@ module Theory : sig end type 'a pure = 'a value knowledge - type 'a eff = 'a effect knowledge + type 'a eff = 'a effect_ knowledge type ('r,'s) format = ('r,'s) Float.format @@ -3788,7 +3788,7 @@ module Theory : sig - [bitv] - produces terms of type ['a bitv]; - [bool] - produces terms of type [bool]; - [mem] - produces terms of type [('k,'v) mem]; - - [stmt] - produces terms of type ['a effect]; + - [stmt] - produces terms of type ['a effect_]; - [float] - produces terms of type [('f,'s) float]; - [rmode] - produces terms of type [rmode]. diff --git a/lib/bap_core_theory/bap_core_theory_definition.ml b/lib/bap_core_theory/bap_core_theory_definition.ml index a4cc37ea3..e90fa15f4 100644 --- a/lib/bap_core_theory/bap_core_theory_definition.ml +++ b/lib/bap_core_theory/bap_core_theory_definition.ml @@ -9,12 +9,12 @@ module Program = Bap_core_theory_program module Label = Program.Label type 'a value = 'a Value.t -type 'a effect = 'a Effect.t +type 'a effect_ = 'a Effect.t type program = Program.cls type 'a pure = 'a value knowledge -type 'a eff = 'a effect knowledge +type 'a eff = 'a effect_ knowledge type bool = Bool.t pure type 'a bitv = 'a Bitv.t pure diff --git a/lib/bap_core_theory/bap_core_theory_value.ml b/lib/bap_core_theory/bap_core_theory_value.ml index 648626d6e..5fd7484cf 100644 --- a/lib/bap_core_theory/bap_core_theory_value.ml +++ b/lib/bap_core_theory/bap_core_theory_value.ml @@ -1,5 +1,5 @@ open Core_kernel[@@warning "-D"] -open Caml.Format +open Stdlib.Format open Bap_knowledge module KB = Knowledge @@ -158,7 +158,7 @@ end let of_sexpable x = x end) - include Binable.Of_binable(Exp)(struct + include Binable.Of_binable_without_uuid(Exp)(struct type t = top let to_binable x = x let of_binable x = x diff --git a/lib/bap_core_theory/bap_core_theory_value.mli b/lib/bap_core_theory/bap_core_theory_value.mli index f05a8da58..680bcddbf 100644 --- a/lib/bap_core_theory/bap_core_theory_value.mli +++ b/lib/bap_core_theory/bap_core_theory_value.mli @@ -1,5 +1,5 @@ open Core_kernel[@@warning "-D"] -open Caml.Format +open Stdlib.Format open Bap_knowledge module KB = Knowledge diff --git a/lib/bap_core_theory/bap_core_theory_var.ml b/lib/bap_core_theory/bap_core_theory_var.ml index 0b89dc7ef..d77d6c2d0 100644 --- a/lib/bap_core_theory/bap_core_theory_var.ml +++ b/lib/bap_core_theory/bap_core_theory_var.ml @@ -1,6 +1,6 @@ open Core_kernel[@@warning "-D"] -open Caml.Format +open Stdlib.Format open Bap_knowledge open Bap_core_theory_value open Knowledge.Syntax diff --git a/lib/bap_disasm/bap_disasm_basic.ml b/lib/bap_disasm/bap_disasm_basic.ml index 5d5344f5c..b840fce10 100644 --- a/lib/bap_disasm/bap_disasm_basic.ml +++ b/lib/bap_disasm/bap_disasm_basic.ml @@ -94,7 +94,7 @@ module Table = struct } let lookup t pos = - Int.Table.find_or_add t.cache pos ~default:(fun () -> + Hashtbl.find_or_add t.cache pos ~default:(fun () -> if pos < 0 || pos >= t.size then "ERROR" else match Bigstring.find ~pos '\x00' t.data with | None -> "ERROR" @@ -500,14 +500,14 @@ let push_pred s p = let reset_predicates s ps = C.predicates_clear !!(s.dis); - Preds.iter ps ~f:(push_pred s); + Set.iter ps ~f:(push_pred s); C.predicates_push !!(s.dis) Is_invalid let with_preds s (ps : pred list) = let ps = Preds.of_list ps in - let drop = Preds.diff s.current.preds ps in - if Preds.is_empty drop - then Preds.iter (Preds.diff ps s.current.preds) ~f:(push_pred s) + let drop = Set.diff s.current.preds ps in + if Set.is_empty drop + then Set.iter (Set.diff ps s.current.preds) ~f:(push_pred s) else reset_predicates s ps; {s with current = {s.current with preds = ps}} @@ -519,7 +519,7 @@ let last s n = let n = min n m in List.init n ~f:(fun i -> s.insns.(m - i - 1)) -let preds s = Preds.to_list s.current.preds +let preds s = Set.to_list s.current.preds let addr s = Addr.(Mem.min_addr s.current.mem ++ s.current.off) diff --git a/lib/bap_disasm/bap_disasm_calls.ml b/lib/bap_disasm/bap_disasm_calls.ml index 9fb64d0dd..6b9389ab8 100644 --- a/lib/bap_disasm/bap_disasm_calls.ml +++ b/lib/bap_disasm/bap_disasm_calls.ml @@ -93,7 +93,7 @@ end module Parents = struct type t = (word,Parent.t) Solution.t - include Binable.Of_binable(struct + include Binable.Of_binable_without_uuid(struct type t = (word * Parent.t) Seq.t [@@deriving bin_io] end)(struct type t = (word,Parent.t) Solution.t diff --git a/lib/bap_disasm/bap_disasm_insn.ml b/lib/bap_disasm/bap_disasm_insn.ml index 7606a217a..2c3874f69 100644 --- a/lib/bap_disasm/bap_disasm_insn.ml +++ b/lib/bap_disasm/bap_disasm_insn.ml @@ -52,7 +52,7 @@ module Props = struct module T = struct type t = Z.t include Sexpable.Of_stringable(Bits) - include Binable.Of_stringable(Bits) + include Binable.Of_stringable_without_uuid(Bits) [@@warning "-D"] end @@ -241,11 +241,11 @@ module Analyzer = struct | _ -> indirect jump jumps method! enter_stmt s (effs,jumps) = match Bil.(decode call s) with | None -> super#enter_stmt s (effs,jumps) - | Some _ -> Effects.add effs `Call, jumps + | Some _ -> Set.add effs `Call, jumps end let run bil = - let cons c = Fn.flip @@ if c then Effects.add else Fn.const in + let cons c = Fn.flip @@ if c then Set.add else Fn.const in let effs,jump = analyzer#run bil (Effects.empty,no_jumps) in if not jump.jump then effs else @@ -260,7 +260,7 @@ let derive_props ?bil insn = | None -> Analyzer.Effects.empty in let is = Insn.is insn in let is_bil = if Option.is_some bil - then Analyzer.Effects.mem bil_effects else is in + then Set.mem bil_effects else is in let is_return = is `Return in let is_call = is_bil `Call || is `Call in let is_conditional_jump = is_bil `Conditional_branch in @@ -288,25 +288,25 @@ let (<--) slot value insn = KB.Value.put slot insn value let write init ops = List.fold ~init ops ~f:(fun init f -> f init) -let set_basic effect insn : t = - write effect Slot.[ +let set_basic effect_ insn : t = + write effect_ Slot.[ name <-- Insn.name insn; asm <-- Insn.asm insn; ops <-- Some (Insn.ops insn); ] let of_basic ?bil insn : t = - let effect = + let effect_ = KB.Value.put Bil.slot (KB.Value.empty Theory.Semantics.cls) (Option.value bil ~default:[]) in - write (set_basic effect insn) Slot.[ + write (set_basic effect_ insn) Slot.[ Props.slot <-- derive_props ?bil insn; ] -let with_basic effect insn : t = - let bil = KB.Value.get Bil.slot effect in - write (set_basic effect insn) Slot.[ +let with_basic effect_ insn : t = + let bil = KB.Value.get Bil.slot effect_ in + write (set_basic effect_ insn) Slot.[ Props.slot <-- derive_props ~bil insn ] diff --git a/lib/bap_dwarf/dwarf_data.ml b/lib/bap_dwarf/dwarf_data.ml index b11d32162..058aca05b 100644 --- a/lib/bap_dwarf/dwarf_data.ml +++ b/lib/bap_dwarf/dwarf_data.ml @@ -40,7 +40,7 @@ let create endian ss : 'a t Or_error.t = let section t section = - match Section.Map.find t.sections section with + match Map.find t.sections section with | Some buf -> Ok buf | None -> Or_error.errorf "section %s is not available" @@ diff --git a/lib/bap_dwarf/dwarf_fbi.ml b/lib/bap_dwarf/dwarf_fbi.ml index 0bf00e12d..f57901ad7 100644 --- a/lib/bap_dwarf/dwarf_fbi.ml +++ b/lib/bap_dwarf/dwarf_fbi.ml @@ -152,7 +152,7 @@ let create_table s str_sec str ~pos_ref = | Subprogram | Entry_point | Inlined_subroutine -> Input.take | _ -> Input.drop in read_scheme s str_sec action str ~pos_ref - >>= fun scheme -> match Table.add abbrs ~key:code ~data:scheme with + >>= fun scheme -> match Hashtbl.add abbrs ~key:code ~data:scheme with | `Ok -> fill () | `Duplicate -> errorf "Duplicate entry code: %d" code in fill () >>| fun () -> abbrs @@ -160,7 +160,7 @@ let create_table s str_sec str ~pos_ref = let lookup table code = let error = Error.create "unknown code" code sexp_of_int in - Result.of_option ~error @@ Table.find table code + Result.of_option ~error @@ Hashtbl.find table code let run_scheme scheme str ~pos_ref : value list Or_error.t = @@ -173,12 +173,12 @@ let read_function cu_end abbrs str ~pos_ref = let open Sequence.Step in if pos_ref.contents < cu_end then Input.code str ~pos_ref >>= function - | 0 -> return @@ Skip () + | 0 -> return @@ Skip {state=()} | code -> lookup abbrs code >>= fun scheme -> run_scheme scheme str ~pos_ref >>| fun vs -> match fn_of_values vs with - | Ok fn -> Yield (fn, ()) - | Error _ -> Skip () + | Ok fn -> Yield {value=fn;state=()} + | Error _ -> Skip {state=()} else return Done let create data : t Or_error.t = @@ -213,14 +213,14 @@ let create data : t Or_error.t = abbr_pos := Buffer.pos abbr_sec; if info_pos.contents < String.length info then match read_header () with - | Ok abbrs -> Skip abbrs + | Ok abbrs -> Skip {state=abbrs} | Error err -> eprintf "Failed to move to a next CU: %s" @@ (Error.to_string_hum err); Done else Done - | Ok (Yield (fn,())) -> Yield (fn,(abbrs,cu_end)) - | Ok (Skip ()) -> Skip (abbrs,cu_end) + | Ok (Yield {value=fn;state=()}) -> Yield {value=fn;state=(abbrs,cu_end)} + | Ok (Skip {state=()}) -> Skip {state=(abbrs,cu_end)} | Error err -> eprintf "Warning: Dwarf parser stopped prematurely: %s\n\ diff --git a/lib/bap_elf/elf_parse.ml b/lib/bap_elf/elf_parse.ml index 9d4ec35c6..b1dd761ae 100644 --- a/lib/bap_elf/elf_parse.ml +++ b/lib/bap_elf/elf_parse.ml @@ -34,7 +34,7 @@ open Bitstring open Elf_types open Elf_internal_utils -module Char = Caml.Char +module Char = Stdlib.Char let elf_max_header_size = 64 (* no magick! *) diff --git a/lib/bap_image/bap_image.ml b/lib/bap_image/bap_image.ml index 6598dfd53..9a8faf7b0 100644 --- a/lib/bap_image/bap_image.ml +++ b/lib/bap_image/bap_image.ml @@ -6,7 +6,7 @@ open Bap_types.Std open Monads.Std open Format open Image_internal_std -module Sys = Caml.Sys +module Sys = Stdlib.Sys module Fact = Ogre.Make(Monad.Ident) module Result = Monad.Result.Error @@ -380,8 +380,8 @@ let create_segment_of_symbol_table syms secs = match Table.find_addr secs (Memory.min_addr mem) with | None -> () | Some (_,sec) -> - Symbol.Table.add_exn tab ~key:sym ~data:sec); - Symbol.Table.find_exn tab + Hashtbl.add_exn tab ~key:sym ~data:sec); + Hashtbl.find_exn tab let from_spec query base doc = Fact.eval query doc >>= function diff --git a/lib/bap_image/bap_memory.ml b/lib/bap_image/bap_memory.ml index 4e3c705c2..91bcbf584 100644 --- a/lib/bap_image/bap_memory.ml +++ b/lib/bap_image/bap_memory.ml @@ -32,7 +32,7 @@ module Repr = struct } [@@deriving bin_io] end -include Binable.Of_binable(Repr)(struct +include Binable.Of_binable_without_uuid(Repr)(struct type nonrec t = t let to_binable {endian; addr; data; off; size} : Repr.t = { endian; diff --git a/lib/bap_image/bap_table.ml b/lib/bap_image/bap_table.ml index bcdd768d9..083715cd4 100644 --- a/lib/bap_image/bap_table.ml +++ b/lib/bap_image/bap_table.ml @@ -50,11 +50,9 @@ module Bound = struct | Bounded (x,y) -> Format.fprintf fmt "[%a,%a]" Addr.pp x Addr.pp y end -module Map = Mem.Map - type mem = Mem.t [@@deriving sexp_of] -type 'a map = 'a Map.t [@@deriving sexp_of] +type 'a map = 'a Mem.Map.t [@@deriving sexp_of] type 'a hashable = 'a Hashtbl.Hashable.t type 'a t = { @@ -68,12 +66,12 @@ type 'a ranged -> 'a let empty = { - map = Map.empty; + map = Mem.Map.empty; bound = Bound.empty; } let singleton k v = { - map = Map.singleton k v; + map = Mem.Map.singleton k v; bound = Bound.(update empty k); } @@ -163,7 +161,7 @@ let add tab mem x = if has_intersections tab mem then error "memory has intersections" mem sexp_of_mem else Ok { - map = Mem.Map.set tab.map ~key:mem ~data:x; + map = Map.set tab.map ~key:mem ~data:x; bound = Bound.update tab.bound mem; } @@ -283,7 +281,7 @@ let make_map map add ?start ?until tab ~f = map = map tab.map ~f:(fun ~key ~data -> f key data); } else let map,bound = - foldi ?start ?until tab ~init:(Map.empty,Bound.empty) + foldi ?start ?until tab ~init:(Mem.Map.empty,Bound.empty) ~f:(fun addr x (map,bound) -> add map ~key:addr ~data:(f addr x), Bound.update bound addr) in diff --git a/lib/bap_llvm/bap_llvm_loader.ml b/lib/bap_llvm/bap_llvm_loader.ml index b3db45b4b..9fc583f30 100644 --- a/lib/bap_llvm/bap_llvm_loader.ml +++ b/lib/bap_llvm/bap_llvm_loader.ml @@ -7,7 +7,7 @@ open Or_error include Self() -module Sys = Caml.Sys +module Sys = Stdlib.Sys module Unix = Caml_unix module Ogre = struct @@ -122,7 +122,7 @@ module LLVM = struct (scheme name $ addr $ size) Tuple.T3.create end -module Filename = Caml.Filename +module Filename = Stdlib.Filename open Image.Scheme open Ogre.Syntax diff --git a/lib/bap_llvm/config/llvm_configurator.ml b/lib/bap_llvm/config/llvm_configurator.ml index 961feabd3..56ee5e65f 100644 --- a/lib/bap_llvm/config/llvm_configurator.ml +++ b/lib/bap_llvm/config/llvm_configurator.ml @@ -2,9 +2,9 @@ open Base open Stdio module C = Configurator.V1 -module Buf = Caml.Buffer -module Arg = Caml.Arg -module Filename = Caml.Filename +module Buf = Stdlib.Buffer +module Arg = Stdlib.Arg +module Filename = Stdlib.Filename open Llvm_config let llvm_components = [ @@ -47,7 +47,7 @@ let () = C.main ~args ~name:"bap-llvm" @@ fun self -> String.strip @@ C.Process.run_capture_exn self llvm_config ["--version"] in let src = !filename in - let dst = Caml.Filename.chop_extension src in + let dst = Stdlib.Filename.chop_extension src in In_channel.with_file src ~f:(fun input -> Out_channel.with_file dst ~f:(fun output -> In_channel.iter_lines input ~f:(fun line -> diff --git a/lib/bap_main/bap_main.ml b/lib/bap_main/bap_main.ml index 726d4c802..643344f12 100644 --- a/lib/bap_main/bap_main.ml +++ b/lib/bap_main/bap_main.ml @@ -258,9 +258,9 @@ module Error = struct type t += Exit_requested of int type t += Bad_recipe of Bap_recipe.error - let register_printer = Caml.Printexc.register_printer + let register_printer = Stdlib.Printexc.register_printer let pp ppf e = - Format.pp_print_string ppf (Caml.Printexc.to_string e) + Format.pp_print_string ppf (Stdlib.Printexc.to_string e) let str fmt = Format.kasprintf Option.some fmt @@ -531,7 +531,7 @@ module Context = struct Map.iteri ctxt.env ~f:(fun ~key ~data:{digest} -> Format.fprintf ppf "%s = %s@\n" key digest); Format.pp_print_flush ppf (); - Caml.Digest.string @@ + Stdlib.Digest.string @@ Buffer.contents buffer (* the info interface *) @@ -923,8 +923,8 @@ end = struct let get_from_env name = let name = env_var_for_option name in - try Some (Caml.Sys.getenv name) - with Caml.Not_found -> None + try Some (Stdlib.Sys.getenv name) + with Stdlib.Not_found -> None let get_from_config ctxt name = List.Assoc.find ~equal:String.equal ctxt.config name @@ -1002,7 +1002,7 @@ end = struct t1 >>> t2) let progname = - Caml.Filename.basename (Caml.Sys.executable_name) + Stdlib.Filename.basename (Stdlib.Sys.executable_name) let with_context name ~f = @@ -1011,7 +1011,7 @@ end = struct let try_eval f x = try f x with | Invalid_argument s -> Error (Error.Invalid s) | exn -> - let backtrace = Caml.Printexc.get_backtrace () in + let backtrace = Stdlib.Printexc.get_backtrace () in Error (Error.Bug (exn,backtrace)) @@ -1178,7 +1178,7 @@ module Extension = struct try Ok (f ctxt) with | Invalid_argument s -> Error (Error.Invalid s) | exn -> - let backtrace = Caml.Printexc.get_backtrace () in + let backtrace = Stdlib.Printexc.get_backtrace () in Error (Error.Bug (exn,backtrace)) let doc_enum = Arg.doc_alts_enum diff --git a/lib/bap_main/bap_main_event.ml b/lib/bap_main/bap_main_event.ml index cb65bf743..3be986aa5 100644 --- a/lib/bap_main/bap_main_event.ml +++ b/lib/bap_main/bap_main_event.ml @@ -4,8 +4,8 @@ open Bap_plugins.Std open Bap_bundle.Std open Format -module Buffer = Caml.Buffer -module Sys = Caml.Sys +module Buffer = Stdlib.Buffer +module Sys = Stdlib.Sys (* we're reusing [exn] type only because we want to use Printexc magic printer. It is not visible from outside, @@ -16,10 +16,10 @@ module Sys = Caml.Sys type t = exn = .. type event = t = .. -let register_printer = Caml.Printexc.register_printer +let register_printer = Stdlib.Printexc.register_printer let stream,new_event = Stream.create () let send (ev : t) = Signal.send new_event ev -let string_of_event = Caml.Printexc.to_string +let string_of_event = Stdlib.Printexc.to_string let pp ppf e = pp_print_string ppf (string_of_event e) @@ -98,7 +98,7 @@ module Log = struct progress ?note ?stage ?total task let has_var v = match Sys.getenv ("BAP_" ^ String.uppercase v) with - | exception Caml.Not_found -> false + | exception Stdlib.Not_found -> false | "false" | "0" -> false | _ -> true diff --git a/lib/bap_main/bap_main_log.ml b/lib/bap_main/bap_main_log.ml index ca4256b27..f9e2c9090 100644 --- a/lib/bap_main/bap_main_log.ml +++ b/lib/bap_main/bap_main_log.ml @@ -4,12 +4,12 @@ open Bap_plugins.Std open Format module Event = Bap_main_event -module Filename = Caml.Filename -module Sys = Caml.Sys +module Filename = Stdlib.Filename +module Sys = Stdlib.Sys module Unix = Caml_unix let perm = 0o770 -let getenv opt = try Some (Sys.getenv opt) with Caml.Not_found -> None +let getenv opt = try Some (Sys.getenv opt) with Stdlib.Not_found -> None let rec mkdir path = let par = Filename.dirname path in diff --git a/lib/bap_piqi/bil_piqi.ml b/lib/bap_piqi/bil_piqi.ml deleted file mode 100644 index c54ecd0d5..000000000 --- a/lib/bap_piqi/bil_piqi.ml +++ /dev/null @@ -1,261 +0,0 @@ -open Core_kernel[@@warning "-D"] -open Bap.Std -open Bil.Types - -module P = Stmt_piqi -open Type - -let casttype_to_piqi = function - | UNSIGNED -> `cast_unsigned - | SIGNED -> `cast_signed - | HIGH -> `cast_high - | LOW -> `cast_low - -let casttype_of_piqi = function - | `cast_unsigned -> UNSIGNED - | `cast_signed -> SIGNED - | `cast_high -> HIGH - | `cast_low -> LOW - -let unop_to_piqi : 'a -> Stmt_piqi.unop_type = function - | NEG -> `uneg - | NOT -> `unot - -let unop_of_piqi = function - | `uneg -> NEG - | `unot -> NOT - -let binop_to_piqi : 'a -> Stmt_piqi.binop_type = function - | PLUS -> `plus - | MINUS -> `minus - | TIMES -> `times - | DIVIDE -> `divide - | SDIVIDE -> `sdivide - | MOD -> `modbop - | SMOD -> `smod - | LSHIFT -> `lshift - | RSHIFT -> `rshift - | ARSHIFT -> `arshift - | AND -> `andbop - | OR -> `orbop - | XOR -> `x_or - | EQ -> `eq - | NEQ -> `neq - | LT -> `lt - | LE -> `le - | SLT -> `slt - | SLE -> `sle - -let binop_of_piqi = function - | `plus -> PLUS - | `minus -> MINUS - | `times -> TIMES - | `divide -> DIVIDE - | `sdivide -> SDIVIDE - | `modbop -> MOD - | `smod -> SMOD - | `lshift -> LSHIFT - | `rshift -> RSHIFT - | `arshift -> ARSHIFT - | `andbop -> AND - | `orbop -> OR - | `x_or -> XOR - | `eq -> EQ - | `neq -> NEQ - | `lt -> LT - | `le -> LE - | `slt -> SLT - | `sle -> SLE - -let type_to_piqi : typ -> Stmt_piqi.typ = function - | Imm s -> `imm s - | Mem (t, t') -> `mem {Stmt_piqi.Mem.index_type = t; element_type = t';} - | Unk -> `unk - -let type_of_piqi = function - | `imm n -> Imm n - | `mem {P.Mem.index_type; element_type} -> Mem (index_type, element_type) - | `unk -> Type.Unk - -let var_to_piqi v = - let module P = Stmt_piqi in { - P.Var.name = Var.name v; - P.Var.id = Var.index v; - P.Var.typ = type_to_piqi (Var.typ v); - P.Var.tmp = Var.is_virtual v; - } - -let var_of_piqi { P.Var.name; id; typ; tmp} = - let module P = Stmt_piqi in - let v = Var.create ~is_virtual:tmp name (type_of_piqi typ) in - Var.with_index v id - -let endianness_to_piqi : endian -> Stmt_piqi.endian = function - | LittleEndian -> `little_endian - | BigEndian -> `big_endian - -let endianness_of_piqi = function - | `little_endian -> LittleEndian - | `big_endian -> BigEndian - -let rec exp_to_piqi : exp -> Stmt_piqi.expr = - function - | Load (m, i, e, s) -> - let m = exp_to_piqi m in - let i = exp_to_piqi i in - let e = endianness_to_piqi e in - `load {P.Load.memory=m; address=i; endian=e; size=s;} - | Store (m, i, v, e, size) -> - let m = exp_to_piqi m in - let i = exp_to_piqi i in - let v = exp_to_piqi v in - let e = endianness_to_piqi e in - `store {P.Store.memory=m; address=i; value=v; endian=e; size;} - | BinOp (bop, e1, e2) -> - let bop = binop_to_piqi bop in - let e1 = exp_to_piqi e1 in - let e2 = exp_to_piqi e2 in - `binop {P.Binop.op=bop; lexp=e1; rexp=e2;} - | UnOp (uop, e) -> - let uop = unop_to_piqi uop in - let e = exp_to_piqi e in - `unop {P.Unop.op=uop; exp=e} - | Var v -> - `var (var_to_piqi v) - | Int v -> - `inte {P.Inte.int = Bitvector.to_string v;} - | Cast (ct, size, e) -> - let ct = casttype_to_piqi ct in - let e = exp_to_piqi e in - `cast {P.Cast.cast_type=ct; size; exp=e} - | Let (v, e, e') -> - let v = var_to_piqi v in - let e = exp_to_piqi e in - let e' = exp_to_piqi e' in - `let_exp {P.Let_exp.bound_var=v; definition=e; open_exp=e'} - | Unknown (s, t) -> - let t = type_to_piqi t in - `unknown {P.Unknown.descr=s; typ=t} - | Ite (e, te, fe) -> - let e = exp_to_piqi e in - let te = exp_to_piqi te in - let fe = exp_to_piqi fe in - `ite {P.Ite.condition=e; iftrue=te; iffalse=fe} - | Extract (h, l, e) -> - let e = exp_to_piqi e in - `extract {P.Extract.hbit=h; lbit=l; exp=e} - | Concat (e1, e2) -> - let e1 = exp_to_piqi e1 in - let e2 = exp_to_piqi e2 in - `concat {P.Concat.lexp=e1; rexp=e2} - -let rec exp_of_piqi = function - | `load {P.Load.memory; address; endian; size} -> - let m = exp_of_piqi memory in - let i = exp_of_piqi address in - let e = endianness_of_piqi endian in - Load (m, i, e, size) - | `store {P.Store.memory; address; value; endian; size} -> - let m = exp_of_piqi memory in - let i = exp_of_piqi address in - let v = exp_of_piqi value in - let e = endianness_of_piqi endian in - Store (m, i, v, e, size) - | `binop {P.Binop.op; lexp; rexp} -> - let bop = binop_of_piqi op in - let e1 = exp_of_piqi lexp in - let e2 = exp_of_piqi rexp in - BinOp (bop, e1, e2) - | `unop {P.Unop.op; exp} -> - let uop = unop_of_piqi op in - let e = exp_of_piqi exp in - UnOp (uop, e) - | `var v -> - Var (var_of_piqi v) - | `inte {P.Inte.int=s} -> - Int (Bitvector.of_string s) - | `cast {P.Cast.cast_type; size; exp} -> - let ct = casttype_of_piqi cast_type in - let e = exp_of_piqi exp in - Cast (ct, size, e) - | `let_exp {P.Let_exp.bound_var; definition; open_exp} -> - let v = var_of_piqi bound_var in - let d = exp_of_piqi definition in - let e = exp_of_piqi open_exp in - Let (v, d, e) - | `unknown {P.Unknown.descr; typ} -> - let t = type_of_piqi typ in - Unknown (descr, t) - | `ite {P.Ite.condition; iftrue; iffalse} -> - let cond = exp_of_piqi condition in - let te = exp_of_piqi iftrue in - let fe = exp_of_piqi iffalse in - Ite (cond, te, fe) - | `extract {P.Extract.hbit; lbit; exp} -> - let e = exp_of_piqi exp in - Extract (hbit, lbit, e) - | `concat {P.Concat.lexp; rexp} -> - let e1 = exp_of_piqi lexp in - let e2 = exp_of_piqi rexp in - Concat (e1, e2) - -let rec stmt_to_piqi : stmt -> Stmt_piqi.stmt = function - | Move (v, e) -> - let v = var_to_piqi v in - let e = exp_to_piqi e in - `move {P.Move.lvar=v; rexp=e} - | Jmp targ -> - let targ = exp_to_piqi targ in - `jmp {P.Jmp.target=targ} - | Special s -> `special s - | While (e, stmts) -> - let e = exp_to_piqi e in - let stmts = stmts_to_piqi stmts in - `while_stmt {P.While_stmt.cond=e; loop_body=stmts} - | If (e, then_branch, else_branch) -> - let e = exp_to_piqi e in - let then_branch = stmts_to_piqi then_branch in - let else_branch = stmts_to_piqi else_branch in - `if_stmt {P.If_stmt.cond=e; true_branch=then_branch; false_branch=else_branch} - | CpuExn n -> `cpuexn {P.Cpuexn.errnum=n} - -and stmts_to_piqi l = List.map ~f:stmt_to_piqi l - -let rec stmt_of_piqi = function - | `move {P.Move.lvar; rexp} -> - let v = var_of_piqi lvar in - let e = exp_of_piqi rexp in - Move (v, e) - | `jmp {P.Jmp.target} -> - let t = exp_of_piqi target in - Jmp t - | `special s -> Special s - | `while_stmt {P.While_stmt.cond; loop_body} -> - let e = exp_of_piqi cond in - let b = stmts_of_piqi loop_body in - While (e, b) - | `if_stmt {P.If_stmt.cond; true_branch; false_branch} -> - let e = exp_of_piqi cond in - let then_branch = stmts_of_piqi true_branch in - let else_branch = stmts_of_piqi false_branch in - If (e, then_branch, else_branch) - | `cpuexn {P.Cpuexn.errnum} -> CpuExn errnum - -and stmts_of_piqi l = List.map ~f:stmt_of_piqi l - -open Stmt_piqi_ext - -type fmt = [ `json | `pb | `piq | `pib | `xml ] [@@deriving sexp, enumerate] -type out_fmt = [fmt | `json_pretty | `xml_pretty] - -let loads f g fmt s = f (g s fmt) -let dumps g f fmt x = f (g x) (fmt : fmt :> out_fmt) - -let bil_of_string = loads stmts_of_piqi parse_stmt_list -let stmt_of_string = loads stmt_of_piqi parse_stmt -let exp_of_string = loads exp_of_piqi parse_expr -let string_of_bil = dumps stmts_to_piqi gen_stmt_list -let string_of_stmt = dumps stmt_to_piqi gen_stmt -let string_of_exp = dumps exp_to_piqi gen_expr -let piqi_of_exp = exp_to_piqi -let piqi_of_var = var_to_piqi diff --git a/lib/bap_piqi/bil_piqi.mli b/lib/bap_piqi/bil_piqi.mli deleted file mode 100644 index 05e52f2b6..000000000 --- a/lib/bap_piqi/bil_piqi.mli +++ /dev/null @@ -1,18 +0,0 @@ -open Bap.Std - -type fmt = [ `json | `pb | `piq | `pib | `xml ] -[@@deriving sexp, enumerate] - -val bil_of_string : fmt -> string -> bil -val string_of_bil : fmt -> bil -> string - -val stmt_of_string : fmt -> string -> stmt -val string_of_stmt : fmt -> stmt -> string - -val exp_of_string : fmt -> string -> exp -val string_of_exp : fmt -> exp -> string - -val exp_of_piqi : Stmt_piqi.expr -> exp -val var_of_piqi : Stmt_piqi.var -> var -val piqi_of_exp : exp -> Stmt_piqi.expr -val piqi_of_var : var -> Stmt_piqi.var diff --git a/lib/bap_piqi/bir_piqi.ml b/lib/bap_piqi/bir_piqi.ml deleted file mode 100644 index 65743811c..000000000 --- a/lib/bap_piqi/bir_piqi.ml +++ /dev/null @@ -1,160 +0,0 @@ -open Core_kernel[@@warning "-D"] -open Bap.Std - -open Option.Monad_infix - -module R = Ir_piqi - - -module Get = struct - let tid = Tid.from_string_exn - let exp = Bil_piqi.exp_of_piqi - let var = Bil_piqi.var_of_piqi - - let label = function - | `direct t -> Direct (tid t) - | `indirect e -> Indirect (exp e) - - let intent = function - | `in_ -> In - | `out -> Out - | `both -> Both - - let jump = function - | `goto dst -> Goto (label dst) - | `ret dst -> Ret (label dst) - | `exn {R.Exn.number; return=r} -> Int (number, tid r) - | `call {R.Call.target=t; return=r} -> - Call - (Call.create ?return:(r >>| label) ~target:(label t) ()) - - let arg {R.Arg.tid=t; lhs=v; rhs=e; intent=i} = - Arg.create ~tid:(tid t) ?intent:(i >>| intent) (var v) (exp e) - - let def {R.Def.tid=t; lhs; rhs} = - Def.create ~tid:(tid t) (var lhs) (exp rhs) - - let phi {R.Phi.tid=t; lhs; values} = - values |> - List.map ~f:(fun {R.Tid_exp_pair.tid=t;exp=e} -> tid t, exp e) |> - Phi.of_list ~tid:(tid t) (var lhs) - - let jmp {R.Jmp.tid=t; cond=c; jump=j} = - Jmp.create ~tid:(tid t) ~cond:(exp c) (jump j) - - let blk {R.Blk.tid=t; phis; defs; jmps} = - let b = Blk.Builder.create ~tid:(tid t) () in - List.iter phis ~f:(fun p -> Blk.Builder.add_phi b (phi p)); - List.iter defs ~f:(fun p -> Blk.Builder.add_def b (def p)); - List.iter jmps ~f:(fun p -> Blk.Builder.add_jmp b (jmp p)); - Blk.Builder.result b - - let sub {R.Sub.tid=t; args; blks; name} = - let b = Sub.Builder.create ~tid:(tid t) ~name () in - List.iter args ~f:(fun x -> Sub.Builder.add_arg b (arg x)); - List.iter blks ~f:(fun x -> Sub.Builder.add_blk b (blk x)); - Sub.Builder.result b - - let program {R.Program.tid=t; subs} = - let b = Program.Builder.create ~tid:(tid t) () in - List.iter subs ~f:(fun x -> Program.Builder.add_sub b (sub x)); - Program.Builder.result b -end - -module Put = struct - let tid = Tid.to_string - let exp = Bil_piqi.piqi_of_exp - let var = Bil_piqi.piqi_of_var - - let label = function - | Direct t -> `direct (tid t) - | Indirect e -> `indirect (exp e) - - let intent = function - | In -> `in_ - | Out -> `out - | Both -> `both - - let jump = function - | Goto d -> `goto (label d) - | Ret d -> `ret (label d) - | Int (n,r) -> `exn R.Exn.{number=n; return=(tid r)} - | Call c -> `call R.Call.{ - target = label (Call.target c); - return = Call.return c >>| label; - } - - let arg a = R.Arg.{ - tid = tid (Term.tid a); - lhs = var (Arg.lhs a); - rhs = exp (Arg.rhs a); - intent = Arg.intent a >>| intent; - } - - let def d = R.Def.{ - tid = tid (Term.tid d); - lhs = var (Def.lhs d); - rhs = exp (Def.rhs d); - } - - let pair (t,e) = R.Tid_exp_pair.{tid = tid t; exp = exp e} - - let phi t = R.Phi.{ - tid = tid (Term.tid t); - lhs = var (Phi.lhs t); - values = Phi.values t |> Seq.map ~f:pair |> Seq.to_list - } - - let jmp t = R.Jmp.{ - tid = tid (Term.tid t); - cond = exp (Jmp.cond t); - jump = jump (Jmp.kind t); - } - - let list t f term = - Term.enum t term |> Seq.map ~f |> Seq.to_list - - let blk t = R.Blk.{ - tid = tid (Term.tid t); - phis = list phi_t phi t; - defs = list def_t def t; - jmps = list jmp_t jmp t; - } - - let sub t = R.Sub.{ - tid = tid (Term.tid t); - name = Sub.name t; - args = list arg_t arg t; - blks = list blk_t blk t; - } - - let program t = R.Program.{ - tid = tid (Term.tid t); - subs = list sub_t sub t; - } -end - - -type fmt = [ `json | `pb | `piq | `pib | `xml ] -type out_fmt = [fmt | `json_pretty | `xml_pretty] - -let loads f g fmt s = f (g s fmt) -let dumps g f fmt x = f (g x) (fmt : fmt :> out_fmt) - -open Ir_piqi_ext - -let program_of_string = loads Get.program parse_program -let sub_of_string = loads Get.sub parse_sub -let blk_of_string = loads Get.blk parse_blk -let arg_of_string = loads Get.arg parse_arg -let phi_of_string = loads Get.phi parse_phi -let def_of_string = loads Get.def parse_def -let tid_of_string = loads Get.tid parse_tid - -let string_of_program = dumps Put.program gen_program -let string_of_sub = dumps Put.sub gen_sub -let string_of_blk = dumps Put.blk gen_blk -let string_of_arg = dumps Put.arg gen_arg -let string_of_phi = dumps Put.phi gen_phi -let string_of_def = dumps Put.def gen_def -let string_of_tid = dumps Put.tid gen_tid diff --git a/lib/bap_piqi/bir_piqi.mli b/lib/bap_piqi/bir_piqi.mli deleted file mode 100644 index d16b41106..000000000 --- a/lib/bap_piqi/bir_piqi.mli +++ /dev/null @@ -1,18 +0,0 @@ -open Bap.Std - -type fmt = [ `json | `pb | `piq | `pib | `xml ] - - -val program_of_string : fmt -> string -> program term -val sub_of_string : fmt -> string -> sub term -val blk_of_string : fmt -> string -> blk term -val arg_of_string : fmt -> string -> arg term -val phi_of_string : fmt -> string -> phi term -val def_of_string : fmt -> string -> def term - -val string_of_program : fmt -> program term -> string -val string_of_sub : fmt -> sub term -> string -val string_of_blk : fmt -> blk term -> string -val string_of_arg : fmt -> arg term -> string -val string_of_phi : fmt -> phi term -> string -val string_of_def : fmt -> def term -> string diff --git a/lib/bap_piqi/dune b/lib/bap_piqi/dune deleted file mode 100644 index a2d231e8b..000000000 --- a/lib/bap_piqi/dune +++ /dev/null @@ -1,27 +0,0 @@ -(library - (name bap_piqi) - (public_name bap-piqi) - (wrapped false) - (preprocess (pps ppx_bap)) - (libraries bap piqirun.pb piqirun.ext) - (private_modules stmt_piqi stmt_piqi_ext ir_piqi ir_piqi_ext)) - -(rule - (targets type__piqi.ml type__piqi_ext.ml) - (deps type.piqi) - (action (run piqic-ocaml --multi-format %{deps}))) - -(rule - (targets stmt_piqi.ml stmt_piqi_ext.ml) - (deps stmt.piqi) - (action (run piqic-ocaml --multi-format %{deps}))) - -(rule - (targets exp_piqi.ml exp_piqi_ext.ml) - (deps exp.piqi) - (action (run piqic-ocaml --multi-format %{deps}))) - -(rule - (targets ir_piqi.ml ir_piqi_ext.ml) - (deps ir.piqi) - (action (run piqic-ocaml --multi-format %{deps}))) diff --git a/lib/bap_piqi/exp.piqi b/lib/bap_piqi/exp.piqi deleted file mode 100644 index eda947fab..000000000 --- a/lib/bap_piqi/exp.piqi +++ /dev/null @@ -1,193 +0,0 @@ -.include [ - .module type -] - -.enum [ - .name endian - .option [.name little-endian] - .option [.name big-endian] -] - -.variant [ - .name expr - .option [.type var ] - .option [.type inte ] - .option [.type load ] - .option [.type store ] - .option [.type binop ] - .option [.type unop ] - .option [.type cast ] - .option [.type let-exp] - .option [.type unknown] - .option [.type ite ] - .option [.type extract] - .option [.type concat ] -] - -.record [ - .name load - .field [ - .name memory - .type expr - ] - .field [ - .name address - .type expr - ] - .field [ - .name endian - .type endian - ] - .field [ - .name size - .type size - ] -] - -.record [ - .name store - .field [ - .name memory - .type expr - ] - .field [ - .name address - .type expr - ] - .field [ - .name value - .type expr - ] - .field [ - .name endian - .type endian - ] - .field [ - .name size - .type size - ] -] - -.record [ - .name binop - .field [ - .name op - .type binop-type - ] - .field [ - .name lexp - .type expr - ] - .field [ - .name rexp - .type expr - ] -] - -.record [ - .name unop - .field [ - .name op - .type unop-type - ] - .field [ - .name exp - .type expr - ] -] - -.record [ - .name inte - .field [ - .name int - .type bitvector - ] -] - -.record [ - .name cast - .field [ - .name cast-type - .type cast-type - ] - .field [ - .name size - .type int - ] - .field [ - .name exp - .type expr - ] -] - -.record [ - .name let-exp - .field [ - .name bound-var - .type var - ] - .field [ - .name definition - .type expr - ] - .field [ - .name open-exp - .type expr - ] -] - -.record [ - .name unknown - .field [ - .name descr - .type string - ] - .field [ - .name typ - .type typ - ] -] - -.record [ - .name ite - .field [ - .name condition - .type expr - ] - .field [ - .name iftrue - .type expr - ] - .field [ - .name iffalse - .type expr - ] -] - -.record [ - .name extract - .field [ - .name hbit - .type int - ] - .field [ - .name lbit - .type int - ] - .field [ - .name exp - .type expr - ] -] - -.record [ - .name concat - .field [ - .name lexp - .type expr - ] - .field [ - .name rexp - .type expr - ] -] diff --git a/lib/bap_piqi/ir.piqi b/lib/bap_piqi/ir.piqi deleted file mode 100644 index 9da78bac9..000000000 --- a/lib/bap_piqi/ir.piqi +++ /dev/null @@ -1,97 +0,0 @@ -.import [ - .module stmt -] - -.record [ - .name program - .field [.name tid .type tid] - .field [.name subs .type sub .repeated] -] - -.record [ - .name sub - .field [ .name tid .type tid] - .field [ .name name .type string ] - .field [ .name args .type arg .repeated ] - .field [ .name blks .type blk .repeated ] -] - -.record [ - .name arg - .field [.name tid .type tid] - .field [ .name lhs .type stmt/var ] - .field [ .name rhs .type stmt/expr ] - .field [ .name intent .type intent .optional] -] - -.record [ - .name blk - .field [.name tid .type tid] - .field [ .name phis .type phi .repeated] - .field [ .name defs .type def .repeated] - .field [ .name jmps .type jmp .repeated] -] - -.record [ - .name phi - .field [.name tid .type tid] - .field [.name lhs .type stmt/var] - .field [.name values .type tid-exp-pair .repeated] -] - -.record [ - .name def - .field [.name tid .type tid] - .field [.name lhs .type stmt/var] - .field [.name rhs .type stmt/expr] -] - - -.record [ - .name jmp - .field [.name tid .type tid] - .field [.name cond .type stmt/expr] - .field [.name jump .type jump] -] - -.alias [.name tid .type string] - -.record [ - .name tid-exp-pair - .field [.name tid .type tid] - .field [.name exp .type stmt/expr] -] - -.variant [ - .name jump - .option [.type call] - .option [.name goto .type label] - .option [.name ret .type label] - .option [.type exn] -] - -.variant [ - .name label - .option [.name direct .type tid] - .option [.name indirect .type stmt/expr] -] - -.enum [ - .name intent - .option [.name in] - .option [.name out] - .option [.name both] -] - - -.record [ - .name call - .field [.name target .type label] - .field [.name return .type label .optional] -] - -.record [ - .name exn - .field [.name number .type int] - .field [.name return .type tid] -] \ No newline at end of file diff --git a/lib/bap_piqi/stmt.piqi b/lib/bap_piqi/stmt.piqi deleted file mode 100644 index 7277085a7..000000000 --- a/lib/bap_piqi/stmt.piqi +++ /dev/null @@ -1,79 +0,0 @@ -.include [ - .module exp -] - -.variant [ - .name stmt - .option [.type move ] - .option [.type jmp ] - .option [.type special] - .option [.type while-stmt] - .option [.type if-stmt] - .option [.type cpuexn] -] - -.list [ - .name stmt-list - .type stmt -] - -.record [ - .name move - .field [ - .name lvar - .type var - ] - .field [ - .name rexp - .type expr - ] -] - -.record [ - .name jmp - .field [ - .name target - .type expr - ] -] - -.alias [ - .name special - .type string -] - -.record [ - .name while-stmt - .field [ - .name cond - .type expr - ] - .field [ - .name loop-body - .type stmt-list - ] -] - -.record [ - .name if-stmt - .field [ - .name cond - .type expr - ] - .field [ - .name true-branch - .type stmt-list - ] - .field [ - .name false-branch - .type stmt-list - ] -] - -.record [ - .name cpuexn - .field [ - .name errnum - .type int - ] -] diff --git a/lib/bap_piqi/test/run_piqi_tests.ml b/lib/bap_piqi/test/run_piqi_tests.ml deleted file mode 100644 index 696fe9a7e..000000000 --- a/lib/bap_piqi/test/run_piqi_tests.ml +++ /dev/null @@ -1,100 +0,0 @@ -open OUnit2 -open Core_kernel[@@warning "-D"] -open Bap.Std - -module Example = struct - let entry = Blk.create () - let b1 = Blk.create () - let b2 = Blk.create () - let b3 = Blk.create () - let b4 = Blk.create () - let b5 = Blk.create () - let b6 = Blk.create () - let exit = Blk.create () - - let i = Var.create "i" reg32_t - let j = Var.create "j" reg32_t - let k = Var.create "k" bool_t - - let _1 = Bil.int (Word.one 32) - let _2 = Bil.int (Word.of_int32 2l) - let _F = Bil.int Word.b0 - let _T = Bil.int Word.b1 - - let def var exp b = Term.append def_t b @@ Def.create var exp - let cond blk cond t f = - let jt = Jmp.create_goto ~cond (Label.direct (Term.tid t)) in - let jf = Jmp.create_goto (Label.direct (Term.tid f)) in - let blk = Term.append jmp_t blk jt in - Term.append jmp_t blk jf - let goto dst src = Term.append jmp_t src @@ - Jmp.create_goto (Label.direct (Term.tid dst)) - - let entry = entry |> - goto b1 - - let b1 = b1 |> - def k _F |> - def i _1 |> - def j _2 |> - goto b2 - - let b2 = cond b2 Bil.(var i <= var j) b3 b4 - - let b3 = b3 |> - def j Bil.(var j * _2) |> - def k _T |> - def i Bil.(var i + _1) |> - goto b2 - - let b3_without_jumps = Term.filter jmp_t ~f:(fun _ -> false) b3 - - let b4 = cond b4 Bil.(var k) b5 b6 - - let b5 = - let call = Call.create () - ~return:(Label.direct (Term.tid exit)) - ~target:(Label.indirect (Bil.var j)) in - let use = Jmp.create_call call in - Term.append jmp_t b5 use - - let b3_with_jump_to_b5 = Term.map jmp_t ~f:(fun _ -> - Jmp.create_goto (Label.direct (Term.tid b5))) b3 - - - - let b6 = def i Bil.(var i + _1) b6 |> goto exit - - let sub_of_blk blks = - let sub = Sub.create ~name:"example" () in - List.fold blks ~init:sub ~f:(Term.append blk_t) - - let blks = [entry; b1; b2; b3; b4; b5; b6; exit] - let sub = sub_of_blk blks - let program = - Term.append sub_t (Program.create ()) sub -end - -let test fmt ctxt = - let prog = Example.program |> - Bir_piqi.string_of_program fmt |> - Bir_piqi.program_of_string fmt in - let cmp = Program.equal in - let printer = Program.to_string in - assert_equal ~ctxt ~cmp ~printer Example.program prog - - - -let suite = - let open Bil.Types in - "bir" >::: - [ - "json" >:: test `json; - "pb" >:: test `pb; - "piq" >:: test `piq; - "pib" >:: test `pib; - "xml" >:: test `xml; - ] - - -let () = run_test_tt_main suite diff --git a/lib/bap_piqi/type.piqi b/lib/bap_piqi/type.piqi deleted file mode 100644 index 1296e8517..000000000 --- a/lib/bap_piqi/type.piqi +++ /dev/null @@ -1,110 +0,0 @@ -.variant [ - .name typ - .option [.type imm] - .option [.type mem] - .option [.name unk] -] - -.variant [ - .name addr-size - .option [.name r32] - .option [.name r64] -] - -.variant [ - .name size - .option [.name r8] - .option [.name r16] - .option [.name r32] - .option [.name r64] - .option [.name r128] - .option [.name r256] -] - -.alias [ - .name imm - .type int -] - -.record [ - .name mem - .field [ - .name index-type - .type addr-size - ] - .field [ - .name element-type - .type size - ] -] - -.enum [ - .name cast-type - .option [.name cast-unsigned] - .option [.name cast-signed] - .option [.name cast-high] - .option [.name cast-low] -] - -.enum [ - .name binop-type - .option [.name plus ] - .option [.name minus ] - .option [.name times ] - .option [.name divide ] - .option [.name sdivide] - .option [.name modbop ] - .option [.name smod ] - .option [.name lshift ] - .option [.name rshift ] - .option [.name arshift] - .option [.name andbop ] - .option [.name orbop ] - .option [.name x-or ] - .option [.name eq ] - .option [.name neq ] - .option [.name lt ] - .option [.name le ] - .option [.name slt ] - .option [.name sle ] -] - -.enum [ - .name unop-type - .option [.name uneg] - .option [.name unot] -] - -.record [ - .name var - .field [ - .name name - .type string - ] - .field [ - .name id - .type int - ] - .field [ - .name typ - .type typ - ] - - .field [ - .name tmp - .type bool - ] - -] - -% bitvectors -.alias [ - .name bitvector - .type string -] - -% an address is now a bitvector -.alias [ - .name address - .type bitvector -] diff --git a/lib/bap_plugins/bap_common.ml b/lib/bap_plugins/bap_common.ml index 0a513eeb1..f4f390f49 100644 --- a/lib/bap_plugins/bap_common.ml +++ b/lib/bap_plugins/bap_common.ml @@ -1,8 +1,8 @@ open Base open Stdio -open Caml.Scanf -module Sys = Caml.Sys +open Stdlib.Scanf +module Sys = Stdlib.Sys module Package = Bap_plugins_package module Config = Bap_plugins_config module Units = Bap_plugins_units.Make() diff --git a/lib/bap_plugins/bap_plugins.ml b/lib/bap_plugins/bap_plugins.ml index dc20b7efa..9edce8bed 100644 --- a/lib/bap_plugins/bap_plugins.ml +++ b/lib/bap_plugins/bap_plugins.ml @@ -5,8 +5,8 @@ open Or_error.Monad_infix module Units = Bap_plugins_units.Make() module Package = Bap_plugins_package -module Filename = Caml.Filename -module Sys = Caml.Sys +module Filename = Stdlib.Filename +module Sys = Stdlib.Sys module Plugin = struct @@ -92,7 +92,7 @@ module Plugin = struct let is_debugging () = - try String.(Sys.getenv "BAP_DEBUG" <> "0") with Caml.Not_found -> false + try String.(Sys.getenv "BAP_DEBUG" <> "0") with Stdlib.Not_found -> false let bundle = function {body=Bundle {bundle}} -> bundle | _ -> assert false @@ -254,7 +254,7 @@ end module Plugins = struct let paths_of_env () = try Sys.getenv "BAP_PLUGIN_PATH" |> String.split ~on:':' - with Caml.Not_found -> [] + with Stdlib.Not_found -> [] let path = Bap_plugins_config.plugindir diff --git a/lib/bap_plugins/bap_plugins_units.ml b/lib/bap_plugins/bap_plugins_units.ml index 21aac8dd0..cfb404b3e 100644 --- a/lib/bap_plugins/bap_plugins_units.ml +++ b/lib/bap_plugins/bap_plugins_units.ml @@ -99,7 +99,7 @@ module Dynlink = struct end -let is_toplevel = Caml.Sys.interactive.contents +let is_toplevel = Stdlib.Sys.interactive.contents module Make() = (val if is_toplevel diff --git a/lib/bap_primus/bap_primus.mli b/lib/bap_primus/bap_primus.mli index 3bdab0a97..be950fefa 100644 --- a/lib/bap_primus/bap_primus.mli +++ b/lib/bap_primus/bap_primus.mli @@ -189,7 +189,7 @@ module Std : sig Machine run. That type is left abstract, and has no operations, as its purpose is to disallow running machine directly with a properly initialized system. *) - type 'a effect + type 'a effect_ (** value generator *) type generator @@ -575,7 +575,7 @@ module Std : sig ?boot:unit t -> ?init:unit t -> ?fini:unit t -> - (exit_status * project) m effect + (exit_status * project) m effect_ (** Local state of the machine. *) module Local : State with type 'a m := 'a t diff --git a/lib/bap_primus/bap_primus_exn.ml b/lib/bap_primus/bap_primus_exn.ml index e9ba04dd9..66c74fd0d 100644 --- a/lib/bap_primus/bap_primus_exn.ml +++ b/lib/bap_primus/bap_primus_exn.ml @@ -1,5 +1,5 @@ open Core_kernel[@@warning "-D"] type t = exn = .. -let to_string err = Caml.Printexc.to_string err -let add_printer pr = Caml.Printexc.register_printer pr +let to_string err = Stdlib.Printexc.to_string err +let add_printer pr = Stdlib.Printexc.register_printer pr diff --git a/lib/bap_primus/bap_primus_lisp_attribute.ml b/lib/bap_primus/bap_primus_lisp_attribute.ml index 9d744239f..4c23c8cbe 100644 --- a/lib/bap_primus/bap_primus_lisp_attribute.ml +++ b/lib/bap_primus/bap_primus_lisp_attribute.ml @@ -100,9 +100,9 @@ module Set = struct end -let () = Caml.Printexc.register_printer (function +let () = Stdlib.Printexc.register_printer (function | Failure (error,_) -> let msg = Format.asprintf "Attribute parse error: %s" - (Caml.Printexc.to_string error) in + (Stdlib.Printexc.to_string error) in Some msg | _ -> None) diff --git a/lib/bap_primus/bap_primus_lisp_context.ml b/lib/bap_primus/bap_primus_lisp_context.ml index 94cd0c5dd..1c2a34595 100644 --- a/lib/bap_primus/bap_primus_lisp_context.ml +++ b/lib/bap_primus/bap_primus_lisp_context.ml @@ -166,7 +166,7 @@ let order c1 c2 : KB.Order.partial = let merge xs ys : t = Map.merge xs ys ~f:(fun ~key:_ -> function | `Left v | `Right v -> Some v - | `Both (x,y) -> Some (Feature.Set.union x y) ) + | `Both (x,y) -> Some (Set.union x y) ) let join xs ys = Ok (merge xs ys) diff --git a/lib/bap_primus/bap_primus_lisp_parse.ml b/lib/bap_primus/bap_primus_lisp_parse.ml index b2084b50c..4d4123599 100644 --- a/lib/bap_primus/bap_primus_lisp_parse.ml +++ b/lib/bap_primus/bap_primus_lisp_parse.ml @@ -3,7 +3,7 @@ open Bap.Std open Format open Bap_core_theory -module Sys = Caml.Sys +module Sys = Stdlib.Sys open Bap_primus_lisp_types diff --git a/lib/bap_primus/bap_primus_lisp_semantics.ml b/lib/bap_primus/bap_primus_lisp_semantics.ml index cd67467e9..9f0521e38 100644 --- a/lib/bap_primus/bap_primus_lisp_semantics.ml +++ b/lib/bap_primus/bap_primus_lisp_semantics.ml @@ -42,7 +42,7 @@ end type value = unit Theory.Value.t -type effect = unit Theory.Effect.t +type effect_ = unit Theory.Effect.t type KB.Conflict.t += | Unresolved_definition of string @@ -284,7 +284,7 @@ module Value = struct end module Effect = struct - type t = effect + type t = effect_ let pure x : t = empty.$[Theory.Semantics.value] <- x let return x : t KB.t = KB.return@@pure x end diff --git a/lib/bap_primus/bap_primus_machine.ml b/lib/bap_primus/bap_primus_machine.ml index b56075581..882151a51 100644 --- a/lib/bap_primus/bap_primus_machine.ml +++ b/lib/bap_primus/bap_primus_machine.ml @@ -84,7 +84,7 @@ module Make(M : Monad.S) = struct ?boot:unit t -> ?init:unit t -> ?fini:unit t -> - (exit_status * project) m effect + (exit_status * project) m effect_ type _ error = exn diff --git a/lib/bap_primus/bap_primus_types.ml b/lib/bap_primus/bap_primus_types.ml index 0b566ce47..dcc580679 100644 --- a/lib/bap_primus/bap_primus_types.ml +++ b/lib/bap_primus/bap_primus_types.ml @@ -18,7 +18,7 @@ type exit_status = | Normal | Exn of exn -type 'a effect = +type 'a effect_ = ?envp:string array -> ?args:string array -> string -> @@ -67,7 +67,7 @@ module type Machine = sig ?boot:unit t -> ?init:unit t -> ?fini:unit t -> - (exit_status * project) m effect + (exit_status * project) m effect_ module Local : State with type 'a m := 'a t and type 'a t := 'a state diff --git a/lib/bap_primus_machine/bap_primus_machine.ml b/lib/bap_primus_machine/bap_primus_machine.ml index f4b300176..51e64d891 100644 --- a/lib/bap_primus_machine/bap_primus_machine.ml +++ b/lib/bap_primus_machine/bap_primus_machine.ml @@ -63,8 +63,8 @@ module Exception : sig end = struct type t = exn = .. - let to_string err = Caml.Printexc.to_string err - let add_printer pr = Caml.Printexc.register_printer pr + let to_string err = Stdlib.Printexc.to_string err + let add_printer pr = Stdlib.Printexc.register_printer pr end diff --git a/lib/bap_recipe/bap_recipe.ml b/lib/bap_recipe/bap_recipe.ml index f3c64cec2..e687c0570 100644 --- a/lib/bap_recipe/bap_recipe.ml +++ b/lib/bap_recipe/bap_recipe.ml @@ -1,7 +1,7 @@ open Base open Stdio open Result.Monad_infix -open Caml.Format +open Stdlib.Format module Filename = Stdlib.Filename module Buffer = Stdlib.Buffer @@ -158,7 +158,7 @@ let apply_subst root pars vars opts = try Ok (apply_subst_exn root pars vars opts) with Bad_substitution s -> Error (Bad_subst s) -let rng = Caml.Random.State.make_self_init () +let rng = Stdlib.Random.State.make_self_init () let mkdtemp ?(mode=0o0700) ?tmp_dir ?(prefix="") ?(suffix="") () = let genname () = Uuidm.v4_gen rng () |> Uuidm.to_string in diff --git a/lib/bap_sema/bap_sema_taint.ml b/lib/bap_sema/bap_sema_taint.ml index b393975e7..fab76c69f 100644 --- a/lib/bap_sema/bap_sema_taint.ml +++ b/lib/bap_sema/bap_sema_taint.ml @@ -84,8 +84,8 @@ class context = object(self) method taint_reg r ts = let key = Bil.Result.id r in if Set.is_empty ts - then {< tvs = Values.remove tvs key >} - else {< tvs = Values.set tvs ~key ~data:ts >} + then {< tvs = Map.remove tvs key >} + else {< tvs = Map.set tvs ~key ~data:ts >} method taint_ptr a (s : size) ts = if Set.is_empty ts then self diff --git a/lib/bap_strings/bap_strings_detector.ml b/lib/bap_strings/bap_strings_detector.ml index d769e99e3..a4a41b7ca 100644 --- a/lib/bap_strings/bap_strings_detector.ml +++ b/lib/bap_strings/bap_strings_detector.ml @@ -112,7 +112,7 @@ let run t = let open Sequence.Step in Sequence.unfold_with ~init:t ~f:(fun t (x,c) -> let t = step t x c in - when_decided t (Skip t) ~f:(fun d -> Yield (d,t))) + when_decided t (Skip {state=t}) ~f:(fun d -> Yield {value=d;state=t})) let rev_zip_skip skip xs ys = diff --git a/lib/bap_strings/bap_strings_scanner.ml b/lib/bap_strings/bap_strings_scanner.ml index a35450c15..8aa0c86a8 100644 --- a/lib/bap_strings/bap_strings_scanner.ml +++ b/lib/bap_strings/bap_strings_scanner.ml @@ -25,7 +25,7 @@ let run ?is_stop ~read off = let str = next ?is_stop ~read off in let len = String.length str in if len <> 0 - then Seq.Step.Yield ((off,str),(off+len)) + then Seq.Step.Yield {value=(off,str);state=(off+len)} else match read off with | None -> Seq.Step.Done - | Some _ -> Seq.Step.Skip (off+1)) + | Some _ -> Seq.Step.Skip {state=(off+1)}) diff --git a/lib/bap_traces/bap_trace.ml b/lib/bap_traces/bap_trace.ml index 4e2c76596..6c45bd88b 100644 --- a/lib/bap_traces/bap_trace.ml +++ b/lib/bap_traces/bap_trace.ml @@ -164,8 +164,8 @@ let supports t tag = supports_by_tool t tag && supports_by_proto t tag let read_events t : event seq = let map e = match t.mapper e with - | None -> Seq.Step.Skip () - | Some e -> Seq.Step.Yield (e,()) in + | None -> Seq.Step.Skip {state=()} + | Some e -> Seq.Step.Yield {value=e;state=()} in Seq.unfold_step ~init:() ~f:(fun () -> match t.reader.next () with | None -> Seq.Step.Done @@ -173,8 +173,8 @@ let read_events t : event seq = | Some Error e -> match t.monitor e with | `Stop -> Seq.Step.Done | `Fail -> Error.raise e - | `Skip -> Seq.Step.Skip () - | `Make e -> Seq.Step.Yield (e,())) + | `Skip -> Seq.Step.Skip {state=()} + | `Make e -> Seq.Step.Yield {value=e;state=()}) let read_all t tag = read_events t |> Seq.filter_map ~f:(Value.get tag) diff --git a/lib/bap_traces/bap_trace_id.ml b/lib/bap_traces/bap_trace_id.ml index d66758c21..98de13b55 100644 --- a/lib/bap_traces/bap_trace_id.ml +++ b/lib/bap_traces/bap_trace_id.ml @@ -2,7 +2,7 @@ open Core_kernel[@@warning "-D"] open Regular.Std open Bap.Std -module Bin = Bin_prot.Utils.Make_binable(struct +module Bin = Bin_prot.Utils.Make_binable_without_uuid(struct module Binable = String type t = Uuidm.t let to_binable = Uuidm.to_bytes diff --git a/lib/bap_traces/bap_trace_meta.ml b/lib/bap_traces/bap_trace_meta.ml index eaf58d29e..57759882d 100644 --- a/lib/bap_traces/bap_trace_meta.ml +++ b/lib/bap_traces/bap_trace_meta.ml @@ -39,7 +39,7 @@ let hexstring_of_bytestring str = String.init (String.length str * 2) (fun dstix -> let srcix = dstix / 2 in let is_hi = dstix mod 2 = 0 in - let b = Caml.Char.code (String.get str srcix) in + let b = Stdlib.Char.code (String.get str srcix) in let nib = 0xF land if is_hi then (b lsr 4) else b in String.get byte2hexchar nib) @@ -52,7 +52,7 @@ module Binary = struct @\nmd5sum: %s\ @\n@[<2>\ args: %a@]\ - @\n@[<2>envp:@\n%a@]@]@\n}" t.path (Caml.Digest.to_hex t.md5sum) Args.pp t.args Envp.pp t.envp + @\n@[<2>envp:@\n%a@]@]@\n}" t.path (Stdlib.Digest.to_hex t.md5sum) Args.pp t.args Envp.pp t.envp end let pp_time fmt t = diff --git a/lib/bap_types/bap_bitvector.ml b/lib/bap_types/bap_bitvector.ml index bf6f9f28b..c88aabccc 100644 --- a/lib/bap_types/bap_bitvector.ml +++ b/lib/bap_types/bap_bitvector.ml @@ -135,7 +135,7 @@ end = struct let of_string s = {packed = Z.of_bits s} end - include Binable.Of_stringable(Stringable) [@@warning "-D"] + include Binable.Of_stringable_without_uuid(Stringable) [@@warning "-D"] include Sexpable.Of_stringable(Stringable) end @@ -691,7 +691,7 @@ module V1 = struct end include Z include Sexpable.Of_stringable(Repr) - include Binable.Of_stringable(Repr) [@@warning "-D"] + include Binable.Of_stringable_without_uuid(Repr) [@@warning "-D"] end type t = { @@ -717,7 +717,7 @@ module Stable = struct signed = is_signed x; } - include Binable.Of_binable(V1)(struct + include Binable.Of_binable_without_uuid(V1)(struct type t = Packed.t let to_binable = to_legacy let of_binable = of_legacy diff --git a/lib/bap_types/bap_helpers.ml b/lib/bap_types/bap_helpers.ml index 0e4a813b7..0a1a5381a 100644 --- a/lib/bap_types/bap_helpers.ml +++ b/lib/bap_types/bap_helpers.ml @@ -460,7 +460,7 @@ module Trie = struct method! map_sym var = let name = Bap_var.name var in let ty = Bap_var.typ var in - String.Table.find_or_add vars name + Hashtbl.find_or_add vars name ~default:(fun () -> Bap_var.create name ty) method! map_int w = let ty = Type.Imm (Word.bitwidth w) in @@ -1046,11 +1046,11 @@ module Stmt = struct let bil_free_vars bil = let update news vars kill = - VS.union vars (VS.diff news kill) in + Set.union vars (Set.diff news kill) in fst @@ List.fold bil ~init:(VS.empty,VS.empty) ~f:(fun (vars,kill) -> function | Stmt.Move (v,e) -> - update (Exp.free_vars e) vars kill, VS.add kill v + update (Exp.free_vars e) vars kill, Set.add kill v | stmt -> update (free_vars stmt) vars kill, kill) class constant_folder = Constant_folder.main diff --git a/lib/bap_types/bap_ir.ml b/lib/bap_types/bap_ir.ml index d17fbb7ba..3da2ec5a3 100644 --- a/lib/bap_types/bap_ir.ml +++ b/lib/bap_types/bap_ir.ml @@ -491,7 +491,7 @@ let term_pp ?(no_cut=false) ?(box=horizontal) pp_self ppf t = let open Format in let attrs = Dict.data t.dict in Seq.iter attrs ~f:(fun attr -> - pp_open_tag ppf (asprintf "%a" pp_attr attr)); + pp_open_stag ppf @@ String_tag (asprintf "%a" pp_attr attr)); let pp_cut ppf = if not no_cut then Format.pp_print_break ppf 1 0 else fprintf ppf " " in @@ -500,7 +500,7 @@ let term_pp ?(no_cut=false) ?(box=horizontal) pp_self ppf t = pp_cut pp_self t.self; Format.pp_close_box ppf (); - Seq.iter attrs ~f:(fun _ -> pp_close_tag ppf ()) + Seq.iter attrs ~f:(fun _ -> pp_close_stag ppf ()) [@@warning "-D"] (* for open and close tag *) let pp_value slots ppf x = @@ -1949,7 +1949,7 @@ module Ir_program = struct let get_and_cache (get : 'a getter) prog tid : 'a term option = let open Option.Monad_infix in get prog tid >>= fun (path,term) -> - Tid.Table.change prog.self.paths tid (fun _ -> Some path); + Hashtbl.change prog.self.paths tid (fun _ -> Some path); Some term type 'a entry = { @@ -1959,7 +1959,7 @@ module Ir_program = struct let make_getter (term : 'a entry) prog (tid : tid) : 'a term option = let open Option.Monad_infix in - match Tid.Table.find prog.self.paths tid with + match Hashtbl.find prog.self.paths tid with | None -> get_and_cache term.get prog tid | Some path -> try @@ -1987,7 +1987,7 @@ module Ir_program = struct match lookup t p tid with | None -> None | Some _ -> - let path = Tid.Table.find_exn p.self.paths tid in + let path = Hashtbl.find_exn p.self.paths tid in match t.par with | Blk -> Some (blk_of_path p path) | Arg -> Some (arg_of_path p path) diff --git a/lib/bap_types/bap_ogre.ml b/lib/bap_types/bap_ogre.ml index 53967f240..bf475a65f 100644 --- a/lib/bap_types/bap_ogre.ml +++ b/lib/bap_types/bap_ogre.ml @@ -16,7 +16,7 @@ end let pp = Ogre.Doc.pp include Sexpable.Of_stringable(Stringable) -include Binable.Of_stringable(Stringable) [@@warning "-D"] +include Binable.Of_stringable_without_uuid(Stringable) [@@warning "-D"] type KB.Conflict.t += Spec_inconsistency of Error.t diff --git a/lib/bap_types/bap_toplevel.ml b/lib/bap_types/bap_toplevel.ml index bc9968e52..7b79fb671 100644 --- a/lib/bap_types/bap_toplevel.ml +++ b/lib/bap_types/bap_toplevel.ml @@ -69,7 +69,7 @@ let get slot = eval slot this |> function | Some x -> x -let () = Caml.Printexc.register_printer @@ function +let () = Stdlib.Printexc.register_printer @@ function | Conflict err -> Some (Format.asprintf "%a" Knowledge.Conflict.pp err) | _ -> None diff --git a/lib/bap_types/bap_trie.ml b/lib/bap_types/bap_trie.ml index bcfb6a265..d1bcfdc9a 100644 --- a/lib/bap_types/bap_trie.ml +++ b/lib/bap_types/bap_trie.ml @@ -26,16 +26,16 @@ module Make(Key : Key) = struct let rec loop n {subs} = let c = Key.nth_token k n in if n + 1 = len then found subs c else find subs n c - and found parent c = Tokens.change parent c (function + and found parent c = Hashtbl.change parent c (function | None -> f None >>| init | Some t -> Some {t with data = f t.data}) - and find parent n c = match Tokens.find parent c with + and find parent n c = match Hashtbl.find parent c with | Some s -> loop (n+1) s | None -> match f None with | None -> return () | Some _ -> let sub = create () in - Tokens.add_exn parent c sub; + Hashtbl.add_exn parent c sub; loop (n+1) sub in if len > 0 then loop 0 trie else trie.data <- f trie.data @@ -43,7 +43,7 @@ module Make(Key : Key) = struct let walk root k ~init ~f = let len = Key.length k in let rec lookup best n trie = - match Tokens.find trie.subs (Key.nth_token k n) with + match Hashtbl.find trie.subs (Key.nth_token k n) with | None -> best | Some sub -> let best = f best sub.data in @@ -54,7 +54,7 @@ module Make(Key : Key) = struct let length trie = let rec count trie = let n = if Option.is_none trie.data then 0 else 1 in - Tokens.fold ~init:n trie.subs + Hashtbl.fold ~init:n trie.subs ~f:(fun ~key:_ ~data:trie n -> n + count trie) in count trie @@ -82,7 +82,7 @@ module Make(Key : Key) = struct | Some data -> f init (List.rev rprefix) data in fold_table init rprefix t.subs and fold_table init rprefix cs = - Tokens.fold cs ~init ~f:(fun ~key ~data init -> + Hashtbl.fold cs ~init ~f:(fun ~key ~data init -> let rprefix = key :: rprefix in fold init rprefix data) in fold init [] t @@ -97,7 +97,7 @@ module Make(Key : Key) = struct pp_val data pp_prefix (List.rev rprefix)); pp_table ppf rprefix t.subs and pp_table ppf rprefix cs = - Tokens.iteri cs (fun ~key ~data -> + Hashtbl.iteri cs (fun ~key ~data -> let rprefix = key :: rprefix in pp_trie ppf rprefix data) in pp_trie ppf [] t diff --git a/lib/bap_types/bap_value.ml b/lib/bap_types/bap_value.ml index d865c09c9..f77d825ba 100644 --- a/lib/bap_types/bap_value.ml +++ b/lib/bap_types/bap_value.ml @@ -21,9 +21,7 @@ type 'a tag = { slot : (Theory.program,'a option) KB.slot; } -module Value = struct - type t = Univ_map.Packed.t = T : 'a Type_equal.Id.t * 'a -> t -end +module Value = Univ_map.Packed module Equal = struct type ('a,'b) t = ('a,'b) Type_equal.t = T : ('a,'a) t @@ -147,7 +145,7 @@ module Univ = struct } [@@deriving bin_io] end - include Binable.Of_binable(Repr)(struct + include Binable.Of_binable_without_uuid(Repr)(struct type t = Value.t let to_binable x = Repr.{ typeid = typeid x; @@ -261,7 +259,7 @@ module Dict = struct List.fold ~init:empty ~f:(fun dict (Value.T (k,x)) -> Univ_map.set dict k x) end - include Binable.Of_binable(Data)(struct + include Binable.Of_binable_without_uuid(Data)(struct type t = Univ_map.t let to_binable = Data.of_dict let of_binable = Data.to_dict diff --git a/lib/bap_types/bap_var.ml b/lib/bap_types/bap_var.ml index 724f4557c..e31d1d66d 100644 --- a/lib/bap_types/bap_var.ml +++ b/lib/bap_types/bap_var.ml @@ -115,7 +115,7 @@ module T = struct let of_sexpable = Repr.to_var end) - include Binable.Of_binable(Repr)(struct + include Binable.Of_binable_without_uuid(Repr)(struct type t = var let to_binable = Repr.of_var let of_binable = Repr.to_var diff --git a/lib/bitvec_binprot/bitvec_binprot.ml b/lib/bitvec_binprot/bitvec_binprot.ml index 19e8bfd25..2d8dcc376 100644 --- a/lib/bitvec_binprot/bitvec_binprot.ml +++ b/lib/bitvec_binprot/bitvec_binprot.ml @@ -1,6 +1,6 @@ open Bin_prot.Std type t = Bitvec.t -module Functions = Bin_prot.Utils.Make_binable(struct +module Functions = Bin_prot.Utils.Make_binable_without_uuid(struct module Binable = struct type t = string [@@deriving bin_io] end diff --git a/lib/graphlib/graphlib_graph.ml b/lib/graphlib/graphlib_graph.ml index af705673e..d1e1cc250 100644 --- a/lib/graphlib/graphlib_graph.ml +++ b/lib/graphlib/graphlib_graph.ml @@ -402,7 +402,7 @@ module To_ocamlgraph(G : Graph) = struct let find_edge g x y = match G.Node.edge x y g with | Some e -> e - | None -> raise Caml.Not_found + | None -> raise Stdlib.Not_found let find_all_edges g x y = G.Node.edge x y g |> function | None -> [] @@ -482,7 +482,7 @@ module Of_ocamlgraph(G : Graph.Sig.P) = struct let remove n g = G.remove_vertex g n let has_edge x y g = G.mem_edge g x y let edge x y g = - try Some (G.find_edge g x y) with Caml.Not_found -> None + try Some (G.find_edge g x y) with Stdlib.Not_found -> None let degree ?dir n g = try match dir with diff --git a/lib/knowledge/bap_knowledge.ml b/lib/knowledge/bap_knowledge.ml index ea4d64797..51ef4e71c 100644 --- a/lib/knowledge/bap_knowledge.ml +++ b/lib/knowledge/bap_knowledge.ml @@ -17,9 +17,9 @@ type conflict = exn = .. module Conflict = struct type t = conflict = .. - let to_string = Caml.Printexc.to_string + let to_string = Stdlib.Printexc.to_string let pp ppf err = Format.fprintf ppf "%s" (to_string err) - let register_printer = Caml.Printexc.register_printer + let register_printer = Stdlib.Printexc.register_printer let sexp_of_t err = Sexp.Atom (to_string err) end @@ -159,21 +159,21 @@ end let branching_bit a b = highest_bit (a lxor b) let rec find_exn t k = match t with - | Nil -> raise Caml.Not_found + | Nil -> raise Stdlib.Not_found | Tip (k', v) when k = k' -> v - | Tip _ -> raise Caml.Not_found + | Tip _ -> raise Stdlib.Not_found | Bin (k', l, r) -> match Key.compare k' k with - | NA -> raise Caml.Not_found + | NA -> raise Stdlib.Not_found | LB -> find_exn l k | RB -> find_exn r k let find t k = try Some (find_exn t k) - with Caml.Not_found -> None + with Stdlib.Not_found -> None let mem k t = try ignore (find_exn k t); true - with Caml.Not_found -> false + with Stdlib.Not_found -> false let node payload branching l r = match l, r with | Nil, o | o, Nil -> o @@ -364,7 +364,7 @@ end = struct let unescaped_exists_so_escape ?(skip_pos=(-1)) s = let buf = Buffer.create (String.length s + 1) in - Caml.StringLabels.iteri s ~f:(fun p c -> + Stdlib.StringLabels.iteri s ~f:(fun p c -> if p <> skip_pos && is_separator_unescaped s p c then Buffer.add_char buf escape_char; Buffer.add_char buf c); @@ -594,7 +594,7 @@ end = struct ?package ?(reliability=trustworthy) name = let name = Name.create ?package name in - let agent = Caml.Digest.string (Name.show name) in + let agent = Stdlib.Digest.string (Name.show name) in if Hashtbl.mem agents agent then failwithf "An agent with name `%a' already exists, \ please choose another name" Name.str name (); @@ -2121,7 +2121,7 @@ module Record = struct end } - include Binable.Of_binable(Repr)(struct + include Binable.Of_binable_without_uuid(Repr)(struct type t = record let to_binable s = Dict.foreach s ~init:[] { @@ -2472,7 +2472,7 @@ module Knowledge = struct let t_of_sexp = opaque_of_sexp let empty = empty cls - include Binable.Of_binable(Record)(struct + include Binable.Of_binable_without_uuid(Record)(struct type t = (a,b) cls value let to_binable : 'a value -> Record.t = fun {data} -> data @@ -2700,7 +2700,7 @@ module Knowledge = struct end in let module R = struct include Comparator - include Binable.Of_binable(Oid)(struct + include Binable.Of_binable_without_uuid(Oid)(struct type t = a obj let to_binable = Fn.id let of_binable = Fn.id @@ -2714,7 +2714,7 @@ module Knowledge = struct slot : Name.t; repr : string; error : Conflict.t; - trace : Caml.Printexc.raw_backtrace; + trace : Stdlib.Printexc.raw_backtrace; } let () = Conflict.register_printer (function @@ -2724,7 +2724,7 @@ module Knowledge = struct "Unable to update the slot %a of %s,\n%a\n\ Backtrace:\n%s" Name.pp slot repr Conflict.pp error - (Caml.Printexc.raw_backtrace_to_string trace) + (Stdlib.Printexc.raw_backtrace_to_string trace) | _ -> None) @@ -2755,7 +2755,7 @@ module Knowledge = struct | Error err -> raise (Record.Merge_conflict err))}} with Record.Merge_conflict err -> non_monotonic slot obj err @@ - Caml.Printexc.get_raw_backtrace () + Stdlib.Printexc.get_raw_backtrace () let notify {Slot.watchers} obj data = Hashtbl.data watchers |> @@ -2852,7 +2852,7 @@ module Knowledge = struct fun slot obj -> objects slot.cls >>| fun {vals} -> match Oid.Tree.find_exn vals obj with - | exception Caml.Not_found -> Sleep + | exception Stdlib.Not_found -> Sleep | {data; comp=slots} -> match Map.find slots (uid slot) with | Some Work _ -> Awoke | other -> match other,Record.is_empty data with @@ -2933,7 +2933,7 @@ module Knowledge = struct fun slot id -> objects slot.cls >>| fun {Env.vals} -> match Oid.Tree.find_exn vals id with - | exception Caml.Not_found -> slot.dom.empty + | exception Stdlib.Not_found -> slot.dom.empty | {data} -> Record.get slot.key slot.dom data let rec collect_inner @@ -3213,7 +3213,7 @@ module Knowledge = struct compute_value cls obj >>= fun () -> objects cls >>| fun {Env.vals} -> match Oid.Tree.find_exn vals obj with - | exception Caml.Not_found -> Value.empty cls + | exception Stdlib.Not_found -> Value.empty cls | {data=x} -> Value.create cls x let run cls obj s = (obj >>= get_value cls).run s diff --git a/lib/knowledge/bap_knowledge.mli b/lib/knowledge/bap_knowledge.mli index 175edb549..efa8f827c 100644 --- a/lib/knowledge/bap_knowledge.mli +++ b/lib/knowledge/bap_knowledge.mli @@ -1471,7 +1471,7 @@ module Knowledge : sig return the least upper bound of [x] and [y], if it exists. *) val mapping : - ('a,'e) Map.comparator -> + ('a,'e) Comparator.Module.t -> ?inspect:('d -> Base.Sexp.t) -> ?join:('d -> 'd -> ('d, conflict) result) -> equal:('d -> 'd -> bool) -> @@ -1485,7 +1485,7 @@ module Knowledge : sig operator is the set union, and the order operator is the [is_subset] function. *) - val powerset : ('a,'e) Set.comparator -> + val powerset : ('a,'e) Comparator.Module.t -> ?inspect:('a -> Sexp.t) -> string -> ('a,'e) Set.t domain @@ -1595,11 +1595,11 @@ module Knowledge : sig val array : 'a persistent -> 'a array persistent (** [set order t] derives persistent for a set. *) - val set : ('a,'c) Set.comparator -> 'a t -> ('a,'c) Set.t persistent + val set : ('a,'c) Comparator.Module.t -> 'a t -> ('a,'c) Set.t persistent (** [map order t] derives persistent for a map. *) - val map : ('k,'c) Map.comparator -> 'k t -> 'd t -> ('k,'d,'c) Map.t persistent + val map : ('k,'c) Comparator.Module.t -> 'k t -> 'd t -> ('k,'d,'c) Map.t persistent end (** Conflicting information. diff --git a/lib/monads/dune b/lib/monads/dune index 1977445b9..3db4cf44e 100644 --- a/lib/monads/dune +++ b/lib/monads/dune @@ -3,5 +3,5 @@ (public_name monads) (wrapped false) (preprocess (pps ppx_bap)) - (libraries core_kernel core_kernel.rope) + (libraries core_kernel jane_rope) (private_modules monads_monad monads_monoid monads_types)) diff --git a/lib/monads/monads_monad.ml b/lib/monads/monads_monad.ml index 79c72fe68..e8005c8ec 100644 --- a/lib/monads/monads_monad.ml +++ b/lib/monads/monads_monad.ml @@ -651,7 +651,7 @@ module ResultT = struct module type S = sig include S - val failf : ('a, Caml.Format.formatter, unit, unit -> 'b t) format4 -> 'a + val failf : ('a, Stdlib.Format.formatter, unit, unit -> 'b t) format4 -> 'a end module Make(M : Monad.S) : S with type 'a t := 'a T(M).t @@ -662,7 +662,7 @@ module ResultT = struct include Make(struct type t = Error.t end)(M) let failf fmt = - let open Caml.Format in + let open Stdlib.Format in let buf = Buffer.create 512 in let ppf = formatter_of_buffer buf in let kon ppf () = diff --git a/lib/monads/monads_monad.mli b/lib/monads/monads_monad.mli index fd5dd18ac..dea43da6a 100644 --- a/lib/monads/monads_monad.mli +++ b/lib/monads/monads_monad.mli @@ -99,7 +99,7 @@ module Result : sig module Error : sig module type S = sig include S - val failf : ('a, Caml.Format.formatter, unit, unit -> 'b t) format4 -> 'a + val failf : ('a, Stdlib.Format.formatter, unit, unit -> 'b t) format4 -> 'a end @@ -313,7 +313,7 @@ module State : sig include Identifiable.S with type t = id val zero : t val succ : t -> t - val pp : Caml.Format.formatter -> id -> unit + val pp : Stdlib.Format.formatter -> id -> unit end module T1(T : T)(M : Monad) : sig diff --git a/lib/ogre/ogre.ml b/lib/ogre/ogre.ml index f6847ff8a..0ff1315cd 100644 --- a/lib/ogre/ogre.ml +++ b/lib/ogre/ogre.ml @@ -673,8 +673,9 @@ module Exp = struct Var {attr=x;field={Type.fname=n1}}, Var {attr=y;field={Type.fname=n2}}) -> Var (fun row -> - bool String.(Map.find_exn row.(x).fields n1 = - Map.find_exn row.(y).fields n2)) + let s1 = Map.find_exn row.(x).fields n1 in + let s2 = Map.find_exn row.(y).fields n2 in + bool (String.equal s1 s2)) | Bop (op,x,y) -> Bop (op,lambda x, lambda y) | Uop (op,x) -> Uop(op,lambda x) | Var n -> Var (get_indiced n) diff --git a/lib/regular/regular_bytes.ml b/lib/regular/regular_bytes.ml index ec3f41882..627c34efa 100644 --- a/lib/regular/regular_bytes.ml +++ b/lib/regular/regular_bytes.ml @@ -2,7 +2,7 @@ module Std_bytes = Bytes open Core_kernel[@@warning "-D"] -module Binable = Bin_prot.Utils.Make_binable(struct +module Binable = Bin_prot.Utils.Make_binable_without_uuid(struct module Binable = String type t = Std_bytes.t let to_binable = Std_bytes.unsafe_to_string diff --git a/lib/regular/regular_cache.ml b/lib/regular/regular_cache.ml index e5dc7e5c8..b3c404536 100644 --- a/lib/regular/regular_cache.ml +++ b/lib/regular/regular_cache.ml @@ -47,7 +47,7 @@ module Digest = struct let add buf fmt = format ("%s"^^fmt) buf let add_sexp d sexp_of x = add d "%a" Sexp.pp (sexp_of x) - let add_file d name = add d "%s" (Caml.Digest.(file name |> to_hex)) + let add_file d name = add d "%s" (Stdlib.Digest.(file name |> to_hex)) let create ~namespace = make namespace end diff --git a/lib/regular/regular_data.ml b/lib/regular/regular_data.ml index a16db082a..69ca557d2 100644 --- a/lib/regular/regular_data.ml +++ b/lib/regular/regular_data.ml @@ -133,7 +133,7 @@ module Class = struct let add_method field cls ?desc ~ver name met : unit = update field cls ~f:(fun mets -> Map.change mets name ~f:(function | None -> Some (Ver.Map.singleton ver {cls=met; desc}) - | Some vs -> Some (Ver.Map.set vs ver {cls=met; desc}))) + | Some vs -> Some (Map.set vs ver {cls=met; desc}))) let find_with_ver (table : 'a table) ?ver name : (string * 'a) option = diff --git a/lib/regular/regular_seq.ml b/lib/regular/regular_seq.ml index 4baa168ad..4212b84ed 100644 --- a/lib/regular/regular_seq.ml +++ b/lib/regular/regular_seq.ml @@ -35,7 +35,7 @@ let compare compare_a t1 t2 = then r.return c); 0) -module Binable = Bin_prot.Utils.Make_binable1(struct +module Binable = Bin_prot.Utils.Make_binable1_without_uuid(struct module Binable = List type 'a t = 'a Sequence.t let to_binable = Sequence.to_list diff --git a/lib/text_tags/text_tags.ml b/lib/text_tags/text_tags.ml index 3abc4a8db..711fea039 100644 --- a/lib/text_tags/text_tags.ml +++ b/lib/text_tags/text_tags.ml @@ -6,6 +6,9 @@ module Unix = Caml_unix type mode = string exception Unknown_mode of string +let expect_stag () = + invalid_arg "Expected String_tag" + let expect_tag () = invalid_arg "Expect: tag := ( [ ...]) | " @@ -16,24 +19,29 @@ let is_quoted = String.is_prefix ~prefix:"\"" module Html = struct open Sexp - let mark_open_tag tag : string = - match Sexp.of_string tag with - | List (Atom tag :: attrs) -> - let attrs = List.map attrs ~f:(function - | List [Atom name; Atom value] -> - if is_quoted value - then sprintf "%s=%s" name value - else sprintf "%s=%S" name value - | other -> expect_arg ()) |> String.concat ~sep:" " in - sprintf "<%s %s>" tag attrs - | Atom tag -> sprintf "<%s>" tag - | _ -> expect_tag () - - let mark_close_tag tag : string = - match Sexp.of_string tag with - | List (Atom tag :: _) | Atom tag -> sprintf "" tag - | _ -> expect_tag () - + let mark_open_stag tag : string = match tag with + | String_tag tag -> + begin match Sexp.of_string tag with + | List (Atom tag :: attrs) -> + let attrs = List.map attrs ~f:(function + | List [Atom name; Atom value] -> + if is_quoted value + then sprintf "%s=%s" name value + else sprintf "%s=%S" name value + | other -> expect_arg ()) |> String.concat ~sep:" " in + sprintf "<%s %s>" tag attrs + | Atom tag -> sprintf "<%s>" tag + | _ -> expect_tag () + end + | _ -> expect_stag () + + let mark_close_stag tag : string = match tag with + | String_tag tag -> + begin match Sexp.of_string tag with + | List (Atom tag :: _) | Atom tag -> sprintf "" tag + | _ -> expect_tag () + end + | _ -> expect_stag () let print_open_tag fmt _ = pp_open_vbox fmt 1; pp_print_cut fmt () let print_close_tag fmt _ = pp_close_box fmt (); pp_print_cut fmt () @@ -41,11 +49,11 @@ module Html = struct let install fmt = pp_set_mark_tags fmt true; pp_set_print_tags fmt true; - pp_set_formatter_tag_functions fmt { - mark_open_tag; - mark_close_tag; - print_open_tag = print_open_tag fmt; - print_close_tag = print_close_tag fmt; + pp_set_formatter_stag_functions fmt { + mark_open_stag; + mark_close_stag; + print_open_stag = print_open_tag fmt; + print_close_stag = print_close_tag fmt; } [@@warning "-D"] end @@ -53,36 +61,39 @@ end module Blocks = struct open Sexp - let filter_attrs tag : string option = - match Sexp.of_string tag with - | List (Atom _ :: attrs) -> - List.filter_map attrs ~f:(function - | List [Atom "title"; Atom v] -> Some (`T v) - | List [Atom "id"; Atom v] -> Some (`I v) - | List [_;_] -> None - | _ -> expect_arg ()) |> (function - | [] -> None - | [`T v; _] | [_; `T v] - | [`T v] | [`I v] -> Some v - | _ -> None) - | Atom _ -> None - | _ -> expect_tag () - - let mark_open_tag tag : string = + let filter_attrs tag : string option = match tag with + | String_tag tag -> + begin match Sexp.of_string tag with + | List (Atom _ :: attrs) -> + List.filter_map attrs ~f:(function + | List [Atom "title"; Atom v] -> Some (`T v) + | List [Atom "id"; Atom v] -> Some (`I v) + | List [_;_] -> None + | _ -> expect_arg ()) |> (function + | [] -> None + | [`T v; _] | [_; `T v] + | [`T v] | [`I v] -> Some v + | _ -> None) + | Atom _ -> None + | _ -> expect_tag () + end + | _ -> expect_stag () + + let mark_open_stag tag : string = filter_attrs tag |> Option.value_map ~default:"" ~f:(sprintf "begin(%s) ") - let mark_close_tag tag : string = + let mark_close_stag tag : string = filter_attrs tag |> Option.value_map ~default:"" ~f:(sprintf "end(%s)") - let print_open_tag fmt tag : unit = + let print_open_stag fmt tag : unit = if Option.is_some (filter_attrs tag) then begin pp_open_vbox fmt 1; pp_print_cut fmt (); end - let print_close_tag fmt tag = + let print_close_stag fmt tag = if Option.is_some (filter_attrs tag) then begin pp_close_box fmt (); pp_print_cut fmt (); @@ -91,11 +102,11 @@ module Blocks = struct let install fmt = pp_set_mark_tags fmt true; pp_set_print_tags fmt true; - pp_set_formatter_tag_functions fmt { - mark_open_tag; - mark_close_tag; - print_open_tag = print_open_tag fmt; - print_close_tag = print_close_tag fmt; + pp_set_formatter_stag_functions fmt { + mark_open_stag; + mark_close_stag; + print_open_stag = print_open_stag fmt; + print_close_stag = print_close_stag fmt; } [@@warning "-D"] end @@ -121,37 +132,42 @@ module Attr = struct let name_of_attr tag = sscanf tag " .%s %s@\n" (fun s _ -> s) - let ascii_color tag = - try Option.some @@ match name_of_attr tag with - | "foreground" -> foreground tag - | "background" -> background tag - | _ -> invalid_arg "Expected foreground | background" - with _ -> None + let ascii_color = function + | String_tag tag -> + begin try Option.some @@ match name_of_attr tag with + | "foreground" -> foreground tag + | "background" -> background tag + | _ -> invalid_arg "Expected foreground | background" + with _ -> None + end + | _ -> expect_stag () - let need_to_print tag = - Hash_set.mem attrs (name_of_attr tag) + let need_to_print = function + | String_tag tag -> Hash_set.mem attrs (name_of_attr tag) + | _ -> expect_stag () let reset ppf = if not clean.contents then pp_print_string ppf "\x1b[39;49m"; clean := true - let print_open_tag ppf tag : unit = + let print_open_stag ppf tag : unit = if need_to_print tag then - match ascii_color tag with - | Some color when colorify.contents -> + match ascii_color tag, tag with + | Some color, _ when colorify.contents -> pp_print_string ppf color; clean := false - | _ -> + | _, String_tag tag -> pp_print_string ppf tag; pp_print_newline ppf () + | _ -> expect_stag () let install ppf = pp_set_print_tags ppf true; - let tags = pp_get_formatter_tag_functions ppf () in - pp_set_formatter_tag_functions ppf { + let tags = pp_get_formatter_stag_functions ppf () in + pp_set_formatter_stag_functions ppf { tags with - print_open_tag = print_open_tag ppf; + print_open_stag = print_open_stag ppf; }; let out = pp_get_formatter_out_functions ppf () in pp_set_formatter_out_functions ppf { @@ -183,13 +199,13 @@ let install fmt mode = | None -> raise (Unknown_mode mode) let with_mode fmt mode = - let g = pp_get_formatter_tag_functions fmt () in + let g = pp_get_formatter_stag_functions fmt () in let mark = pp_get_mark_tags fmt () in let print = pp_get_print_tags fmt () in let finally () = pp_set_mark_tags fmt mark; pp_set_print_tags fmt print; - pp_set_formatter_tag_functions fmt g in + pp_set_formatter_stag_functions fmt g in install fmt mode; Exn.protect ~finally [@@warning "-D"] diff --git a/lib_test/bap/run_tests.ml b/lib_test/bap/run_tests.ml index 3302b9e12..b59caf1ea 100644 --- a/lib_test/bap/run_tests.ml +++ b/lib_test/bap/run_tests.ml @@ -3,7 +3,7 @@ open Bap_plugins.Std open OUnit2 -module Sys = Caml.Sys +module Sys = Stdlib.Sys let suite () = "BAP" >::: [ diff --git a/lib_test/bap_dwarf/run_tests.ml b/lib_test/bap_dwarf/run_tests.ml index 92a48b1fc..674d9643e 100644 --- a/lib_test/bap_dwarf/run_tests.ml +++ b/lib_test/bap_dwarf/run_tests.ml @@ -2,7 +2,7 @@ open Core_kernel[@@warning "-D"] open OUnit2 module Dwarf = Bap_dwarf.Std -module Sys = Caml.Sys +module Sys = Stdlib.Sys let suite = "DWARF" >::: [ diff --git a/lib_test/bap_image/test_image.ml b/lib_test/bap_image/test_image.ml index 513eee9bc..11908ead0 100644 --- a/lib_test/bap_image/test_image.ml +++ b/lib_test/bap_image/test_image.ml @@ -39,7 +39,7 @@ let data ?(base=0) ?(gap=0) f ss asize name = let data = f data in let addr = !addr_ref in let len = Bytes.length data in - let dst = String.Table.find_or_add files name + let dst = Hashtbl.find_or_add files name ~default:create_file in let off = addr - base in Bytes.blit @@ -99,7 +99,7 @@ let print_list r = Or_error.sexp_of_t sexp_of_addr_list r let to_list ~word_size backend ~expect ctxt = - let data = String.Table.find_exn files backend |> Bytes.to_string in + let data = Hashtbl.find_exn files backend |> Bytes.to_string in let r = Image.of_string ~backend data >>| fun (img,warns) -> assert_bool "to_list: no warning" (List.is_empty warns); Table.to_sequence (Image.words img word_size) |> @@ -109,7 +109,7 @@ let to_list ~word_size backend ~expect ctxt = assert_equal ~ctxt ~printer:print_list (Ok expect) r let check ?(base=0) backend ~f ctxt = - let data = String.Table.find_exn files backend in + let data = Hashtbl.find_exn files backend in let data = Bytes.to_string data in let r = Image.of_string ~backend data >>= fun (img,warns) -> diff --git a/lib_test/powerpc/powerpc_move_tests.ml b/lib_test/powerpc/powerpc_move_tests.ml index b6cf12dc3..479f2d182 100644 --- a/lib_test/powerpc/powerpc_move_tests.ml +++ b/lib_test/powerpc/powerpc_move_tests.ml @@ -61,7 +61,7 @@ let mtcrf arch _ctxt = j*4 <= i && i < (j + 1) * 4) then let expected = if r1_bits.(i) then Word.b1 else Word.b0 in - let cr_bit = Int.Map.find_exn cri i in + let cr_bit = Map.find_exn cri i in let value = lookup_var ctxt cr_bit in let err = sprintf "mtcrf assign to bit %d failed\n" i in assert_bool err (is_equal_words expected value)) diff --git a/lib_test/powerpc/powerpc_tests_helpers.ml b/lib_test/powerpc/powerpc_tests_helpers.ml index 0c048672c..789a69691 100644 --- a/lib_test/powerpc/powerpc_tests_helpers.ml +++ b/lib_test/powerpc/powerpc_tests_helpers.ml @@ -84,7 +84,7 @@ module Make(B : Bitwidth) = struct bits let crn = - Int.Map.fold cri ~init:String.Map.empty + Map.fold cri ~init:String.Map.empty ~f:(fun ~key:_ ~data:var acc -> Map.set acc (Var.name var) var) @@ -133,7 +133,7 @@ let raise_arch () = failwith "powerpc arch is the only expected" let cr_bit n = - Int.Map.find_exn Any_ppc.cri n + Map.find_exn Any_ppc.cri n let nf = cr_bit 0 let pf = cr_bit 1 @@ -219,8 +219,8 @@ let lookup_var c var = match c#lookup var with let find_gpr arch name = try match arch with - | `ppc -> String.Map.find_exn P32.gpr name - | _ -> String.Map.find_exn P64.gpr name + | `ppc -> Map.find_exn P32.gpr name + | _ -> Map.find_exn P64.gpr name with _ -> sprintf "gpr %s not" name |> failwith diff --git a/monads.opam b/monads.opam index 8e3c1e227..d291f12b9 100644 --- a/monads.opam +++ b/monads.opam @@ -12,7 +12,8 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-common" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} + "jane_rope" {>= "v0.17"} "ppx_bap" {= version} "odoc" {with-doc} ] diff --git a/myocamlbuild.ml.in b/myocamlbuild.ml.in index 277e5a893..f197ad2c7 100644 --- a/myocamlbuild.ml.in +++ b/myocamlbuild.ml.in @@ -19,7 +19,6 @@ let mark_tags () = List.iter mark_tag_used [ "pkg_core_bench"; "tests"; - "pkg_piqirun"; "pkg_core"; ] diff --git a/oasis/piqi-printers b/oasis/piqi-printers deleted file mode 100644 index ff9dc4c95..000000000 --- a/oasis/piqi-printers +++ /dev/null @@ -1,43 +0,0 @@ -######################## Piqi library and plugin ############################# -Flag piqi_printers - Description: Build piqi serialization library and plugin - Default: false - -Library "bap-piqi" - Path: lib/bap_piqi - Build$: flag(everything) || flag(piqi_printers) - FindLibName: bap-piqi - BuildTools: ocamlbuild, piqi - DataFiles: *.piqi ($datadir/bap/piqi) - CompiledObject: best - BuildDepends: piqirun,piqirun.pb,piqirun.ext,bap - Modules: Bir_piqi, Bil_piqi - InternalModules: - Stmt_piqi, - Stmt_piqi_ext, - Ir_piqi, - Ir_piqi_ext - -Library piqi_printers_plugin - Path: plugins/piqi_printers - Build$: flag(everything) || flag(piqi_printers) - FindlibName: bap-plugin-piqi_printers - CompiledObject: native - BuildDepends: bap-piqi - InternalModules: Piqi_printers_main - XMETADescription: provides piqi serialization for main data types (BIL, IR) - XMETAExtraLines: tags="printer, serialization" - - -Executable run_piqi_tests - Path: lib/bap_piqi/test - Build$: flag(tests) && (flag(everything) || flag(piqi_printers)) - CompiledObject: best - BuildDepends: bap, oUnit, bap-piqi - Install: false - MainIs: run_piqi_tests.ml - -Test piqi_tests - TestTools: run_piqi_tests - Run$: flag(tests) && (flag(everything) || flag(piqi_printers)) - Command: $run_piqi_tests -runner sequential diff --git a/oasis/piqi-printers.ocamlbuild.ml.in b/oasis/piqi-printers.ocamlbuild.ml.in deleted file mode 100644 index f1e1c5d7b..000000000 --- a/oasis/piqi-printers.ocamlbuild.ml.in +++ /dev/null @@ -1,19 +0,0 @@ -let nonempty = function (A s) -> String.length s <> 0 | _ -> true - -(* the piqi support is rather fragile *) -let piqic_rule () : unit = - rule "piqic: piqi -> .ml & _ext.ml" - ~prods:["%_piqi.ml"; "%_piqi_ext.ml"] - ~deps:["%.piqi"] - (fun env _ -> - Cmd (S (List.filter nonempty [ - A (expand "${piqic}"); - A (expand "${piqic_flags}"); - A "-C"; - A "lib/bap_piqi"; - A "-I"; - A "../lib/bap_piqi"; - A (env "%.piqi"); - A"--multi-format"])));; - -let () = Rules.add piqic_rule diff --git a/oasis/piqi-printers.setup.ml.in b/oasis/piqi-printers.setup.ml.in deleted file mode 100644 index 36cfd999f..000000000 --- a/oasis/piqi-printers.setup.ml.in +++ /dev/null @@ -1,22 +0,0 @@ -let piqic () : unit = - let chop str = try - Filename.chop_extension str - with _ -> str in - let piqic_path = BaseCheck.prog_best "piqic_path" ["piqic-ocaml"; "piqic"] () in - BaseEnv.var_define "piqic_flags" (fun () -> - if chop (Filename.basename (BaseEnv.var_get "piqic")) = "piqic" - then "ocaml" - else "") |> - definition_end; - BaseEnv.var_define "piqic" (fun () -> - if List.mem (BaseStandardVar.os_type ()) ["Cygwin"; "Win32"] - then - String.concat " " - (OASISExec.run_read_output ~ctxt "cygpath" [piqic_path]) - else piqic_path) |> - definition_end - - - - -let () = define [piqic] diff --git a/ogre.opam b/ogre.opam index 2153250da..71219ea80 100644 --- a/ogre.opam +++ b/ogre.opam @@ -12,7 +12,7 @@ homepage: "https://github.com/BinaryAnalysisPlatform/bap" bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core_kernel" {>= "v0.17"} "bap-common" {= version} "monads" {= version} "odoc" {with-doc} diff --git a/plugins/analyze/analyze_main.ml b/plugins/analyze/analyze_main.ml index 2361f0385..a1eabdfa9 100644 --- a/plugins/analyze/analyze_main.ml +++ b/plugins/analyze/analyze_main.ml @@ -50,7 +50,7 @@ open Core_kernel[@@warning "-D"] open Bap_main open Bap_knowledge open Bap.Std -module Sys = Caml.Sys +module Sys = Stdlib.Sys include Loggers() diff --git a/plugins/api/api_main.ml b/plugins/api/api_main.ml index c8dfec761..f03d58cc9 100644 --- a/plugins/api/api_main.ml +++ b/plugins/api/api_main.ml @@ -1,7 +1,7 @@ open Core_kernel[@@warning "-D"] open Result.Monad_infix open Bap.Std -module Sys = Caml.Sys +module Sys = Stdlib.Sys include Self() module Configuration = Bap_main.Extension.Configuration @@ -16,7 +16,7 @@ let try_with_default ~default f = match try_with f with let getenv v = try Some (Sys.getenv v) - with Caml.Not_found -> None + with Stdlib.Not_found -> None module Path = FilePath.DefaultPath.Abstract type path = Path.filename diff --git a/plugins/bil/bil_float.ml b/plugins/bil/bil_float.ml index e3524b3ff..068b72f7f 100644 --- a/plugins/bil/bil_float.ml +++ b/plugins/bil/bil_float.ml @@ -78,7 +78,7 @@ module Make(B : Theory.Core) = struct let smin x y = ite (x <$ y) x y let leading_one sort = - one sort lsl (of_int sort Caml.(Theory.Bitv.size sort - 1)) + one sort lsl (of_int sort Stdlib.(Theory.Bitv.size sort - 1)) end @@ -125,7 +125,7 @@ module Make(B : Theory.Core) = struct let open IEEE754 in let bits = Sort.bits fsort in let bit = Bits.define 1 in - let bits_1 = Bits.define Caml.(Bits.size bits - 1) in + let bits_1 = Bits.define Stdlib.(Bits.size bits - 1) in let sign = ite sign (B.one bit) (B.zero bit) in B.append bits sign (B.append bits_1 expn coef) @@ -134,7 +134,7 @@ module Make(B : Theory.Core) = struct let {IEEE754.p; t} = IEEE754.Sort.spec fsort in let is_subnormal = (inv (msb coef)) && (is_one expn) in ite is_subnormal (pred expn) expn >>>= fun expn -> - if Caml.(p = t) then pack_raw fsort sign expn coef + if Stdlib.(p = t) then pack_raw fsort sign expn coef else B.low (Bits.define t) coef >>>= fun coef -> pack_raw fsort sign expn coef >>= fun r -> !!r @@ -172,7 +172,7 @@ module Make(B : Theory.Core) = struct let with_sign sign bitv = let open B in bitv >>-> fun s bitv -> - let s' = Bits.define Caml.(Bits.size s - 1) in + let s' = Bits.define Stdlib.(Bits.size s - 1) in let bit = Bits.define 1 in ite sign ((append s (one bit) (zero s')) lor !!bitv) ((append s (zero bit) (ones s')) land !!bitv) @@ -388,11 +388,11 @@ module Make(B : Theory.Core) = struct let size = Bits.size sort in let pow, num = nearest_pow2 size in let sort' = Bits.define num in - let shifts = List.init pow ~f:(fun p -> Caml.(num / (2 lsl p))) in + let shifts = List.init pow ~f:(fun p -> Stdlib.(num / (2 lsl p))) in let shifts,_ = List.fold shifts ~init:([],0) ~f:(fun (acc,prev) curr -> - let total = Caml.(curr + prev) in + let total = Stdlib.(curr + prev) in (total, curr) :: acc, total) in let shifts = List.rev shifts in let rec loop lets x = function @@ -403,7 +403,7 @@ module Make(B : Theory.Core) = struct ite (is_zero (x land mask)) (of_int sort shf) (zero sort) >>>= fun nextn -> loop (nextn :: lets) nextx shifts in loop [] (B.unsigned sort' !!x) shifts >>>= fun n -> - of_int sort Caml.(num - size) >>>= fun dif -> + of_int sort Stdlib.(num - size) >>>= fun dif -> ite (is_zero !!x) (of_int sort size) (n - dif) let possible_lshift expn coef = @@ -677,7 +677,7 @@ module Make(B : Theory.Core) = struct let lost_afew = b0, b0, b1 in nomin >>-> fun sort nomin -> let rec loop i bits nomin = - if Caml.(i < 0) then + if Stdlib.(i < 0) then List.fold bits ~f:(lor) ~init:(zero sort) >>>= fun coef -> match_ [ (nomin > denom) --> f coef lost_alot; @@ -690,8 +690,8 @@ module Make(B : Theory.Core) = struct ite (nomin > denom) (nomin - denom) nomin >>>= fun next_nomin -> next_nomin lsl one sort >>>= fun next_nomin -> bind next_nomin (fun next_nomin -> - loop Caml.(i - 1) (bit :: bits) next_nomin) in - loop Caml.(prec - 1) [] !!nomin + loop Stdlib.(i - 1) (bit :: bits) next_nomin) in + loop Stdlib.(prec - 1) [] !!nomin let fdiv_finite fsort rm x y = let open B in @@ -774,7 +774,7 @@ module Make(B : Theory.Core) = struct let truncate fsort x rm fsort' = let open B in let sigs_sh = Bits.size (sigs fsort') in - let d_bias = Caml.(bias fsort - bias fsort') in + let d_bias = Stdlib.(bias fsort - bias fsort') in let dst_maxe = max_exponent' (Bits.size @@ exps fsort') in unpack fsort x @@ fun sign expn coef -> if_ (is_all_ones expn || is_zero expn) @@ -806,8 +806,8 @@ module Make(B : Theory.Core) = struct (* pre: fsort "<=" fsort' *) let extend fsort x fsort' = let open B in - let d_sigs = Caml.(Bits.size (sigs fsort') - Bits.size (sigs fsort)) in - let d_bias = Caml.(bias fsort' - bias fsort) in + let d_sigs = Stdlib.(Bits.size (sigs fsort') - Bits.size (sigs fsort)) in + let d_bias = Stdlib.(bias fsort' - bias fsort) in unpack fsort x @@ fun sign expn coef -> match_ [ is_all_ones expn --> ones (exps fsort'); @@ -840,7 +840,7 @@ module Make(B : Theory.Core) = struct let exps = exps fsort in let sigs = Bits.define p in bitv >>-> fun inps bitv -> - of_int exps Caml.(bias + p - 1) >>>= fun expn -> + of_int exps Stdlib.(bias + p - 1) >>>= fun expn -> of_int sigs p >>>= fun prec -> clz !!bitv >>>= fun clz -> unsigned sigs clz >>>= fun clz -> @@ -886,8 +886,8 @@ module Make(B : Theory.Core) = struct let range_reduction fsort x f = let open B in let bias = bias fsort in - let low = of_int (exps fsort) Caml.(bias - 0) in - let top = of_int (exps fsort) Caml.(bias + 1) in + let low = of_int (exps fsort) Stdlib.(bias - 0) in + let top = of_int (exps fsort) Stdlib.(bias + 1) in unpack_raw fsort x @@ fun sign expn coef -> match_ [ (expn = top && non_zero coef) --> (expn - low); diff --git a/plugins/bil/bil_semantics.ml b/plugins/bil/bil_semantics.ml index 2b0a89dab..83b451213 100644 --- a/plugins/bil/bil_semantics.ml +++ b/plugins/bil/bil_semantics.ml @@ -60,7 +60,7 @@ module Basic : Theory.Basic = struct let int s w = vec s @@ Bil.(int @@ Word.create w (size s)) - let effect x = KB.Value.get effects x + let effect_ x = KB.Value.get effects x let (>>->) v f = v >>= fun v -> f (sort v) (value v) @@ -183,7 +183,7 @@ module Basic : Theory.Basic = struct | _ -> exp s (Bil.ite cnd yes nay) - let (>>:=) v f = v >>= fun v -> f (effect v) + let (>>:=) v f = v >>= fun v -> f (effect_ v) let branch cnd yes nay = cnd >>= fun cnd -> @@ -284,7 +284,7 @@ module Basic : Theory.Basic = struct let seq x y = x >>= fun x -> y >>= fun y -> - eff (effect x @ effect y) + eff (effect_ x @ effect_ y) let blk lbl x y = x >>:= fun x -> diff --git a/plugins/byteweight/byteweight_main.ml b/plugins/byteweight/byteweight_main.ml index 100e31e63..44a034918 100644 --- a/plugins/byteweight/byteweight_main.ml +++ b/plugins/byteweight/byteweight_main.ml @@ -45,7 +45,7 @@ open Core_kernel[@@warning "-D"] open Bap_main open Bap_core_theory open Bap.Std -module Sys = Caml.Sys +module Sys = Stdlib.Sys open KB.Syntax include Loggers() diff --git a/plugins/cache/bap_cache.ml b/plugins/cache/bap_cache.ml index 15bb5057a..28ebb4627 100644 --- a/plugins/cache/bap_cache.ml +++ b/plugins/cache/bap_cache.ml @@ -5,9 +5,9 @@ open Bap_cache_types include Self () -module Filename = Caml.Filename -module Random = Caml.Random -module Sys = Caml.Sys +module Filename = Stdlib.Filename +module Random = Stdlib.Random +module Sys = Stdlib.Sys module Unix = Caml_unix module Utils = Bap_cache_utils @@ -56,7 +56,7 @@ end include Cfg -let getenv opt = try Some (Sys.getenv opt) with Caml.Not_found -> None +let getenv opt = try Some (Sys.getenv opt) with Stdlib.Not_found -> None let root () = match !default_root with | Some dir -> dir // ".cache" // "bap" diff --git a/plugins/cache/bap_cache_gc.ml b/plugins/cache/bap_cache_gc.ml index 22dc97bd2..42877d201 100644 --- a/plugins/cache/bap_cache_gc.ml +++ b/plugins/cache/bap_cache_gc.ml @@ -79,8 +79,7 @@ open Bap.Std include Self () module Cache = Bap_cache -module CDF = Int.Map -module Sys = Caml.Sys +module Sys = Stdlib.Sys module Unix = Caml_unix type entry = { @@ -110,7 +109,7 @@ let cdf entries = Array.foldi entries ~init:(Map.empty (module Int),0) ~f:(fun i (m,prev) e -> let f_i = prev + max min_entry_size e.size in - CDF.add_exn m prev i, f_i) + Map.add_exn m prev i, f_i) let select entries total_size size_to_free = let cdf = cdf entries in @@ -118,7 +117,7 @@ let select entries total_size size_to_free = if freed < size_to_free then let u = Random.int total_size in let (_,i) = - Option.value_exn (CDF.closest_key cdf `Less_or_equal_to u) in + Option.value_exn (Map.closest_key cdf `Less_or_equal_to u) in if Set.mem indexes i then loop indexes freed else loop (Set.add indexes i) (freed + entries.(i).size) diff --git a/plugins/cache/bap_cache_main.ml b/plugins/cache/bap_cache_main.ml index 9345a61a3..7a341fd5a 100644 --- a/plugins/cache/bap_cache_main.ml +++ b/plugins/cache/bap_cache_main.ml @@ -7,7 +7,7 @@ open Bap_main include Self() -module Filename = Caml.Filename +module Filename = Stdlib.Filename module Cache = Bap_cache module Utils = Bap_cache_utils module GC = Bap_cache_gc diff --git a/plugins/cache/bap_cache_utils.ml b/plugins/cache/bap_cache_utils.ml index 49be733fe..05428bd97 100644 --- a/plugins/cache/bap_cache_utils.ml +++ b/plugins/cache/bap_cache_utils.ml @@ -1,8 +1,8 @@ open Core_kernel[@@warning "-D"] open Regular.Std -module Filename = Caml.Filename -module Sys = Caml.Sys +module Filename = Stdlib.Filename +module Sys = Stdlib.Sys module Unix = Caml_unix let ( / ) = Filename.concat diff --git a/plugins/dependencies/dependencies_main.ml b/plugins/dependencies/dependencies_main.ml index cd7a69d8f..16fb794ef 100644 --- a/plugins/dependencies/dependencies_main.ml +++ b/plugins/dependencies/dependencies_main.ml @@ -58,7 +58,7 @@ open Core_kernel[@@warning "-D"] open Bap.Std open Regular.Std open Bap_main -module Sys = Caml.Sys +module Sys = Stdlib.Sys include Loggers() diff --git a/plugins/disassemble/disassemble_main.ml b/plugins/disassemble/disassemble_main.ml index 1e02a9ecd..d6a6d5a54 100644 --- a/plugins/disassemble/disassemble_main.ml +++ b/plugins/disassemble/disassemble_main.ml @@ -91,7 +91,7 @@ open Monads.Std open Format open Bap_plugins.Std -module Sys = Caml.Sys +module Sys = Stdlib.Sys include Self() open Bap_main @@ -323,8 +323,8 @@ let rw_file = Extension.Type.define ~name:"" ~print:Fn.id ~parse:Fn.id ~digest:(fun path -> if Sys.file_exists path - then Caml.Digest.file path - else Caml.Digest.string "empty") + then Stdlib.Digest.file path + else Stdlib.Digest.string "empty") "" let update = @@ -383,8 +383,8 @@ let target = let t = Extension.Type.define Theory.Target.unknown ~name:"NAME" ~digest:(fun t -> - let r = Caml.Digest.string@@Theory.Target.to_string t in - Format.eprintf "target digest = %s@\n" (Caml.Digest.to_hex r); + let r = Stdlib.Digest.string@@Theory.Target.to_string t in + Format.eprintf "target digest = %s@\n" (Stdlib.Digest.to_hex r); r) ~parse:(fun s -> match Theory.Target.lookup ~package:"bap" s with | Some t -> t @@ -458,9 +458,9 @@ module Dump_formats = struct end let setup_gc () = - let opts = Caml.Gc.get () in + let opts = Stdlib.Gc.get () in info "Setting GC parameters"; - Caml.Gc.set { + Stdlib.Gc.set { opts with minor_heap_size = 2 * 1024 * 1024; major_heap_increment = 64 * 1024 * 1024; @@ -499,7 +499,7 @@ let create_and_process input libraries outputs passes loader target update Fn.non Filename.is_implicit loader in let package = input in let digest = - let file = Caml.Digest.file in + let file = Stdlib.Digest.file in let config = Extension.Configuration.digest ctxt in let input = file input in let libraries = List.map libraries ~f:file in diff --git a/plugins/emit_ida_script/emit_ida_script_main.ml b/plugins/emit_ida_script/emit_ida_script_main.ml index 5ce3a35f3..2c3c56716 100644 --- a/plugins/emit_ida_script/emit_ida_script_main.ml +++ b/plugins/emit_ida_script/emit_ida_script_main.ml @@ -3,7 +3,7 @@ open Bap.Std open Format include Self() -module Buffer = Caml.Buffer +module Buffer = Stdlib.Buffer (** ida uses a strange color coding, bgr, IIRC *) let idacode_of_color = function diff --git a/plugins/ida/bap_ida_info.ml b/plugins/ida/bap_ida_info.ml index 0768e156d..a37e37752 100644 --- a/plugins/ida/bap_ida_info.ml +++ b/plugins/ida/bap_ida_info.ml @@ -2,7 +2,7 @@ open Core_kernel[@@warning "-D"] open Bap.Std include Self() -module Sys = Caml.Sys +module Sys = Stdlib.Sys type version = Vold | Vnew [@@deriving sexp, equal] diff --git a/plugins/ida/bap_ida_service.ml b/plugins/ida/bap_ida_service.ml index ea771b2fa..3ab321d17 100644 --- a/plugins/ida/bap_ida_service.ml +++ b/plugins/ida/bap_ida_service.ml @@ -4,10 +4,10 @@ open Bap.Std include Self () -module Buffer = Caml.Buffer -module Filename = Caml.Filename +module Buffer = Stdlib.Buffer +module Filename = Stdlib.Filename module Unix = Caml_unix -module Sys = Caml.Sys +module Sys = Stdlib.Sys module Info = Bap_ida_info @@ -63,7 +63,7 @@ let setup_headless_env path = let old_path,new_path = try Unix.getenv var, lib ^ ":" ^ Unix.getenv var - with Caml.Not_found -> "", lib in + with Stdlib.Not_found -> "", lib in Unix.putenv var new_path; fun () -> try diff --git a/plugins/ida/ida_main.ml b/plugins/ida/ida_main.ml index 598db1c50..286de573c 100644 --- a/plugins/ida/ida_main.ml +++ b/plugins/ida/ida_main.ml @@ -25,7 +25,7 @@ module type Target = sig val provide : Knowledge.agent -> t -> unit end -let digest = Caml.Digest.file +let digest = Stdlib.Digest.file let request = sprintf " @@ -179,7 +179,7 @@ end = struct List.fold flows ~init:[] ~f:(fun acc addr -> (Some !addr, `Jump)::acc) in let helper tab (addr,_normal_flow,other_flows) = - Addr.Table.add_exn tab ~key:!addr + Hashtbl.add_exn tab ~key:!addr ~data:(other_flows_to_dests other_flows); tab in @@ -189,7 +189,7 @@ end = struct let resolve t mem _ = match - Addr.Table.find t (Memory.min_addr mem) + Hashtbl.find t (Memory.min_addr mem) with | Some dests -> dests | None -> [] diff --git a/plugins/mips/mips.ml b/plugins/mips/mips.ml index f0eba4da5..bcd0475dc 100644 --- a/plugins/mips/mips.ml +++ b/plugins/mips/mips.ml @@ -63,7 +63,7 @@ module Std = struct sprintf "instruction %s doesn't have an operand with index %d" insn_name n in Error (Error.of_string str) in - match String.Table.find lifters (Insn.name insn) with + match Hashtbl.find lifters (Insn.name insn) with | None -> Ok [] | Some lifter -> lift lifter diff --git a/plugins/mips/mips_cpu.ml b/plugins/mips/mips_cpu.ml index eb4c81e45..c6c94e316 100644 --- a/plugins/mips/mips_cpu.ml +++ b/plugins/mips/mips_cpu.ml @@ -17,7 +17,7 @@ let find m reg = let (module M : MIPS) = m in let open M in let open E in - let find_reg regs reg = String.Map.find regs (Reg.name reg) in + let find_reg regs reg = Map.find regs (Reg.name reg) in let find_gpr = find_reg gpr in let find_fpr = find_reg fpr in let reg_searches = [find_gpr; find_fpr] in @@ -47,7 +47,7 @@ let make_cpu addr_size endian memory = | `r64 -> jmp e in let find name regs n = try - Int.Map.find_exn regs n + Map.find_exn regs n with _ -> mips_fail "%s with number %d not found" name n in let gpr n = find "GPR" gpri n in diff --git a/plugins/mips/mips_model.ml b/plugins/mips/mips_model.ml index d4530252a..5f59a0b27 100644 --- a/plugins/mips/mips_model.ml +++ b/plugins/mips/mips_model.ml @@ -37,22 +37,22 @@ let make_regs_list typ prefix size = let reglist_to_map regs = List.fold ~init:String.Map.empty ~f:(fun regs var -> - String.Map.set regs (Var.name var) var) regs + Map.set regs (Var.name var) var) regs let make_regs typ ?alias prefix range = List.fold ~init:String.Map.empty ~f:(fun regs i -> let var = make_var_i typ prefix i in let name = Var.name var in - let regs = String.Map.set regs name var in + let regs = Map.set regs name var in match alias with | None -> regs | Some a -> let name = make_name a i in - String.Map.set regs name var) range + Map.set regs name var) range let make_regs_i typ prefix range = List.fold ~init:Int.Map.empty ~f:(fun regs i -> - Int.Map.set regs i (make_var_i typ prefix i)) range + Map.set regs i (make_var_i typ prefix i)) range let make_reg typ name = Var.create name typ let flag name = Var.create name (Type.imm 1) @@ -180,10 +180,10 @@ module Make_cpu(M : MIPS) : CPU = struct let gpr = let data = Map.data gpr in List.fold data ~init:Var.Set.empty - ~f:(fun regs v -> Var.Set.add regs v) + ~f:(fun regs v -> Set.add regs v) - let sp = Var.Set.find_exn gpr ~f:(fun v -> String.is_prefix ~prefix:"SP" (Var.name v)) - let fp = Var.Set.find_exn gpr ~f:(fun v -> String.is_prefix ~prefix:"FP" (Var.name v)) + let sp = Set.find_exn gpr ~f:(fun v -> String.is_prefix ~prefix:"SP" (Var.name v)) + let fp = Set.find_exn gpr ~f:(fun v -> String.is_prefix ~prefix:"FP" (Var.name v)) (* MIPS doesn't have flags, but structure requires them * We just make a stubs here *) diff --git a/plugins/mips/mips_rtl.ml b/plugins/mips/mips_rtl.ml index dbe667bad..1bf691cd0 100644 --- a/plugins/mips/mips_rtl.ml +++ b/plugins/mips/mips_rtl.ml @@ -195,7 +195,7 @@ module Exp = struct if width = e.width then e else match e.body with - | Vars (v,vars) when Caml.not (List.is_empty vars) -> + | Vars (v,vars) when Stdlib.not (List.is_empty vars) -> extract_of_vars e hi lo (v :: vars) | _ -> { sign=Unsigned; width; body = Extract (hi,lo,e.body) } diff --git a/plugins/patterns/patterns_main.ml b/plugins/patterns/patterns_main.ml index 8406ad09c..08561a267 100644 --- a/plugins/patterns/patterns_main.ml +++ b/plugins/patterns/patterns_main.ml @@ -113,7 +113,7 @@ open Bap_core_theory open Bap.Std open Bap_main open Bap_primus.Std -module Sys = Caml.Sys +module Sys = Stdlib.Sys module Sigma = Primus.Lisp.Semantics module Lambda = Theory.Label @@ -1125,7 +1125,7 @@ end = struct let dedup selected = let empty = Set.empty (module String) in List.fold selected ~init:(empty,empty) ~f:(fun (digests,files) file -> - let digest = Caml.Digest.file file in + let digest = Stdlib.Digest.file file in if Set.mem digests digest || Set.mem files file then digests,files else Set.add digests digest, diff --git a/plugins/phoenix/phoenix_root.ml b/plugins/phoenix/phoenix_root.ml index 02142002b..2f66460d8 100644 --- a/plugins/phoenix/phoenix_root.ml +++ b/plugins/phoenix/phoenix_root.ml @@ -1,6 +1,6 @@ open Core_kernel[@@warning "-D"] -module Sys = Caml.Sys +module Sys = Stdlib.Sys module Unix = Caml_unix exception Target_directory_is_a_file diff --git a/plugins/piqi_printers/dune b/plugins/piqi_printers/dune deleted file mode 100644 index a4f90d49b..000000000 --- a/plugins/piqi_printers/dune +++ /dev/null @@ -1,12 +0,0 @@ -(library - (name bap_piqi_printers_plugin) - (public_name bap-piqi.plugin) - (preprocess (pps ppx_bap)) - (libraries bap-piqi)) - -(plugin - (name piqi_printers) - (package bap-piqi) - (libraries bap-piqi.plugin) - (optional) - (site (bap-common plugins))) diff --git a/plugins/piqi_printers/piqi_printers_main.ml b/plugins/piqi_printers/piqi_printers_main.ml deleted file mode 100644 index e697573ac..000000000 --- a/plugins/piqi_printers/piqi_printers_main.ml +++ /dev/null @@ -1,71 +0,0 @@ -open Core_kernel[@@warning "-D"] -open Regular.Std -open Bap.Std -include Self() - - -let () = Config.manpage [ - `S "DESCRIPTION"; - `P - "Provide a serialization for BIR and BIL, using piqi - serialization files. The plugin provides five formats - of serialization: JSON, protobuf, textual, binary and XML."; - `P - "The serialization routines can be use programmatically, using - the Data interface, or from a print plugin"; - - `S "SEE ALSO"; - `P "$(b,regular)(3), $(b,bap-plugin-print)(1), $(b,bap-piqi)(3)" - ] - -module Bil = struct - open Bil_piqi - open Bir_piqi - - let writer f fmt = - let to_bytes s = f fmt s |> Bytes.of_string in - Data.Write.create ~to_bytes () - - let reader f fmt = - let of_bytes b = f fmt (Bytes.to_string b) in - Data.Read.create ~of_bytes () - - let ver = "0.1" - let desc_of_type = function - | `json -> "JSON" - | `pb -> "protobuf" - | `piq -> "textual" - | `pib -> "binary" - | `xml -> "XML" - let s fmt = - sprintf "Piqi generated %s serializer" (desc_of_type fmt) - - let register () = - List.iter all_of_fmt ~f:(fun fmt -> - let name = Sexp.to_string (sexp_of_fmt fmt) in - let desc = s fmt in - Stmt.add_reader ~desc ~ver name (reader stmt_of_string fmt); - Stmt.add_writer ~desc ~ver name (writer string_of_stmt fmt); - Exp.add_reader ~desc ~ver name (reader exp_of_string fmt); - Exp.add_writer ~desc ~ver name (writer string_of_exp fmt); - Bil.add_reader ~desc ~ver name (reader bil_of_string fmt); - Bil.add_writer ~desc ~ver name (writer string_of_bil fmt); - Sub.add_writer ~desc ~ver name (writer string_of_sub fmt); - Sub.add_reader ~desc ~ver name (reader sub_of_string fmt); - Blk.add_writer ~desc ~ver name (writer string_of_blk fmt); - Blk.add_reader ~desc ~ver name (reader blk_of_string fmt); - Arg.add_writer ~desc ~ver name (writer string_of_arg fmt); - Arg.add_reader ~desc ~ver name (reader arg_of_string fmt); - Phi.add_writer ~desc ~ver name (writer string_of_phi fmt); - Phi.add_reader ~desc ~ver name (reader phi_of_string fmt); - Def.add_writer ~desc ~ver name (writer string_of_def fmt); - Def.add_reader ~desc ~ver name (reader def_of_string fmt); - Program.add_writer ~desc ~ver name (writer string_of_program fmt); - Program.add_reader ~desc ~ver name (reader program_of_string fmt)) - -end - -let () = Config.declare_extension - ~doc:"provides piqi-based serialization for BIL and BIR" - ~provides:["printer"; "serialization"; "xml"; "json"; "protobuf"] - @@ fun _ -> Bil.register () diff --git a/plugins/piqi_printers/piqi_printers_main.mli b/plugins/piqi_printers/piqi_printers_main.mli deleted file mode 100644 index e69de29bb..000000000 diff --git a/plugins/powerpc/powerpc_model.ml b/plugins/powerpc/powerpc_model.ml index 26bd12c2a..48c0a69fd 100644 --- a/plugins/powerpc/powerpc_model.ml +++ b/plugins/powerpc/powerpc_model.ml @@ -156,7 +156,7 @@ module Vars (B : Bitwidth) = struct bits let crn = - Int.Map.fold cri ~init:String.Map.empty + Map.fold cri ~init:String.Map.empty ~f:(fun ~key:_ ~data:var acc -> Map.set acc (Var.name var) var) @@ -211,7 +211,7 @@ module Exps(B : Bitwidth) = struct let cri = Map.map cri ~f:(fun v -> Exp.of_var v) let crn = - Int.Map.fold Vars.cri ~init:String.Map.empty + Map.fold Vars.cri ~init:String.Map.empty ~f:(fun ~key:_ ~data:var acc -> Map.set acc (Var.name var) (Exp.of_var var)) @@ -286,9 +286,9 @@ module Make_cpu(P : PowerPC) : CPU = struct let gpr = let data = Map.data gpr in List.fold data ~init:Var.Set.empty - ~f:(fun regs v -> Var.Set.add regs v) + ~f:(fun regs v -> Set.add regs v) - let sp = Var.Set.find_exn gpr ~f:(fun v -> String.equal (Var.name v) "R1") + let sp = Set.find_exn gpr ~f:(fun v -> String.equal (Var.name v) "R1") let vf = ov let cf = ca let nf = Map.find_exn cri 0 diff --git a/plugins/powerpc/powerpc_rtl.ml b/plugins/powerpc/powerpc_rtl.ml index cafa6645b..021cfb933 100644 --- a/plugins/powerpc/powerpc_rtl.ml +++ b/plugins/powerpc/powerpc_rtl.ml @@ -222,7 +222,7 @@ module Exp = struct if width = e.width then { e with sign=Unsigned; } else match e.body with - | Vars (v,vars) when Caml.not (List.is_empty vars) -> + | Vars (v,vars) when Stdlib.not (List.is_empty vars) -> extract_of_vars e hi lo (v :: vars) | _ -> { sign=Unsigned; width; body = Extract (hi,lo,e.body) } diff --git a/plugins/primus_dictionary/primus_dictionary_main.ml b/plugins/primus_dictionary/primus_dictionary_main.ml index b026e0017..aee53d727 100644 --- a/plugins/primus_dictionary/primus_dictionary_main.ml +++ b/plugins/primus_dictionary/primus_dictionary_main.ml @@ -12,7 +12,7 @@ type t = { } let pair key data = {dict = Primus.Value.Map.singleton key data} -let add key data s = {dict = Primus.Value.Map.set s.dict ~key ~data} +let add key data s = {dict = Map.set s.dict ~key ~data} (* idea: initialize the dictionary with initial properties of a project and terms. diff --git a/plugins/primus_lisp/primus_lisp_ieee754.ml b/plugins/primus_lisp/primus_lisp_ieee754.ml index b07bf4475..724a6a361 100644 --- a/plugins/primus_lisp/primus_lisp_ieee754.ml +++ b/plugins/primus_lisp/primus_lisp_ieee754.ml @@ -104,7 +104,7 @@ module Primitives(Machine : Primus.Machine.S) = struct let is_nan x = Float.Class.(compare Nan (Float.classify x) = 0) - let init () = Machine.sequence Caml.[ + let init () = Machine.sequence Stdlib.[ define inf "add" ( +. ); define inf "sub" ( -. ); define inf "div" ( /. ); diff --git a/plugins/primus_lisp/primus_lisp_main.ml b/plugins/primus_lisp/primus_lisp_main.ml index 10c29b372..c69c2c4a2 100644 --- a/plugins/primus_lisp/primus_lisp_main.ml +++ b/plugins/primus_lisp/primus_lisp_main.ml @@ -4,7 +4,7 @@ open Bap.Std open Monads.Std open Bap_primus.Std open Format -module Sys = Caml.Sys +module Sys = Stdlib.Sys include Self() module Primitives = Primus_lisp_primitives diff --git a/plugins/primus_systems/primus_systems_main.ml b/plugins/primus_systems/primus_systems_main.ml index 0a155e6c6..6574aca2a 100644 --- a/plugins/primus_systems/primus_systems_main.ml +++ b/plugins/primus_systems/primus_systems_main.ml @@ -45,7 +45,7 @@ open Core_kernel[@@warning "-D"] open Bap_main open Bap_primus.Std open Format -module Sys = Caml.Sys +module Sys = Stdlib.Sys let command what = sprintf " diff --git a/plugins/print/print_main.ml b/plugins/print/print_main.ml index 59b3c0884..50099c0f8 100644 --- a/plugins/print/print_main.ml +++ b/plugins/print/print_main.ml @@ -529,9 +529,7 @@ let () = `S "DESCRIPTION"; `P "Provides various formats for dumping the project data structure."; `S "SEE ALSO"; - `P - "$(b,bap-plugin-phoenix)(1), $(b,bap-plugin-piqi-printers)(1), - $(b,bap-plugin-dump-symbols)(1)" + `P "$(b,bap-plugin-phoenix)(1), $(b,bap-plugin-dump-symbols)(1)" ] in let demangle : string option Config.param = diff --git a/plugins/raw/raw_main.ml b/plugins/raw/raw_main.ml index aba396903..1875a4bdf 100644 --- a/plugins/raw/raw_main.ml +++ b/plugins/raw/raw_main.ml @@ -12,7 +12,7 @@ open Bap_main open Core_kernel[@@warning "-D"] open Extension.Syntax -module Buffer = Caml.Buffer +module Buffer = Stdlib.Buffer module Unix = Caml_unix module Spec = struct diff --git a/plugins/read_symbols/read_symbols_main.ml b/plugins/read_symbols/read_symbols_main.ml index 6ebd46a7f..6a72cf766 100644 --- a/plugins/read_symbols/read_symbols_main.ml +++ b/plugins/read_symbols/read_symbols_main.ml @@ -88,7 +88,7 @@ open Core_kernel[@@warning "-D"] open Bap_main open Bap_core_theory open KB.Syntax -module Sys = Caml.Sys +module Sys = Stdlib.Sys include Bap_main.Loggers() let anonymous_prefix = "__anonymous_sub%" diff --git a/plugins/stub_resolver/stub_resolver_main.ml b/plugins/stub_resolver/stub_resolver_main.ml index d6a864bf0..de1f89104 100644 --- a/plugins/stub_resolver/stub_resolver_main.ml +++ b/plugins/stub_resolver/stub_resolver_main.ml @@ -43,7 +43,7 @@ open Bap_core_theory open Bap_knowledge open Bap_main open KB.Syntax -module Sys = Caml.Sys +module Sys = Stdlib.Sys include Loggers() diff --git a/plugins/thumb/thumb_branch.ml b/plugins/thumb/thumb_branch.ml index 16e933928..080c9fe37 100644 --- a/plugins/thumb/thumb_branch.ml +++ b/plugins/thumb/thumb_branch.ml @@ -4,7 +4,7 @@ open KB.Syntax open Thumb_core -type eff = unit Theory.effect KB.t +type eff = unit Theory.effect_ KB.t let mask = W32.int32 0xffff_fffel diff --git a/plugins/thumb/thumb_branch.mli b/plugins/thumb/thumb_branch.mli index 932210e79..98506f250 100644 --- a/plugins/thumb/thumb_branch.mli +++ b/plugins/thumb/thumb_branch.mli @@ -3,7 +3,7 @@ open Theory open Thumb_core open Thumb_opcodes -type eff = unit effect KB.t +type eff = unit effect_ KB.t module Make(CT : Theory.Core) : sig (** [b