From 85e6f3ffac828b007a9fe431da58e97c7e224110 Mon Sep 17 00:00:00 2001 From: PerfectLaugh Date: Thu, 10 Apr 2025 04:39:04 +0800 Subject: [PATCH 1/2] make compatible to ocaml 5 This commit includes pinning to OCaml-5 compatible typerep (Currently it is broken due to getting reverted), renaming variables and types that using `effect` to `effect_` and janestreet packages update remove warnings in release mode: mainly label-missings --- bap-abi.opam | 2 +- bap-analyze.opam | 2 +- bap-api.opam | 2 +- bap-arm.opam | 2 +- bap-beagle-strings.opam | 2 +- bap-beagle.opam | 2 +- bap-bil.opam | 2 +- bap-bml.opam | 2 +- bap-build.opam | 2 +- bap-bundle.opam | 3 +- bap-byteweight-frontend.opam | 2 +- bap-byteweight.opam | 2 +- bap-c.opam | 2 +- bap-cache.opam | 2 +- bap-callgraph-collator.opam | 2 +- bap-callsites.opam | 2 +- bap-common.opam | 6 +- bap-constant-tracker.opam | 2 +- bap-core-theory.opam | 2 +- bap-cxxfilt.opam | 2 +- bap-demangle.opam | 2 +- bap-dependencies.opam | 2 +- bap-disassemble.opam | 2 +- bap-dump-symbols.opam | 2 +- bap-dwarf.opam | 2 +- bap-elementary.opam | 2 +- bap-elf.opam | 2 +- bap-flatten.opam | 2 +- bap-frontc.opam | 2 +- bap-frontend.opam | 2 +- bap-future.opam | 2 +- bap-ghidra.opam | 2 +- bap-glibc-runtime.opam | 2 +- bap-ida-plugin.opam | 2 +- bap-ida.opam | 2 +- bap-knowledge.opam | 3 +- bap-llvm.opam | 4 +- bap-llvm.opam.template | 1 - bap-main.opam | 5 +- bap-mc.opam | 2 +- bap-microx.opam | 2 +- bap-mips.opam | 2 +- bap-objdump.opam | 2 +- bap-optimization.opam | 2 +- bap-patterns.opam | 2 +- bap-phoenix.opam | 2 +- bap-piqi.opam | 35 --- bap-plugins.opam | 2 +- bap-powerpc.opam | 2 +- bap-primus-dictionary.opam | 2 +- bap-primus-exploring-scheduler.opam | 2 +- bap-primus-greedy-scheduler.opam | 2 +- bap-primus-limit.opam | 2 +- bap-primus-lisp.opam | 2 +- bap-primus-loader.opam | 2 +- bap-primus-mark-visited.opam | 2 +- bap-primus-powerpc.opam | 2 +- bap-primus-print.opam | 2 +- bap-primus-promiscuous.opam | 2 +- bap-primus-propagate-taint.opam | 2 +- bap-primus-random.opam | 2 +- bap-primus-region.opam | 2 +- bap-primus-round-robin-scheduler.opam | 2 +- bap-primus-symbolic-executor.opam | 4 +- bap-primus-systems.opam | 2 +- bap-primus-taint.opam | 2 +- bap-primus-test.opam | 2 +- bap-primus-track-visited.opam | 2 +- bap-primus-wandering-scheduler.opam | 2 +- bap-primus-x86.opam | 2 +- bap-primus.opam | 4 +- bap-print.opam | 2 +- bap-radare2.opam | 2 +- bap-raw.opam | 2 +- bap-recipe-command.opam | 2 +- bap-recipe.opam | 4 +- bap-relocatable.opam | 2 +- bap-report.opam | 2 +- bap-riscv.opam | 2 +- bap-run.opam | 2 +- bap-specification.opam | 2 +- bap-ssa.opam | 2 +- bap-std.opam | 2 +- bap-strings.opam | 2 +- bap-stub-resolver.opam | 2 +- bap-symbol-reader.opam | 2 +- bap-systemz.opam | 2 +- bap-taint-propagator.opam | 2 +- bap-taint.opam | 2 +- bap-term-mapper.opam | 2 +- bap-thumb.opam | 2 +- bap-toplevel.opam | 2 +- bap-trace.opam | 2 +- bap-traces.opam | 2 +- bap-trivial-condition-form.opam | 2 +- bap-warn-unused.opam | 2 +- bap-x86.opam | 2 +- bare.opam | 4 +- bitvec-binprot.opam | 2 +- dune-project | 286 +++++++++--------- graphlib.opam | 2 +- lib/arm/arm_bit.ml | 10 +- lib/arm/arm_bit.mli | 2 +- lib/arm/arm_branch.ml | 2 +- lib/arm/arm_branch.mli | 2 +- lib/arm/arm_cond.ml | 2 +- lib/arm/arm_cond.mli | 2 +- lib/arm/arm_env.ml | 2 +- lib/arm/arm_env.mli | 2 +- lib/arm/arm_flags.ml | 2 +- lib/arm/arm_flags.mli | 2 +- lib/arm/arm_helpers.ml | 2 +- lib/arm/arm_helpers.mli | 2 +- lib/arm/arm_insn.ml | 2 +- lib/arm/arm_lifter.ml | 30 +- lib/arm/arm_mem.ml | 10 +- lib/arm/arm_mem.mli | 2 +- lib/arm/arm_mem_shift.ml | 2 +- lib/arm/arm_mem_shift.mli | 2 +- lib/arm/arm_mov.ml | 4 +- lib/arm/arm_mov.mli | 2 +- lib/arm/arm_mul.ml | 14 +- lib/arm/arm_mul.mli | 2 +- lib/arm/arm_op.ml | 2 +- lib/arm/arm_reg.ml | 2 +- lib/arm/arm_shift.ml | 8 +- lib/arm/arm_shift.mli | 2 +- lib/arm/arm_target.ml | 6 +- lib/arm/arm_types.ml | 2 +- lib/arm/arm_utils.ml | 2 +- lib/arm/arm_utils.mli | 2 +- lib/arm/dune | 2 +- lib/bap/bap.ml | 2 +- lib/bap/bap.mli | 8 +- lib/bap/bap_init_toplevel.ml | 8 +- lib/bap/bap_project.ml | 8 +- lib/bap/bap_project.mli | 2 +- lib/bap/bap_self.ml | 10 +- lib/bap/bap_self.mli | 2 +- lib/bap/dune | 3 +- lib/bap_abi/bap_abi.ml | 2 +- lib/bap_abi/dune | 2 +- lib/bap_api/bap_api.ml | 2 +- lib/bap_api/bap_api.mli | 2 +- lib/bap_api/dune | 2 +- lib/bap_bml/bap_bml.ml | 2 +- lib/bap_bml/bap_bml.mli | 2 +- lib/bap_bml/dune | 2 +- lib/bap_build/bap_build.ml | 2 +- lib/bap_bundle/bap_bundle.ml | 12 +- lib/bap_bundle/bap_bundle.mli | 2 +- lib/bap_bundle/dune | 2 +- lib/bap_byteweight/bap_byteweight.ml | 6 +- .../bap_byteweight_signatures.ml | 12 +- .../bap_byteweight_signatures.mli | 2 +- lib/bap_byteweight/dune | 2 +- lib/bap_c/bap_c_abi.ml | 18 +- lib/bap_c/bap_c_abi.mli | 2 +- lib/bap_c/bap_c_attr.ml | 2 +- lib/bap_c/bap_c_data.ml | 2 +- lib/bap_c/bap_c_data.mli | 2 +- lib/bap_c/bap_c_parser.ml | 2 +- lib/bap_c/bap_c_parser.mli | 2 +- lib/bap_c/bap_c_size.ml | 3 +- lib/bap_c/bap_c_size.mli | 3 +- lib/bap_c/bap_c_term_attributes.ml | 2 +- lib/bap_c/bap_c_type.ml | 2 +- lib/bap_c/bap_c_type.mli | 2 +- lib/bap_c/bap_c_type_mapper.ml | 2 +- lib/bap_c/bap_c_type_mapper.mli | 2 +- lib/bap_c/dune | 2 +- lib/bap_core_theory/bap_core_theory.ml | 4 +- lib/bap_core_theory/bap_core_theory.mli | 10 +- .../bap_core_theory_IEEE754.ml | 2 +- lib/bap_core_theory/bap_core_theory_basic.ml | 2 +- .../bap_core_theory_definition.ml | 4 +- lib/bap_core_theory/bap_core_theory_effect.ml | 2 +- .../bap_core_theory_manager.ml | 10 +- lib/bap_core_theory/bap_core_theory_parser.ml | 2 +- lib/bap_core_theory/bap_core_theory_pass.ml | 6 +- lib/bap_core_theory/bap_core_theory_pass.mli | 2 +- .../bap_core_theory_program.ml | 2 +- .../bap_core_theory_program.mli | 2 +- lib/bap_core_theory/bap_core_theory_target.ml | 10 +- .../bap_core_theory_target.mli | 2 +- lib/bap_core_theory/bap_core_theory_value.ml | 9 +- lib/bap_core_theory/bap_core_theory_value.mli | 4 +- lib/bap_core_theory/bap_core_theory_var.ml | 4 +- lib/bap_core_theory/bap_core_theory_var.mli | 2 +- lib/bap_core_theory/dune | 4 +- lib/bap_demangle/bap_demangle.ml | 6 +- lib/bap_demangle/bap_demangle.mli | 2 +- lib/bap_demangle/dune | 2 +- lib/bap_disasm/bap_disasm.ml | 2 +- lib/bap_disasm/bap_disasm.mli | 2 +- lib/bap_disasm/bap_disasm_backend_types.ml | 2 +- lib/bap_disasm/bap_disasm_basic.ml | 20 +- lib/bap_disasm/bap_disasm_basic.mli | 2 +- lib/bap_disasm/bap_disasm_block.ml | 2 +- lib/bap_disasm/bap_disasm_block.mli | 2 +- lib/bap_disasm/bap_disasm_brancher.ml | 2 +- lib/bap_disasm/bap_disasm_calls.ml | 6 +- lib/bap_disasm/bap_disasm_calls.mli | 2 +- lib/bap_disasm/bap_disasm_driver.ml | 14 +- lib/bap_disasm/bap_disasm_driver.mli | 2 +- lib/bap_disasm/bap_disasm_insn.ml | 30 +- lib/bap_disasm/bap_disasm_insn.mli | 2 +- lib/bap_disasm/bap_disasm_linear_sweep.ml | 2 +- lib/bap_disasm/bap_disasm_linear_sweep.mli | 2 +- lib/bap_disasm/bap_disasm_prim.ml | 2 +- lib/bap_disasm/bap_disasm_rec.ml | 2 +- lib/bap_disasm/bap_disasm_rec.mli | 2 +- lib/bap_disasm/bap_disasm_reconstructor.ml | 2 +- lib/bap_disasm/bap_disasm_reconstructor.mli | 2 +- lib/bap_disasm/bap_disasm_rooter.ml | 4 +- lib/bap_disasm/bap_disasm_source.ml | 2 +- lib/bap_disasm/bap_disasm_source.mli | 2 +- lib/bap_disasm/bap_disasm_source_factory.ml | 2 +- lib/bap_disasm/bap_disasm_source_factory.mli | 2 +- lib/bap_disasm/bap_disasm_source_intf.ml | 2 +- lib/bap_disasm/bap_disasm_std.ml | 2 +- lib/bap_disasm/bap_disasm_symbolizer.ml | 8 +- lib/bap_disasm/bap_disasm_symtab.ml | 8 +- lib/bap_disasm/bap_disasm_symtab.mli | 2 +- lib/bap_disasm/bap_disasm_target_factory.ml | 2 +- lib/bap_disasm/bap_disasm_target_intf.ml | 2 +- lib/bap_disasm/bap_disasm_types.ml | 2 +- lib/bap_disasm/bap_insn_aliasing.ml | 2 +- lib/bap_disasm/dune | 2 +- lib/bap_dwarf/bap_dwarf.mli | 2 +- lib/bap_dwarf/dune | 2 +- lib/bap_dwarf/dwarf_data.ml | 4 +- lib/bap_dwarf/dwarf_data.mli | 2 +- lib/bap_dwarf/dwarf_fbi.ml | 26 +- lib/bap_dwarf/dwarf_fbi.mli | 2 +- lib/bap_dwarf/dwarf_input.ml | 2 +- lib/bap_dwarf/dwarf_input.mli | 2 +- lib/bap_dwarf/dwarf_leb128.ml | 22 +- lib/bap_dwarf/dwarf_leb128.mli | 2 +- lib/bap_dwarf/dwarf_types.ml | 2 +- lib/bap_elementary/bap_elementary.ml | 2 +- lib/bap_elementary/bap_elementary.mli | 2 +- lib/bap_elementary/dune | 2 +- lib/bap_elf/bap_elf.mli | 2 +- lib/bap_elf/dune | 2 +- lib/bap_elf/elf_internal_utils.ml | 2 +- lib/bap_elf/elf_internal_utils.mli | 2 +- lib/bap_elf/elf_parse.ml | 16 +- lib/bap_elf/elf_parse.mli | 2 +- lib/bap_elf/elf_types.ml | 2 +- lib/bap_elf/elf_utils.ml | 2 +- lib/bap_elf/elf_utils.mli | 2 +- lib/bap_future/bap_future.ml | 2 +- lib/bap_future/bap_future.mli | 2 +- lib/bap_future/dune | 2 +- lib/bap_ghidra/dune | 2 +- lib/bap_ida/bap_ida.ml | 2 +- lib/bap_ida/dune | 2 +- lib/bap_image/bap_fileutils.ml | 4 +- lib/bap_image/bap_fileutils.mli | 2 +- lib/bap_image/bap_image.ml | 8 +- lib/bap_image/bap_image.mli | 2 +- lib/bap_image/bap_memmap.ml | 2 +- lib/bap_image/bap_memmap.mli | 2 +- lib/bap_image/bap_memory.ml | 8 +- lib/bap_image/bap_memory.mli | 2 +- lib/bap_image/bap_table.ml | 16 +- lib/bap_image/bap_table.mli | 2 +- lib/bap_image/dune | 6 +- lib/bap_image/image_backend.ml | 2 +- lib/bap_image/image_common.ml | 2 +- lib/bap_image/image_internal_std.ml | 2 +- lib/bap_language/bap_language.ml | 2 +- lib/bap_language/bap_language.mli | 2 +- lib/bap_llvm/bap_llvm.ml | 4 +- lib/bap_llvm/bap_llvm.mli | 2 +- lib/bap_llvm/bap_llvm_disasm.ml | 2 +- lib/bap_llvm/bap_llvm_disasm.mli | 2 +- lib/bap_llvm/bap_llvm_loader.ml | 14 +- lib/bap_llvm/bap_llvm_loader.mli | 2 +- lib/bap_llvm/config/llvm_config.ml.ab | 2 +- lib/bap_llvm/config/llvm_configurator.ml | 8 +- lib/bap_llvm/dune | 3 +- lib/bap_main/bap_main.ml | 32 +- lib/bap_main/bap_main.mli | 8 +- lib/bap_main/bap_main_event.ml | 12 +- lib/bap_main/bap_main_log.ml | 8 +- lib/bap_main/dune | 2 +- lib/bap_mips/bap_mips_target.ml | 2 +- lib/bap_mips/dune | 2 +- lib/bap_piqi/bil_piqi.ml | 2 +- lib/bap_piqi/bir_piqi.ml | 2 +- lib/bap_piqi/dune | 27 -- lib/bap_piqi/test/run_piqi_tests.ml | 2 +- lib/bap_plugins/bap_common.ml | 4 +- lib/bap_plugins/bap_common.ml.ab | 4 +- lib/bap_plugins/bap_plugins.ml | 10 +- lib/bap_plugins/bap_plugins.mli | 2 +- lib/bap_plugins/bap_plugins_units.ml | 16 +- lib/bap_plugins/bap_plugins_units_intf.ml | 2 +- lib/bap_plugins/dune | 2 +- lib/bap_powerpc/bap_powerpc_target.ml | 2 +- lib/bap_powerpc/dune | 2 +- lib/bap_primus/bap_primus.mli | 8 +- lib/bap_primus/bap_primus_env.ml | 2 +- lib/bap_primus/bap_primus_exn.ml | 6 +- lib/bap_primus/bap_primus_generator.ml | 8 +- lib/bap_primus/bap_primus_info.ml | 2 +- lib/bap_primus/bap_primus_interpreter.ml | 6 +- lib/bap_primus/bap_primus_interpreter.mli | 2 +- lib/bap_primus/bap_primus_iterator.ml | 2 +- lib/bap_primus/bap_primus_iterator.mli | 2 +- lib/bap_primus/bap_primus_linker.ml | 2 +- lib/bap_primus/bap_primus_linker.mli | 2 +- lib/bap_primus/bap_primus_lisp.ml | 6 +- lib/bap_primus/bap_primus_lisp.mli | 2 +- lib/bap_primus/bap_primus_lisp_attribute.ml | 6 +- lib/bap_primus/bap_primus_lisp_attributes.ml | 2 +- lib/bap_primus/bap_primus_lisp_attributes.mli | 2 +- lib/bap_primus/bap_primus_lisp_context.ml | 4 +- lib/bap_primus/bap_primus_lisp_context.mli | 2 +- lib/bap_primus/bap_primus_lisp_def.ml | 2 +- lib/bap_primus/bap_primus_lisp_index.ml | 2 +- lib/bap_primus/bap_primus_lisp_index.mli | 2 +- lib/bap_primus/bap_primus_lisp_loc.ml | 6 +- lib/bap_primus/bap_primus_lisp_loc.mli | 2 +- lib/bap_primus/bap_primus_lisp_parse.ml | 6 +- lib/bap_primus/bap_primus_lisp_program.ml | 34 +-- lib/bap_primus/bap_primus_lisp_resolve.ml | 2 +- lib/bap_primus/bap_primus_lisp_semantics.ml | 20 +- lib/bap_primus/bap_primus_lisp_semantics.mli | 2 +- lib/bap_primus/bap_primus_lisp_source.ml | 2 +- lib/bap_primus/bap_primus_lisp_type.ml | 2 +- lib/bap_primus/bap_primus_lisp_type.mli | 2 +- lib/bap_primus/bap_primus_lisp_types.ml | 2 +- lib/bap_primus/bap_primus_lisp_var.ml | 2 +- lib/bap_primus/bap_primus_lisp_var.mli | 2 +- lib/bap_primus/bap_primus_lisp_word.ml | 2 +- lib/bap_primus/bap_primus_lisp_word.mli | 2 +- lib/bap_primus/bap_primus_machine.ml | 10 +- lib/bap_primus/bap_primus_machine.mli | 2 +- lib/bap_primus/bap_primus_main.ml | 2 +- lib/bap_primus/bap_primus_memory.ml | 10 +- lib/bap_primus/bap_primus_memory.mli | 2 +- lib/bap_primus/bap_primus_observation.ml | 6 +- lib/bap_primus/bap_primus_observation.mli | 2 +- lib/bap_primus/bap_primus_pos.ml | 2 +- lib/bap_primus/bap_primus_pos.mli | 2 +- lib/bap_primus/bap_primus_random.ml | 4 +- lib/bap_primus/bap_primus_sexp.ml | 2 +- lib/bap_primus/bap_primus_state.ml | 4 +- lib/bap_primus/bap_primus_state.mli | 2 +- lib/bap_primus/bap_primus_system.ml | 8 +- lib/bap_primus/bap_primus_types.ml | 6 +- lib/bap_primus/bap_primus_value.ml | 2 +- lib/bap_primus/bap_primus_value.mli | 2 +- lib/bap_primus/dune | 2 +- lib/bap_primus_machine/bap_primus_machine.ml | 6 +- lib/bap_primus_machine/bap_primus_machine.mli | 2 +- .../bap_primus_track_visited.ml | 2 +- lib/bap_primus_track_visited/dune | 2 +- lib/bap_recipe/bap_recipe.ml | 4 +- lib/bap_riscv/bap_riscv_target.ml | 2 +- lib/bap_riscv/dune | 2 +- lib/bap_sema/bap_sema.ml | 2 +- lib/bap_sema/bap_sema_flatten.ml | 2 +- lib/bap_sema/bap_sema_free_vars.ml | 4 +- lib/bap_sema/bap_sema_lift.ml | 2 +- lib/bap_sema/bap_sema_lift.mli | 2 +- lib/bap_sema/bap_sema_ssa.ml | 6 +- lib/bap_sema/bap_sema_taint.ml | 6 +- lib/bap_sema/dune | 2 +- lib/bap_strings/bap_strings_detector.ml | 6 +- lib/bap_strings/bap_strings_detector.mli | 2 +- lib/bap_strings/bap_strings_index.ml | 2 +- lib/bap_strings/bap_strings_scanner.ml | 6 +- lib/bap_strings/bap_strings_scanner.mli | 2 +- lib/bap_strings/bap_strings_unscrambler.ml | 2 +- lib/bap_strings/bap_strings_unscrambler.mli | 2 +- lib/bap_strings/dune | 2 +- lib/bap_systemz/bap_systemz_target.ml | 2 +- lib/bap_systemz/dune | 2 +- lib/bap_taint/bap_taint.ml | 2 +- lib/bap_taint/bap_taint.mli | 2 +- lib/bap_taint/dune | 2 +- lib/bap_traces/bap_trace.ml | 12 +- lib/bap_traces/bap_trace.mli | 2 +- lib/bap_traces/bap_trace_binprot.ml | 2 +- lib/bap_traces/bap_trace_event_types.ml | 2 +- lib/bap_traces/bap_trace_events.ml | 2 +- lib/bap_traces/bap_trace_id.ml | 13 +- lib/bap_traces/bap_trace_id.mli | 2 +- lib/bap_traces/bap_trace_meta.ml | 8 +- lib/bap_traces/bap_trace_meta_types.ml | 2 +- lib/bap_traces/bap_trace_traces.ml | 2 +- lib/bap_traces/bap_trace_traces.mli | 2 +- lib/bap_traces/bap_traces.mli | 2 +- lib/bap_traces/dune | 3 +- lib/bap_types/bap_addr.ml | 2 +- lib/bap_types/bap_addr.mli | 2 +- lib/bap_types/bap_arch.ml | 2 +- lib/bap_types/bap_arch.mli | 2 +- lib/bap_types/bap_attributes.ml | 2 +- lib/bap_types/bap_bil.ml | 2 +- lib/bap_types/bap_bil_adt.ml | 2 +- lib/bap_types/bap_bil_adt.mli | 2 +- lib/bap_types/bap_bil_optimizations.ml | 12 +- lib/bap_types/bap_bil_pass.ml | 4 +- lib/bap_types/bap_bili.ml | 6 +- lib/bap_types/bap_biri.ml | 2 +- lib/bap_types/bap_biri.mli | 2 +- lib/bap_types/bap_bitvector.ml | 15 +- lib/bap_types/bap_bitvector.mli | 2 +- lib/bap_types/bap_common_types.ml | 2 +- lib/bap_types/bap_context.ml | 2 +- lib/bap_types/bap_context.mli | 2 +- lib/bap_types/bap_core_theory_bil_parser.ml | 2 +- lib/bap_types/bap_eval.ml | 4 +- lib/bap_types/bap_eval_types.ml | 2 +- lib/bap_types/bap_exp.ml | 2 +- lib/bap_types/bap_exp.mli | 2 +- lib/bap_types/bap_expi.ml | 2 +- lib/bap_types/bap_expi.mli | 2 +- lib/bap_types/bap_expi_types.ml | 2 +- lib/bap_types/bap_helpers.ml | 8 +- lib/bap_types/bap_helpers.mli | 2 +- lib/bap_types/bap_int_conversions.ml | 2 +- lib/bap_types/bap_int_conversions.mli | 2 +- lib/bap_types/bap_integer.ml | 2 +- lib/bap_types/bap_interval_tree.ml | 4 +- lib/bap_types/bap_interval_tree.mli | 2 +- lib/bap_types/bap_ir.ml | 14 +- lib/bap_types/bap_ir.mli | 2 +- lib/bap_types/bap_ir_callgraph.ml | 2 +- lib/bap_types/bap_ir_graph.ml | 10 +- lib/bap_types/bap_ir_graph.mli | 2 +- lib/bap_types/bap_monad.ml | 4 +- lib/bap_types/bap_monad.mli | 2 +- lib/bap_types/bap_monad_types.ml | 2 +- lib/bap_types/bap_ogre.ml | 5 +- lib/bap_types/bap_ogre.mli | 2 +- lib/bap_types/bap_result.ml | 2 +- lib/bap_types/bap_result.mli | 2 +- lib/bap_types/bap_size.ml | 2 +- lib/bap_types/bap_size.mli | 2 +- lib/bap_types/bap_stmt.ml | 2 +- lib/bap_types/bap_stmt.mli | 2 +- lib/bap_types/bap_tid_graph.ml | 2 +- lib/bap_types/bap_toplevel.ml | 4 +- lib/bap_types/bap_trie.ml | 16 +- lib/bap_types/bap_trie.mli | 2 +- lib/bap_types/bap_type.ml | 2 +- lib/bap_types/bap_type.mli | 2 +- lib/bap_types/bap_type_error.ml | 2 +- lib/bap_types/bap_type_error.mli | 2 +- lib/bap_types/bap_types.ml | 2 +- lib/bap_types/bap_value.ml | 32 +- lib/bap_types/bap_value.mli | 2 +- lib/bap_types/bap_var.ml | 7 +- lib/bap_types/bap_var.mli | 2 +- lib/bap_types/bap_vector.ml | 4 +- lib/bap_types/bap_vector.mli | 2 +- lib/bap_types/bap_visitor.ml | 2 +- lib/bap_types/bap_visitor.mli | 2 +- lib/bap_types/dune | 2 +- lib/bare/bare.ml | 2 +- lib/bare/bare.mli | 2 +- lib/bare/dune | 2 +- lib/beagle/beagle_prey.ml | 2 +- lib/beagle/beagle_prey.mli | 2 +- lib/beagle/dune | 2 +- lib/bitvec_binprot/bitvec_binprot.ml | 5 +- lib/bitvec_order/bitvec_order.mli | 2 +- lib/graphlib/dune | 2 +- lib/graphlib/graphlib.mli | 4 +- lib/graphlib/graphlib_graph.ml | 26 +- lib/graphlib/graphlib_graph.mli | 2 +- lib/graphlib/graphlib_intf.ml | 2 +- lib/graphlib/graphlib_pp.ml | 2 +- lib/graphlib/graphlib_pp.mli | 2 +- lib/graphlib/graphlib_regular.ml | 8 +- lib/graphlib/graphlib_regular.mli | 2 +- lib/knowledge/bap_knowledge.ml | 109 +++---- lib/knowledge/bap_knowledge.mli | 12 +- lib/knowledge/dune | 2 +- lib/microx/dune | 2 +- lib/microx/microx_concretizer.ml | 2 +- lib/microx/microx_conqueror.ml | 6 +- lib/microx/microx_conqueror.mli | 2 +- lib/monads/dune | 2 +- lib/monads/monads.mli | 2 +- lib/monads/monads_monad.ml | 22 +- lib/monads/monads_monad.mli | 6 +- lib/monads/monads_monoid.ml | 2 +- lib/monads/monads_monoid.mli | 2 +- lib/monads/monads_types.ml | 2 +- lib/ogre/dune | 2 +- lib/ogre/ogre.ml | 5 +- lib/ogre/ogre.mli | 2 +- lib/regular/dune | 2 +- lib/regular/regular.ml | 2 +- lib/regular/regular.mli | 16 +- lib/regular/regular_bytes.ml | 7 +- lib/regular/regular_bytes.mli | 2 +- lib/regular/regular_cache.ml | 4 +- lib/regular/regular_cache.mli | 2 +- lib/regular/regular_data.ml | 6 +- lib/regular/regular_data.mli | 2 +- lib/regular/regular_data_intf.ml | 2 +- lib/regular/regular_data_read.ml | 2 +- lib/regular/regular_data_read.mli | 2 +- lib/regular/regular_data_types.ml | 2 +- lib/regular/regular_data_write.ml | 2 +- lib/regular/regular_data_write.mli | 2 +- lib/regular/regular_opaque.ml | 2 +- lib/regular/regular_regular.ml | 2 +- lib/regular/regular_regular.mli | 2 +- lib/regular/regular_seq.ml | 9 +- lib/regular/regular_seq.mli | 2 +- lib/text_tags/dune | 2 +- lib/text_tags/text_tags.ml | 143 +++++---- lib/x86_cpu/dune | 2 +- lib/x86_cpu/x86_asm_reg.ml | 2 +- lib/x86_cpu/x86_asm_reg.mli | 2 +- lib/x86_cpu/x86_cpu.ml | 2 +- lib/x86_cpu/x86_env.ml | 4 +- lib/x86_cpu/x86_target.ml | 4 +- lib/x86_cpu/x86_types.ml | 2 +- lib_test/bap/run_tests.ml | 4 +- lib_test/bap_disasm/dune | 2 +- lib_test/bap_disasm/test_disasm.ml | 2 +- lib_test/bap_dwarf/dwarf_fbi_test.ml | 2 +- lib_test/bap_dwarf/run_tests.ml | 4 +- lib_test/bap_dwarf/test_leb128.ml | 2 +- lib_test/bap_future/test_future.ml | 2 +- lib_test/bap_future/test_stream.ml | 2 +- lib_test/bap_image/dune | 2 +- lib_test/bap_image/test_image.ml | 10 +- lib_test/bap_image/test_memmap.ml | 2 +- lib_test/bap_image/test_table.ml | 2 +- lib_test/bap_project/dune | 2 +- lib_test/bap_project/test_project.ml | 2 +- lib_test/bap_sema/dune | 2 +- lib_test/bap_sema/test_ir.ml | 2 +- lib_test/bap_traces/test_traces.ml | 2 +- lib_test/bap_types/dune | 2 +- lib_test/bap_types/test_bili.ml | 4 +- lib_test/bap_types/test_bitvector.ml | 2 +- lib_test/bap_types/test_bytes.ml | 2 +- lib_test/bap_types/test_graph.ml | 6 +- lib_test/bap_types/test_optimizations.ml | 2 +- lib_test/bap_types/test_trie.ml | 16 +- lib_test/powerpc/powerpc_add_tests.ml | 2 +- lib_test/powerpc/powerpc_arith_tests.ml | 2 +- lib_test/powerpc/powerpc_branch_tests.ml | 2 +- lib_test/powerpc/powerpc_compare_tests.ml | 2 +- lib_test/powerpc/powerpc_cr_tests.ml | 2 +- lib_test/powerpc/powerpc_load_tests.ml | 2 +- lib_test/powerpc/powerpc_logical_tests.ml | 2 +- lib_test/powerpc/powerpc_move_tests.ml | 4 +- lib_test/powerpc/powerpc_rotate_tests.ml | 2 +- lib_test/powerpc/powerpc_shift_tests.ml | 2 +- lib_test/powerpc/powerpc_store_tests.ml | 2 +- lib_test/powerpc/powerpc_tests_helpers.ml | 20 +- lib_test/powerpc/powerpc_tests_helpers.mli | 6 +- lib_test/powerpc/run_powerpc_tests.ml | 2 +- .../stub_resolver/run_stub_resolver_tests.ml | 2 +- lib_test/stub_resolver/stub_resolver_tests.ml | 8 +- lib_test/x86/run_x86_tests.ml | 2 +- lib_test/x86/test_pcmp.ml | 4 +- lib_test/x86/test_pshufb.ml | 4 +- monads.opam | 3 +- oasis/abi | 4 +- oasis/analyze | 2 +- oasis/api | 4 +- oasis/arm | 4 +- oasis/bap-std | 17 +- oasis/bare | 2 +- oasis/beagle | 4 +- oasis/bil | 2 +- oasis/build | 2 +- oasis/bundle | 4 +- oasis/byteweight | 4 +- oasis/c | 2 +- oasis/cache | 4 +- oasis/callgraph-collator | 2 +- oasis/callsites | 2 +- oasis/constant-tracker | 2 +- oasis/core-theory | 4 +- oasis/cxxfilt | 2 +- oasis/demangle | 4 +- oasis/dependencies | 2 +- oasis/disassemble | 2 +- oasis/dump-symbols | 2 +- oasis/dwarf | 4 +- oasis/elementary | 2 +- oasis/elf-loader | 4 +- oasis/emit-ida-script | 2 +- oasis/flatten | 2 +- oasis/frontc-parser | 2 +- oasis/frontend | 2 +- oasis/future | 4 +- oasis/ghidra | 4 +- oasis/glibc-runtime | 2 +- oasis/graphlib | 4 +- oasis/ida | 7 +- oasis/knowledge | 2 +- oasis/llvm | 4 +- oasis/main | 4 +- oasis/map-terms | 4 +- oasis/mc | 2 +- oasis/microx | 2 +- oasis/mips | 4 +- oasis/monads | 2 +- oasis/objdump | 5 +- oasis/ogre | 2 +- oasis/optimization | 2 +- oasis/patterns | 2 +- oasis/phoenix | 4 +- oasis/plugins | 2 +- oasis/powerpc | 6 +- oasis/primus | 2 +- oasis/primus-dictionary | 2 +- oasis/primus-exploring | 2 +- oasis/primus-greedy | 2 +- oasis/primus-limit | 2 +- oasis/primus-lisp | 2 +- oasis/primus-loader | 2 +- oasis/primus-machine | 2 +- oasis/primus-powerpc | 2 +- oasis/primus-print | 2 +- oasis/primus-promiscuous | 2 +- oasis/primus-propagate-taint | 2 +- oasis/primus-random | 2 +- oasis/primus-region | 2 +- oasis/primus-round-robin | 2 +- oasis/primus-symbolic-executor | 2 +- oasis/primus-systems | 2 +- oasis/primus-taint | 2 +- oasis/primus-test | 2 +- oasis/primus-track-visited | 2 +- oasis/primus-wandering | 2 +- oasis/primus-x86 | 2 +- oasis/print | 6 +- oasis/propagate-taint | 2 +- oasis/radare2 | 5 +- oasis/raw | 2 +- oasis/read-symbols | 2 +- oasis/regular | 2 +- oasis/relocatable | 2 +- oasis/report | 2 +- oasis/riscv | 4 +- oasis/run | 2 +- oasis/specification | 2 +- oasis/strings | 2 +- oasis/strings-library | 2 +- oasis/stub-resolver | 4 +- oasis/systemz | 4 +- oasis/taint | 4 +- oasis/tests | 12 +- oasis/text-tags | 2 +- oasis/thumb | 2 +- oasis/trace | 6 +- oasis/traces | 4 +- oasis/trivial-condition-form | 2 +- oasis/warn-unused | 2 +- oasis/x86 | 6 +- ogre.opam | 2 +- plugins/analyze/analyze_core_commands.ml | 2 +- plugins/analyze/analyze_main.ml | 10 +- plugins/analyze/dune | 2 +- plugins/api/api_main.ml | 13 +- plugins/api/dune | 2 +- plugins/arm/arm_gnueabi.ml | 2 +- plugins/arm/arm_main.ml | 2 +- plugins/arm/dune | 2 +- plugins/beagle/beagle_main.ml | 2 +- plugins/beagle/dune | 2 +- plugins/bil/bil_float.ml | 34 +-- plugins/bil/bil_ir.ml | 4 +- plugins/bil/bil_lifter.ml | 7 +- plugins/bil/bil_main.ml | 2 +- plugins/bil/bil_semantics.ml | 28 +- plugins/bil/dune | 2 +- plugins/byteweight/byteweight_main.ml | 4 +- plugins/byteweight/dune | 2 +- plugins/cache/bap_cache.ml | 12 +- plugins/cache/bap_cache_gc.ml | 8 +- plugins/cache/bap_cache_main.ml | 6 +- plugins/cache/bap_cache_types.ml | 2 +- plugins/cache/bap_cache_utils.ml | 6 +- plugins/cache/bap_cache_utils.mli | 2 +- plugins/cache/dune | 3 +- .../callgraph_collator_main.ml | 2 +- plugins/callgraph_collator/dune | 2 +- plugins/callsites/callsites_main.ml | 2 +- plugins/callsites/dune | 2 +- .../constant_tracker/constant_tracker_main.ml | 2 +- plugins/constant_tracker/dune | 2 +- plugins/core_theory/core_theory_main.ml | 2 +- plugins/core_theory/dune | 2 +- plugins/cxxfilt/cxxfilt_main.ml | 2 +- plugins/cxxfilt/dune | 2 +- plugins/demangle/demangle_main.ml | 2 +- plugins/demangle/dune | 2 +- plugins/dependencies/dependencies_main.ml | 8 +- plugins/dependencies/dune | 2 +- plugins/disassemble/disassemble_main.ml | 20 +- plugins/disassemble/disassemble_main_rules.ml | 4 +- plugins/disassemble/dune | 2 +- plugins/dump_symbols/dump_symbols_main.ml | 2 +- plugins/dump_symbols/dune | 2 +- plugins/elf_loader/dune | 2 +- plugins/elf_loader/elf_loader_main.ml | 9 +- plugins/emit_ida_script/dune | 2 +- .../emit_ida_script/emit_ida_script_main.ml | 4 +- plugins/frontc_parser/dune | 2 +- plugins/frontc_parser/frontc_parser_main.ml | 2 +- plugins/ghidra/dune | 2 +- plugins/ghidra/ghidra_main.ml | 2 +- plugins/glibc_runtime/dune | 2 +- plugins/glibc_runtime/glibc_runtime_main.ml | 4 +- plugins/ida/bap_ida_info.ml | 4 +- plugins/ida/bap_ida_info.mli | 2 +- plugins/ida/bap_ida_service.ml | 16 +- plugins/ida/dune | 3 +- plugins/ida/ida_main.ml | 10 +- plugins/llvm/dune | 2 +- plugins/llvm/llvm_main.ml | 2 +- plugins/map_terms/dune | 2 +- plugins/map_terms/map_terms_features.ml | 2 +- plugins/map_terms/map_terms_main.ml | 2 +- plugins/mc/dune | 2 +- plugins/mc/mc_main.ml | 2 +- plugins/mips/dune | 2 +- plugins/mips/mips.ml | 8 +- plugins/mips/mips_abi.ml | 2 +- plugins/mips/mips_cpu.ml | 6 +- plugins/mips/mips_dsl.ml | 2 +- plugins/mips/mips_dsl.mli | 2 +- plugins/mips/mips_main.ml | 2 +- plugins/mips/mips_model.ml | 20 +- plugins/mips/mips_model.mli | 2 +- plugins/mips/mips_rtl.ml | 14 +- plugins/mips/mips_rtl.mli | 2 +- plugins/mips/mips_types.ml | 2 +- plugins/mips/mips_utils.ml | 2 +- plugins/objdump/dune | 3 +- plugins/objdump/objdump_main.ml | 6 +- plugins/optimization/dune | 2 +- plugins/optimization/optimization_data.ml | 6 +- plugins/optimization/optimization_data.mli | 2 +- plugins/optimization/optimization_main.ml | 6 +- plugins/patterns/dune | 2 +- plugins/patterns/patterns_main.ml | 8 +- plugins/phoenix/dune | 3 +- plugins/phoenix/phoenix_dot.ml | 2 +- plugins/phoenix/phoenix_dot.mli | 2 +- plugins/phoenix/phoenix_helpers.ml | 2 +- plugins/phoenix/phoenix_helpers.mli | 2 +- plugins/phoenix/phoenix_main.ml | 13 +- plugins/phoenix/phoenix_options.ml | 2 +- plugins/phoenix/phoenix_output.ml | 2 +- plugins/phoenix/phoenix_output.mli | 2 +- plugins/phoenix/phoenix_printing.ml | 2 +- plugins/phoenix/phoenix_printing.mli | 2 +- plugins/phoenix/phoenix_root.ml | 4 +- plugins/piqi_printers/dune | 12 - plugins/piqi_printers/piqi_printers_main.ml | 2 +- plugins/powerpc/dune | 2 +- plugins/powerpc/powerpc.ml | 2 +- plugins/powerpc/powerpc.mli | 2 +- plugins/powerpc/powerpc_abi.ml | 2 +- plugins/powerpc/powerpc_cpu.ml | 2 +- plugins/powerpc/powerpc_dsl.ml | 2 +- plugins/powerpc/powerpc_dsl.mli | 2 +- plugins/powerpc/powerpc_main.ml | 2 +- plugins/powerpc/powerpc_model.ml | 24 +- plugins/powerpc/powerpc_model.mli | 2 +- plugins/powerpc/powerpc_rtl.ml | 14 +- plugins/powerpc/powerpc_rtl.mli | 2 +- plugins/powerpc/powerpc_utils.ml | 2 +- plugins/primus_approximation/approximation.ml | 2 +- plugins/primus_dictionary/dune | 2 +- .../primus_dictionary_main.ml | 4 +- plugins/primus_exploring/dune | 2 +- .../primus_exploring/primus_exploring_main.ml | 2 +- plugins/primus_greedy/dune | 2 +- plugins/primus_greedy/primus_greedy_main.ml | 2 +- plugins/primus_limit/dune | 2 +- plugins/primus_limit/primus_limit_main.ml | 2 +- plugins/primus_lisp/dune | 2 +- .../primus_lisp/primus_lisp_documentation.ml | 4 +- plugins/primus_lisp/primus_lisp_ieee754.ml | 4 +- plugins/primus_lisp/primus_lisp_io.ml | 2 +- plugins/primus_lisp/primus_lisp_main.ml | 4 +- plugins/primus_lisp/primus_lisp_primitives.ml | 6 +- plugins/primus_lisp/primus_lisp_run.ml | 2 +- .../primus_lisp_semantic_primitives.ml | 2 +- plugins/primus_lisp/primus_lisp_show.ml | 2 +- plugins/primus_loader/dune | 2 +- plugins/primus_loader/primus_loader_basic.ml | 3 +- plugins/primus_loader/primus_loader_main.ml | 2 +- plugins/primus_powerpc/dune | 2 +- plugins/primus_powerpc/primus_powerpc_main.ml | 2 +- plugins/primus_print/dune | 2 +- plugins/primus_print/primus_print_main.ml | 2 +- plugins/primus_promiscuous/dune | 2 +- .../primus_promiscuous_main.ml | 2 +- plugins/primus_propagate_taint/dune | 2 +- .../primus_propagate_taint_main.ml | 4 +- plugins/primus_random/dune | 2 +- plugins/primus_random/primus_random_main.ml | 4 +- plugins/primus_region/dune | 2 +- plugins/primus_region/primus_region_main.ml | 2 +- plugins/primus_round_robin/dune | 2 +- .../primus_round_robin_main.ml | 2 +- plugins/primus_symbolic_executor/dune | 2 +- .../primus_symbolic_executor_main.ml | 14 +- plugins/primus_systems/dune | 2 +- plugins/primus_systems/primus_systems_main.ml | 6 +- plugins/primus_taint/dune | 2 +- plugins/primus_taint/primus_taint_main.ml | 2 +- plugins/primus_taint/primus_taint_policies.ml | 2 +- plugins/primus_test/dune | 2 +- plugins/primus_test/primus_test_main.ml | 8 +- plugins/primus_wandering/dune | 2 +- .../primus_wandering/primus_wandering_main.ml | 2 +- plugins/primus_x86/primus_x86_loader.ml | 2 +- plugins/print/dune | 3 +- plugins/print/print_main.ml | 4 +- plugins/propagate_taint/dune | 2 +- .../propagate_taint/propagate_taint_main.ml | 2 +- plugins/propagate_taint/propagator.ml | 6 +- plugins/propagate_taint/propagator.mli | 2 +- plugins/radare2/dune | 3 +- plugins/radare2/radare2_main.ml | 4 +- plugins/raw/dune | 2 +- plugins/raw/raw_main.ml | 4 +- plugins/read_symbols/dune | 2 +- plugins/read_symbols/read_symbols_main.ml | 8 +- plugins/relocatable/dune | 2 +- plugins/relocatable/rel_symbolizer.ml | 2 +- plugins/report/dune | 2 +- plugins/report/report_main.ml | 2 +- .../resolve_indirects_main.ml | 2 +- plugins/riscv/dune | 2 +- plugins/riscv/riscv_main.ml | 2 +- plugins/run/dune | 2 +- plugins/run/run_main.ml | 2 +- plugins/specification/dune | 2 +- plugins/specification/specification_main.ml | 2 +- plugins/strings/dune | 2 +- plugins/strings/strings_main.ml | 2 +- plugins/stub_resolver/dune | 2 +- plugins/stub_resolver/stub_resolver.ml | 6 +- plugins/stub_resolver/stub_resolver.mli | 2 +- plugins/stub_resolver/stub_resolver_main.ml | 4 +- plugins/systemz/systemz_lifter.ml | 4 +- plugins/taint/dune | 2 +- plugins/taint/taint_main.ml | 2 +- plugins/thumb/dune | 2 +- plugins/thumb/thumb_branch.ml | 4 +- plugins/thumb/thumb_branch.mli | 2 +- plugins/thumb/thumb_core.ml | 2 +- plugins/thumb/thumb_main.ml | 4 +- plugins/thumb/thumb_mem.ml | 2 +- plugins/thumb/thumb_mem.mli | 2 +- plugins/thumb/thumb_mov.ml | 20 +- plugins/thumb/thumb_opcodes.ml | 2 +- plugins/trace/dune | 3 +- plugins/trace/trace_main.ml | 2 +- plugins/trivial_condition_form/dune | 2 +- .../trivial_condition_form_main.ml | 2 +- plugins/warn_unused/dune | 2 +- plugins/warn_unused/warn_unused_main.ml | 4 +- plugins/x86/dune | 2 +- plugins/x86/x86_backend.ml | 6 +- plugins/x86/x86_backend.mli | 2 +- plugins/x86/x86_btx.ml | 2 +- plugins/x86/x86_cdq.ml | 2 +- plugins/x86/x86_cmpxchg.ml | 2 +- plugins/x86/x86_disasm.ml | 2 +- plugins/x86/x86_disasm.mli | 2 +- plugins/x86/x86_endbr.ml | 2 +- plugins/x86/x86_legacy_bil_arithmetic.ml | 2 +- plugins/x86/x86_legacy_bil_ast.ml | 2 +- plugins/x86/x86_legacy_bil_convenience.ml | 2 +- plugins/x86/x86_legacy_bil_disasm_i386.ml | 4 +- plugins/x86/x86_legacy_bil_lifter.ml | 2 +- plugins/x86/x86_legacy_bil_pp.ml | 12 +- plugins/x86/x86_legacy_bil_pp.mli | 2 +- plugins/x86/x86_legacy_bil_semantics.ml | 12 +- plugins/x86/x86_legacy_bil_type.ml | 2 +- plugins/x86/x86_legacy_bil_var.ml | 2 +- plugins/x86/x86_legacy_bil_var.mli | 2 +- plugins/x86/x86_legacy_fp_lifter.ml | 2 +- plugins/x86/x86_legacy_fp_lifter.mli | 2 +- plugins/x86/x86_legacy_operands.ml | 2 +- plugins/x86/x86_legacy_operands.mli | 2 +- plugins/x86/x86_lifter.ml | 16 +- plugins/x86/x86_lifter.mli | 2 +- plugins/x86/x86_main.ml | 2 +- plugins/x86/x86_mov.ml | 2 +- plugins/x86/x86_mov_offset.ml | 6 +- plugins/x86/x86_opcode_btx.ml | 2 +- plugins/x86/x86_opcode_cdq.ml | 2 +- plugins/x86/x86_opcode_cmps.ml | 2 +- plugins/x86/x86_opcode_cmpxchg.ml | 2 +- plugins/x86/x86_opcode_ins.ml | 2 +- plugins/x86/x86_opcode_lods.ml | 2 +- plugins/x86/x86_opcode_mov.ml | 2 +- plugins/x86/x86_opcode_movs.ml | 2 +- plugins/x86/x86_opcode_outs.ml | 2 +- plugins/x86/x86_opcode_scas.ml | 2 +- plugins/x86/x86_opcode_stos.ml | 2 +- plugins/x86/x86_operands.ml | 2 +- plugins/x86/x86_operands.mli | 2 +- plugins/x86/x86_prefix.ml | 6 +- plugins/x86/x86_prefix.mli | 2 +- plugins/x86/x86_targets.ml | 2 +- plugins/x86/x86_targets.mli | 2 +- plugins/x86/x86_tools.ml | 2 +- plugins/x86/x86_tools.mli | 2 +- plugins/x86/x86_tools_flags.ml | 2 +- plugins/x86/x86_tools_flags.mli | 2 +- plugins/x86/x86_tools_imm.ml | 2 +- plugins/x86/x86_tools_mem.ml | 2 +- plugins/x86/x86_tools_mem.mli | 2 +- plugins/x86/x86_tools_prefix.ml | 2 +- plugins/x86/x86_tools_prefix.mli | 2 +- plugins/x86/x86_tools_reg.ml | 2 +- plugins/x86/x86_tools_reg.mli | 2 +- plugins/x86/x86_tools_types.ml | 2 +- plugins/x86/x86_utils.ml | 16 +- ppx_bap.opam | 30 +- regular.opam | 4 +- src/bap_byteweight_main.ml | 10 +- src/bap_frontend.ml | 6 +- src/dune | 2 +- text-tags.opam | 3 +- tools/bapbundle.ml | 20 +- tools/bapdoc.ml | 7 +- tools/dune | 4 +- tools/rewrite.ml | 14 +- 945 files changed, 1997 insertions(+), 2046 deletions(-) delete mode 100644 bap-piqi.opam delete mode 100644 lib/bap_piqi/dune delete mode 100644 plugins/piqi_printers/dune diff --git a/bap-abi.opam b/bap-abi.opam index f9b888bcd..b50d84387 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" "bap-common" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bap-analyze.opam b/bap-analyze.opam index 46ecdfa53..c670131a2 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" "linenoise" {>= "1.1.0" & < "2.0.0"} "monads" {= version} "bap-common" {= version} diff --git a/bap-api.opam b/bap-api.opam index 646e14c57..025a79fb3 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" "fileutils" "ppx_bap" {= version} "regular" {= version} diff --git a/bap-arm.opam b/bap-arm.opam index b83285d8f..ffd73ae45 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" "monads" {= version} "bap-common" {= version} "ogre" {= version} diff --git a/bap-beagle-strings.opam b/bap-beagle-strings.opam index 9a6d57979..f4156a8cd 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" "bap-common" {= version} "bap-beagle" {= version} "ppx_bap" {= version} diff --git a/bap-beagle.opam b/bap-beagle.opam index 7270ca63c..2e94dfb72 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" "monads" {= version} "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-bil.opam b/bap-bil.opam index e83bc7991..e4f7e2aba 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" "monads" {= version} "bap-common" {= version} "ogre" {= version} diff --git a/bap-bml.opam b/bap-bml.opam index e8b751a24..59165a15e 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" "bap-common" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-build.opam b/bap-build.opam index 91519beba..a05df8a80 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" "bap-common" {= version} "ocamlbuild" "ocamlfind" diff --git a/bap-bundle.opam b/bap-bundle.opam index ac9cc7adf..87bee0fae 100644 --- a/bap-bundle.opam +++ b/bap-bundle.opam @@ -11,7 +11,8 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "camlzip" {>= "1.0" & < "2.0"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core" + "core_kernel" "fileutils" "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-byteweight-frontend.opam b/bap-byteweight-frontend.opam index 82ce3b459..f6bcea1b8 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" "fileutils" "bap-common" {= version} "ocurl" {>= "0.9.0"} diff --git a/bap-byteweight.opam b/bap-byteweight.opam index 30eebb787..673f22c54 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" "bap-common" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bap-c.opam b/bap-c.opam index 03065f4c5..abb8466ff 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" "bap-common" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-cache.opam b/bap-cache.opam index 5091474c2..d3f4533a7 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" "fileutils" "mmap" "bap-common" {= version} diff --git a/bap-callgraph-collator.opam b/bap-callgraph-collator.opam index 818d1bba6..86efdf7b4 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" "graphlib" {= version} "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-callsites.opam b/bap-callsites.opam index f3ab5be24..bde157f22 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" "bap-common" {= version} "odoc" {with-doc} ] diff --git a/bap-common.opam b/bap-common.opam index 38b5e8d38..e7fb81885 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" "dune" {>= "3.1"} "dune-configurator" "dune-site" - "ocaml" {> "4.08.0"} - "stdio" {>= "v0.14" & < "v0.16"} + "ocaml" + "stdio" "odoc" {with-doc} ] build: [ diff --git a/bap-constant-tracker.opam b/bap-constant-tracker.opam index 5694ea248..f4200c061 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" "bap-common" {= version} "odoc" {with-doc} ] diff --git a/bap-core-theory.opam b/bap-core-theory.opam index 23dba49f1..8bb657188 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" "bap-common" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-cxxfilt.opam b/bap-cxxfilt.opam index cacc15a35..3cdbf201e 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" "bap-common" {= version} "odoc" {with-doc} ] diff --git a/bap-demangle.opam b/bap-demangle.opam index 35563b8a5..8c8c336f2 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" "bap-common" {= version} "odoc" {with-doc} ] diff --git a/bap-dependencies.opam b/bap-dependencies.opam index d7410b4cf..fb18e4a01 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" "bap-common" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-disassemble.opam b/bap-disassemble.opam index 86181fbd0..fc92a0a56 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" "monads" {= version} "bap-common" {= version} "ogre" {= version} diff --git a/bap-dump-symbols.opam b/bap-dump-symbols.opam index f5e68a388..5a0708f98 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" "graphlib" {= version} "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-dwarf.opam b/bap-dwarf.opam index 04f466622..30094bc9a 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" "bap-common" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bap-elementary.opam b/bap-elementary.opam index 23ada57ad..b5777c239 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" "odoc" {with-doc} ] build: [ diff --git a/bap-elf.opam b/bap-elf.opam index 000bfa8e4..287df7704 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" "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..658c8c480 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" "bap-common" {= version} "odoc" {with-doc} ] diff --git a/bap-frontc.opam b/bap-frontc.opam index aaa71bcb4..7adf5c6c8 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" "FrontC" {>= "4.1.0"} "bap-common" {= version} "odoc" {with-doc} diff --git a/bap-frontend.opam b/bap-frontend.opam index 9352f4ce0..c72876b62 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" "bap-common" {= version} "ocamlfind" "regular" {= version} diff --git a/bap-future.opam b/bap-future.opam index f3de322c7..53ef614e4 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" "monads" {= version} "bap-common" {= version} "odoc" {with-doc} diff --git a/bap-ghidra.opam b/bap-ghidra.opam index eead1e0f5..b8bc4f001 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" "ppx_bap" {= version} "bap-common" {= version} "bap-std" {= version} diff --git a/bap-glibc-runtime.opam b/bap-glibc-runtime.opam index e45ad10b0..9c6e0668f 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" "bap-common" {= version} "ogre" {= version} "odoc" {with-doc} diff --git a/bap-ida-plugin.opam b/bap-ida-plugin.opam index 64e0120f6..2a7326d6b 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" "bap-common" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bap-ida.opam b/bap-ida.opam index 3e7a7c1c8..d1c27b87c 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" "regular" {= version} "fileutils" "bap-common" {= version} diff --git a/bap-knowledge.opam b/bap-knowledge.opam index 0d7ace58d..b691366e9 100644 --- a/bap-knowledge.opam +++ b/bap-knowledge.opam @@ -10,7 +10,8 @@ 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" + "core_unix" "ppx_bap" {= version} "bap-common" {= version} "monads" {= version} diff --git a/bap-llvm.opam b/bap-llvm.opam index fbcfcc1a2..22e6d6c48 100644 --- a/bap-llvm.opam +++ b/bap-llvm.opam @@ -11,8 +11,7 @@ bug-reports: "https://github.com/BinaryAnalysisPlatform/bap/issues" depends: [ "dune" {>= "3.1"} "bap-std" {= version} - "conf-bap-llvm" {>= "1.8"} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core" "mmap" "monads" {= version} "bap-common" {= version} @@ -25,7 +24,6 @@ build: [ ["dune" "subst"] {dev} [ "ocaml" "tools/configure.ml" - "--with-llvm-config=%{conf-bap-llvm:config}%" "--%{llvm-shared?disable:enable}%-llvm-static" ] [ diff --git a/bap-llvm.opam.template b/bap-llvm.opam.template index 8b7096511..c4ae960eb 100644 --- a/bap-llvm.opam.template +++ b/bap-llvm.opam.template @@ -2,7 +2,6 @@ build: [ ["dune" "subst"] {dev} [ "ocaml" "tools/configure.ml" - "--with-llvm-config=%{conf-bap-llvm:config}%" "--%{llvm-shared?disable:enable}%-llvm-static" ] [ diff --git a/bap-main.opam b/bap-main.opam index 1384328d1..3cce2c4f0 100644 --- a/bap-main.opam +++ b/bap-main.opam @@ -14,10 +14,11 @@ depends: [ "bap-future" {= version} "bap-plugins" {= version} "bap-recipe" {= version} - "base" {>= "v0.14" & < "v0.16"} + "base" + "core_kernel" "cmdliner" {>= "1.0" & < "2.0"} "bap-common" {= version} - "stdio" {>= "v0.14" & < "v0.16"} + "stdio" "odoc" {with-doc} ] build: [ diff --git a/bap-mc.opam b/bap-mc.opam index 40a9a4496..f19bff597 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" "bap-common" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-microx.opam b/bap-microx.opam index 5ca6452db..099f114d6 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" "monads" {= version} "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-mips.opam b/bap-mips.opam index f1ea9e606..43dd1e2da 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" "bap-common" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-objdump.opam b/bap-objdump.opam index 0aebe19d9..70d0bb1f0 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" "bap-common" {= version} "ppx_bap" {= version} "re" {>= "1.0" & < "2.0"} diff --git a/bap-optimization.opam b/bap-optimization.opam index 3a7cc8a3c..02caffdab 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" "bap-common" {= version} "ppx_bap" {= version} "bap-std" {= version} diff --git a/bap-patterns.opam b/bap-patterns.opam index 7b9676e8b..f41195dd3 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" "fileutils" "bap-common" {= version} "ppx_bap" {= version} diff --git a/bap-phoenix.opam b/bap-phoenix.opam index d8abb8ba0..b5805921a 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" "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..d88a663be 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" "fileutils" "ocamlfind" "ppx_bap" {= version} diff --git a/bap-powerpc.opam b/bap-powerpc.opam index ac5cee521..0eecde311 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" "monads" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-primus-dictionary.opam b/bap-primus-dictionary.opam index 450a6485a..fea93a697 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" "odoc" {with-doc} ] build: [ diff --git a/bap-primus-exploring-scheduler.opam b/bap-primus-exploring-scheduler.opam index e8d0b2bf0..1afee1ee5 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" "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-greedy-scheduler.opam b/bap-primus-greedy-scheduler.opam index e8d0b2bf0..1afee1ee5 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" "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-limit.opam b/bap-primus-limit.opam index b461ad79a..a058069d3 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" "odoc" {with-doc} ] build: [ diff --git a/bap-primus-lisp.opam b/bap-primus-lisp.opam index 1b2adc595..1583a2e05 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" "monads" {= version} "regular" {= version} "odoc" {with-doc} diff --git a/bap-primus-loader.opam b/bap-primus-loader.opam index d8072e954..5ee59bf80 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" "ogre" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-mark-visited.opam b/bap-primus-mark-visited.opam index f0dbd8429..13f4e9af8 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" "odoc" {with-doc} ] build: [ diff --git a/bap-primus-powerpc.opam b/bap-primus-powerpc.opam index ca01881cc..2f4ae9d16 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" "odoc" {with-doc} ] build: [ diff --git a/bap-primus-print.opam b/bap-primus-print.opam index 9c7a5e889..3502e198e 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" "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-promiscuous.opam b/bap-primus-promiscuous.opam index b98fbb057..219b65da5 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" "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-propagate-taint.opam b/bap-primus-propagate-taint.opam index 849dcf30f..7701b63ab 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" "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-random.opam b/bap-primus-random.opam index 6c2fe76a2..38cf1f632 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" "monads" {= version} "zarith" "odoc" {with-doc} diff --git a/bap-primus-region.opam b/bap-primus-region.opam index c331c980c..3e8753aa9 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" "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-round-robin-scheduler.opam b/bap-primus-round-robin-scheduler.opam index e8d0b2bf0..1afee1ee5 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" "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-symbolic-executor.opam b/bap-primus-symbolic-executor.opam index c8bae944b..6965c37ca 100644 --- a/bap-primus-symbolic-executor.opam +++ b/bap-primus-symbolic-executor.opam @@ -15,12 +15,12 @@ depends: [ "bap-primus-track-visited" {= version} "bap-main" {= version} "bap-std" {= version} - "core_kernel" {>= "v0.14" & < "v0.16"} + "core" "monads" {= version} "regular" {= version} "bitvec" {= version} "zarith" - "z3" {>= "4.8.8-1"} + "z3" "odoc" {with-doc} ] build: [ diff --git a/bap-primus-systems.opam b/bap-primus-systems.opam index a5ea180a2..b83dc1846 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" "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-taint.opam b/bap-primus-taint.opam index 26e77081b..f870d682f 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" "bap-taint" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-test.opam b/bap-primus-test.opam index 93c8c67ad..b89e8c220 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" "odoc" {with-doc} ] build: [ diff --git a/bap-primus-track-visited.opam b/bap-primus-track-visited.opam index b9b4d4b4e..4e250ff91 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" "odoc" {with-doc} ] build: [ diff --git a/bap-primus-wandering-scheduler.opam b/bap-primus-wandering-scheduler.opam index e8d0b2bf0..1afee1ee5 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" "monads" {= version} "odoc" {with-doc} ] diff --git a/bap-primus-x86.opam b/bap-primus-x86.opam index 8287f7ff6..04dc8c01e 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" "bap-x86" {= version} "odoc" {with-doc} ] diff --git a/bap-primus.opam b/bap-primus.opam index c5d395e63..548d35cfe 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" "graphlib" {= version} "monads" {= version} - "parsexp" {>= "v0.14" & < "v0.16"} + "parsexp" "ppx_bap" {= version} "regular" {= version} "uuidm" {>= "0.9.7"} diff --git a/bap-print.opam b/bap-print.opam index e96015b10..f68758360 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" "graphlib" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-radare2.opam b/bap-radare2.opam index 6dec2df3f..608975d0e 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" "ogre" {= version} "ppx_bap" {= version} "re" {>= "1.0" & < "2.0"} diff --git a/bap-raw.opam b/bap-raw.opam index 8d8a4935d..da4c606c7 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" "bap-common" {= version} "ppx_bap" {= version} "bap-std" {= version} diff --git a/bap-recipe-command.opam b/bap-recipe-command.opam index 1c83d1688..bdd65ca61 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" "odoc" {with-doc} ] build: [ diff --git a/bap-recipe.opam b/bap-recipe.opam index 30bfdf7d2..81151df6a 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" + "stdio" "stdlib-shims" "uuidm" {>= "0.9.7"} "odoc" {with-doc} diff --git a/bap-relocatable.opam b/bap-relocatable.opam index 5ca8913cd..00f50878c 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" "monads" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-report.opam b/bap-report.opam index bd1decb2c..507356be8 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" "bap-common" {= version} "bap-std" {= version} "odoc" {with-doc} diff --git a/bap-riscv.opam b/bap-riscv.opam index ba986487e..7ef586460 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" "monads" {= version} "ogre" {= version} "ppx_bap" {= version} diff --git a/bap-run.opam b/bap-run.opam index 38acb0bfb..b9022b07e 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" "graphlib" {= version} "monads" {= version} "regular" {= version} diff --git a/bap-specification.opam b/bap-specification.opam index 74e4dff1d..7c1943035 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" "ogre" {= version} "odoc" {with-doc} ] diff --git a/bap-ssa.opam b/bap-ssa.opam index bbf6c0638..fd210f8ce 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" "odoc" {with-doc} ] build: [ diff --git a/bap-std.opam b/bap-std.opam index 91c0c275b..5e244f942 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" "fileutils" "graphlib" {= version} "mmap" diff --git a/bap-strings.opam b/bap-strings.opam index 2a1970abd..596ff82fb 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" "bap-common" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-stub-resolver.opam b/bap-stub-resolver.opam index d1dd3c727..7f1972a49 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" "ogre" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-symbol-reader.opam b/bap-symbol-reader.opam index f4a6d0124..c33540207 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" "odoc" {with-doc} ] build: [ diff --git a/bap-systemz.opam b/bap-systemz.opam index 46f2949d4..f5e970b7a 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" "ogre" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-taint-propagator.opam b/bap-taint-propagator.opam index b7918b6cc..a2685d805 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" "graphlib" {= version} "monads" {= version} "regular" {= version} diff --git a/bap-taint.opam b/bap-taint.opam index 4fc2a1581..b04ce88b7 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" "monads" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bap-term-mapper.opam b/bap-term-mapper.opam index b57b3d56c..8c297e11e 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" "ppx_bap" {= version} "regular" {= version} "odoc" {with-doc} diff --git a/bap-thumb.opam b/bap-thumb.opam index 96c77c4bc..5bd2c92ab 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" "ogre" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/bap-toplevel.opam b/bap-toplevel.opam index 3c4179888..a4740b0e0 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" "ocamlfind" "odoc" {with-doc} ] diff --git a/bap-trace.opam b/bap-trace.opam index 3d18922c2..487e26d44 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" "ppx_bap" {= version} "regular" {= version} "uri" diff --git a/bap-traces.opam b/bap-traces.opam index fd3a34b41..8349705c6 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" "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..d95fb4de1 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" "bap-common" {= version} "bap-std" {= version} "odoc" {with-doc} diff --git a/bap-warn-unused.opam b/bap-warn-unused.opam index 0bb27692c..8f2c4d0ad 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" "bap-common" {= version} "bap-std" {= version} "odoc" {with-doc} diff --git a/bap-x86.opam b/bap-x86.opam index 4305b3a1a..c72fc9332 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" "ogre" {= version} "ppx_bap" {= version} "regular" {= version} diff --git a/bare.opam b/bare.opam index 3cd1fc74d..ed85ad484 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" + "parsexp" "odoc" {with-doc} ] build: [ diff --git a/bitvec-binprot.opam b/bitvec-binprot.opam index 3d7b3f5fa..f660654de 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" "bitvec" {= version} "ppx_bap" {= version} "odoc" {with-doc} diff --git a/dune-project b/dune-project index 52e68ced4..8d5e67383 100644 --- a/dune-project +++ b/dune-project @@ -136,12 +136,12 @@ (share signatures) (share site_lisp)) (depends - (base (and (>= v0.14) (< v0.16))) - dune - dune-configurator - dune-site - (ocaml (> 4.08.0)) - (stdio (and (>= v0.14) (< v0.16))))) + base + dune + dune-configurator + dune-site + ocaml + stdio)) (package (name bap-primus-support) @@ -176,7 +176,7 @@ (depends (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (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 (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 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 (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 (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 (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 (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 (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 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 (bap-common (= :version)) ocamlbuild ocamlfind @@ -323,7 +323,8 @@ (tags (bap bap-tool)) (depends (camlzip (and (>= 1.0) (< 2.0))) - (core_kernel (and (>= v0.14) (< v0.16))) + core + core_kernel fileutils (bap-common (= :version)) (ppx_bap (= :version)) @@ -339,7 +340,7 @@ (bap-core-theory (= :version)) (bap-knowledge (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (bap-common (= :version)) (ppx_bap (= :version)))) @@ -350,7 +351,7 @@ (depends (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core fileutils mmap (bap-common (= :version)) @@ -365,7 +366,7 @@ (depends (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (graphlib (= :version)) (bap-common (= :version)) (ppx_bap (= :version)) @@ -378,7 +379,7 @@ (tags (bap bap-plugin bap-pass)) (depends (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (bap-common (= :version)))) (package @@ -398,7 +399,7 @@ details of the program behavior.") (bitvec-binprot (= :version)) (bitvec-order (= :version)) (bitvec-sexp (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (bap-common (= :version)) (ppx_bap (= :version)))) @@ -409,7 +410,7 @@ details of the program behavior.") (depends (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (bap-common (= :version)))) (package @@ -420,7 +421,7 @@ details of the program behavior.") (bap-demangle (= :version)) (bap-std (= :version)) (conf-binutils (>= 0.3)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (bap-common (= :version)))) (package @@ -431,7 +432,7 @@ details of the program behavior.") (bap-core-theory (= :version)) (bap-knowledge (= :version)) (bap-main (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (bap-common (= :version)))) (package @@ -441,7 +442,7 @@ details of the program behavior.") (depends (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (bap-common (= :version)) (ogre (= :version)) (ppx_bap (= :version)) @@ -461,7 +462,7 @@ details of the program behavior.") (bitvec-order (= :version)) (bitvec-sexp (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (monads (= :version)) (bap-common (= :version)) (ogre (= :version)) @@ -474,7 +475,7 @@ details of the program behavior.") (tags (bap bap-plugin)) (depends (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (graphlib (= :version)) (bap-common (= :version)) (ppx_bap (= :version)) @@ -486,7 +487,7 @@ details of the program behavior.") (tags (bap bap-library dwarf)) (depends (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (bap-common (= :version)) (ppx_bap (= :version)) (regular (= :version)))) @@ -501,7 +502,7 @@ details of the program behavior.") (bap-knowledge (= :version)) (bap-std (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + core)) (package (name bap-elf) @@ -510,7 +511,7 @@ details of the program behavior.") (depends (bap-dwarf (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (bap-common (= :version)) (ppx_bap (= :version)) (ppx_bitstring (and (>= 4.0.0) (< 5.0.0))) @@ -522,7 +523,7 @@ details of the program behavior.") (tags (bap bap-plugin)) (depends (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (bap-common (= :version)))) (package @@ -534,7 +535,7 @@ details of the program behavior.") (bap-knowledge (= :version)) (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (bap-common (= :version)) ocamlfind (regular (= :version)))) @@ -546,7 +547,7 @@ details of the program behavior.") (depends (bap-c (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (FrontC (>= 4.1.0)) (bap-common (= :version)))) @@ -558,7 +559,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 (monads (= :version)) (bap-common (= :version)))) @@ -568,7 +569,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 (ppx_bap (= :version)) (bap-common (= :version)) (bap-std (= :version)) @@ -583,7 +584,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 (bap-common (= :version)) (ogre (= :version)))) @@ -591,7 +592,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 (regular (= :version)) fileutils (bap-common (= :version)) @@ -604,7 +605,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 (bap-common (= :version)) (ppx_bap (= :version)) (regular (= :version)))) @@ -614,7 +615,8 @@ 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 + core_unix (ppx_bap (= :version)) (bap-common (= :version)) (monads (= :version)))) @@ -625,9 +627,8 @@ be seen as a common denominator between Lwt and Async libraries.") (tags (bap bap-plugin llvm)) (depends (bap-std (= :version)) - (conf-bap-llvm (>= 1.8)) - (core_kernel (and (>= v0.14) (< v0.16))) - mmap + core + mmap (monads (= :version)) (bap-common (= :version)) (ogre (= :version)) @@ -642,10 +643,11 @@ 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 + core_kernel (cmdliner (and (>= 1.0) (< 2.0))) (bap-common (= :version)) - (stdio (and (>= v0.14) (< v0.16))))) + stdio)) (package (name bap-mc) @@ -657,7 +659,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 (bap-common (= :version)) (ogre (= :version)) (ppx_bap (= :version)) @@ -669,7 +671,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 (monads (= :version)) (bap-common (= :version)) (ppx_bap (= :version)))) @@ -686,7 +688,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 (bap-common (= :version)) (ogre (= :version)) (ppx_bap (= :version)) @@ -707,7 +709,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 (bap-common (= :version)) (ppx_bap (= :version)) (re (and (>= 1.0) (< 2.0))))) @@ -717,7 +719,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 (bap-common (= :version)) (ppx_bap (= :version)) (bap-std (= :version)) @@ -739,7 +741,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 fileutils (bap-common (= :version)) (ppx_bap (= :version)) @@ -755,22 +757,22 @@ 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 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-piqi) +; (synopsis "Serializes BAP Project in various formats using piqi") +; (tags (bap bap-plugin)) +; (depends +; (bap-common (= :version)) +; (bap-std (= :version)) +; core +; (piqi (>= 0.7.8)))) (package (name bap-plugins) @@ -780,7 +782,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 fileutils ocamlfind (ppx_bap (= :version)) @@ -799,7 +801,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 (monads (= :version)) (ogre (= :version)) (ppx_bap (= :version)) @@ -821,10 +823,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 (graphlib (= :version)) (monads (= :version)) - (parsexp (and (>= v0.14) (< v0.16))) + parsexp (ppx_bap (= :version)) (regular (= :version)) (uuidm (>= 0.9.7)))) @@ -838,7 +840,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)) (package (name bap-primus-exploring-scheduler) @@ -848,7 +850,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 (monads (= :version)))) (package @@ -859,7 +861,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 (monads (= :version)))) (package @@ -870,7 +872,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)) (package (name bap-primus-lisp) @@ -884,7 +886,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 (monads (= :version)) (regular (= :version)))) @@ -896,7 +898,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 (ogre (= :version)))) (package @@ -908,7 +910,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)) (package (name bap-primus-powerpc) @@ -918,7 +920,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)) (package (name bap-primus-print) @@ -931,7 +933,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 (monads (= :version)))) (package @@ -942,7 +944,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 (monads (= :version)))) (package @@ -954,7 +956,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 (monads (= :version)))) (package @@ -968,7 +970,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 (monads (= :version)) zarith)) @@ -980,7 +982,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 (monads (= :version)))) (package @@ -991,7 +993,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 (monads (= :version)))) (package @@ -1005,12 +1007,12 @@ 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 (monads (= :version)) (regular (= :version)) (bitvec (= :version)) - zarith - (z3 (>= 4.8.8-1)))) + zarith + z3)) (package (name bap-primus-systems) @@ -1022,7 +1024,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 (monads (= :version)))) (package @@ -1033,7 +1035,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 (bap-taint (= :version)))) (package @@ -1044,7 +1046,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)) (package (name bap-primus-track-visited) @@ -1054,7 +1056,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)) (package (name bap-primus-wandering-scheduler) @@ -1064,7 +1066,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 (monads (= :version)))) (package @@ -1075,7 +1077,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 (bap-x86 (= :version)))) (package @@ -1087,7 +1089,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 (graphlib (= :version)) (ogre (= :version)) (ppx_bap (= :version)) @@ -1112,7 +1114,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 (ogre (= :version)) (ppx_bap (= :version)) (re (and (>= 1.0) (< 2.0))) @@ -1124,7 +1126,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 (bap-common (= :version)) (ppx_bap (= :version)) (bap-std (= :version)) @@ -1140,9 +1142,9 @@ 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))) - stdlib-shims + parsexp + stdio + stdlib-shims (uuidm (>= 0.9.7)))) (package @@ -1153,7 +1155,7 @@ and support files if necessary.") (bap-common (= :version)) (bap-main (= :version)) (bap-recipe (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + core)) (package (name bap-relation) @@ -1184,7 +1186,7 @@ between the sets.") (bitvec-order (= :version)) (bitvec-sexp (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (monads (= :version)) (ogre (= :version)) (ppx_bap (= :version)))) @@ -1194,7 +1196,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 (bap-common (= :version)) (bap-std (= :version)))) @@ -1210,7 +1212,7 @@ between the sets.") (bap-c (= :version)) (bap-knowledge (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (monads (= :version)) (ogre (= :version)) (ppx_bap (= :version)))) @@ -1225,7 +1227,7 @@ between the sets.") (bap-knowledge (= :version)) (bap-primus (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (graphlib (= :version)) (monads (= :version)) (regular (= :version)))) @@ -1238,7 +1240,7 @@ between the sets.") (bap-common (= :version)) (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (ogre (= :version)))) (package @@ -1248,7 +1250,7 @@ between the sets.") (depends (bap-common (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + core)) (package (name bap-std) @@ -1268,7 +1270,7 @@ between the sets.") (bitvec (= :version)) (camlzip (and (>= 1.07) (< 2.0))) cmdliner - (core_kernel (and (>= v0.14) (< v0.16))) + core fileutils (graphlib (= :version)) mmap @@ -1301,7 +1303,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 (bap-common (= :version)) (ppx_bap (= :version)))) @@ -1310,7 +1312,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 (bap-common (= :version)) (bap-beagle (= :version)) (ppx_bap (= :version)) @@ -1332,7 +1334,7 @@ The library provides several algorithms: (bitvec-order (= :version)) (bitvec-sexp (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (ogre (= :version)) (ppx_bap (= :version)))) @@ -1347,7 +1349,7 @@ The library provides several algorithms: (bap-main (= :version)) (bap-relation (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))))) + core)) (package (name bap-systemz) @@ -1360,7 +1362,7 @@ The library provides several algorithms: (bap-main (= :version)) (bap-std (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (ogre (= :version)) (ppx_bap (= :version)))) @@ -1373,7 +1375,7 @@ The library provides several algorithms: (bap-primus (= :version)) (bap-std (= :version)) (bap-strings (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (monads (= :version)) (ppx_bap (= :version)) (regular (= :version)))) @@ -1386,7 +1388,7 @@ The library provides several algorithms: (bap-common (= :version)) (bap-core-theory (= :version)) (bap-microx (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (graphlib (= :version)) (monads (= :version)) (regular (= :version)))) @@ -1400,7 +1402,7 @@ The library provides several algorithms: (bap-common (= :version)) (bap-main (= :version)) (bap-std (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (ppx_bap (= :version)) (regular (= :version)))) @@ -1416,7 +1418,7 @@ The library provides several algorithms: (bap-main (= :version)) (bap-std (= :version)) (bitvec (= :version)) - (core_kernel (and (>= v0.14) (< v0.16))) + core (ogre (= :version)) (ppx_bap (= :version)))) @@ -1432,7 +1434,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 ocamlfind)) (package @@ -1445,7 +1447,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 (ppx_bap (= :version)) (regular (= :version)) uri)) @@ -1457,7 +1459,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 (ppx_bap (= :version)) (regular (= :version)) (uri (>= 1.9.0)) @@ -1468,7 +1470,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 (bap-common (= :version)) (bap-std (= :version)))) @@ -1477,7 +1479,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 (bap-common (= :version)) (bap-std (= :version)))) @@ -1500,7 +1502,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 (ogre (= :version)) (ppx_bap (= :version)) (regular (= :version)) @@ -1515,8 +1517,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 + parsexp)) (package (name bitvec) @@ -1529,7 +1531,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 (bitvec (= :version)) (ppx_bap (= :version)))) @@ -1564,7 +1566,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 ocamlgraph (ppx_bap (= :version)) (regular (= :version)))) @@ -1576,7 +1578,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 + jane_rope (ppx_bap (= :version)))) (package @@ -1588,7 +1591,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 (bap-common (= :version)) (monads (= :version)))) @@ -1597,22 +1600,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 + ppx_bench + ppx_bin_prot + ppx_cold + ppx_compare + ppx_enumerate + ppx_fields_conv + ppx_hash + ppx_here (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 + ppx_expect + ppx_inline_test + ppx_sexp_conv + ppx_sexp_value + ppx_variants_conv)) (package (name regular) @@ -1628,10 +1631,10 @@ In particular, the library includes: \ - module Cache that adds caching service for data types \ - module Regular that glues everything together \ - module Opaque for regular but opaque data types \ -- module Seq that extends Core_kernel's sequence module \ +- module Seq that extends Core'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 (bap-common (= :version)) (ppx_bap (= :version)))) @@ -1640,7 +1643,8 @@ 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 + core_kernel (bap-common (= :version)))) (generate_opam_files true) diff --git a/graphlib.opam b/graphlib.opam index db28362d1..5889466cc 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" "ocamlgraph" "ppx_bap" {= version} "regular" {= version} diff --git a/lib/arm/arm_bit.ml b/lib/arm/arm_bit.ml index b825415d9..382a1aa50 100644 --- a/lib/arm/arm_bit.ml +++ b/lib/arm/arm_bit.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Or_error @@ -45,7 +45,7 @@ let bit_extract ~dest ~src sign ~lsb ~widthminus1 cond = Error.to_string_hum err in let low = int_of_imm lsb in let high = low + (int_of_imm widthminus1) in - let extracted = Bil.extract high low (exp_of_op src) in + let extracted = Bil.extract ~hi:high ~lo:low (exp_of_op src) in let final = cast_of_sign sign 32 extracted in exec [assn (Env.of_reg dest) final] cond @@ -65,9 +65,9 @@ let bit_field_insert ~dest ~src raw cond = let d = Env.of_reg dest in let d_e = Bil.var d in let lsb, width = get_lsb_width raw in - let extracted = Bil.extract (width - 1) 0 (exp_of_op src) in - let ext_h b s = Bil.extract 31 b s in - let ext_l b s = Bil.extract b 0 s in + let extracted = Bil.extract ~hi:(width - 1) ~lo:0 (exp_of_op src) in + let ext_h b s = Bil.extract ~hi:31 ~lo:b s in + let ext_l b s = Bil.extract ~hi:b ~lo:0 s in let inst = match lsb + width - 1, lsb with | 31, 0 -> extracted | 31, l -> Bil.concat extracted (ext_l (l - 1) d_e) diff --git a/lib/arm/arm_bit.mli b/lib/arm/arm_bit.mli index 915b67471..ef5f87a4d 100644 --- a/lib/arm/arm_bit.mli +++ b/lib/arm/arm_bit.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Arm_types diff --git a/lib/arm/arm_branch.ml b/lib/arm/arm_branch.ml index a01f30ced..8ae9b8b20 100644 --- a/lib/arm/arm_branch.ml +++ b/lib/arm/arm_branch.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Or_error diff --git a/lib/arm/arm_branch.mli b/lib/arm/arm_branch.mli index 0eadef0c6..6744df3a7 100644 --- a/lib/arm/arm_branch.mli +++ b/lib/arm/arm_branch.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Arm_types diff --git a/lib/arm/arm_cond.ml b/lib/arm/arm_cond.ml index de49ff004..6c13897d8 100644 --- a/lib/arm/arm_cond.ml +++ b/lib/arm/arm_cond.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std diff --git a/lib/arm/arm_cond.mli b/lib/arm/arm_cond.mli index 97b6bfc0d..89f2be109 100644 --- a/lib/arm/arm_cond.mli +++ b/lib/arm/arm_cond.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Arm_types diff --git a/lib/arm/arm_env.ml b/lib/arm/arm_env.ml index 93b6de7ff..6814a0f75 100644 --- a/lib/arm/arm_env.ml +++ b/lib/arm/arm_env.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Arm_types diff --git a/lib/arm/arm_env.mli b/lib/arm/arm_env.mli index 46d52a84e..7920b15bf 100644 --- a/lib/arm/arm_env.mli +++ b/lib/arm/arm_env.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Arm_types diff --git a/lib/arm/arm_flags.ml b/lib/arm/arm_flags.ml index 4563d9e59..931512857 100644 --- a/lib/arm/arm_flags.ml +++ b/lib/arm/arm_flags.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Arm_types diff --git a/lib/arm/arm_flags.mli b/lib/arm/arm_flags.mli index af0cac0e0..6edfa768c 100644 --- a/lib/arm/arm_flags.mli +++ b/lib/arm/arm_flags.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Arm_types diff --git a/lib/arm/arm_helpers.ml b/lib/arm/arm_helpers.ml index d27b7954d..16ea62543 100644 --- a/lib/arm/arm_helpers.ml +++ b/lib/arm/arm_helpers.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core let sexpable_of_string t_of_sexp name = try Some (t_of_sexp @@ Sexp.of_string name) diff --git a/lib/arm/arm_helpers.mli b/lib/arm/arm_helpers.mli index 94f78fb9b..28f001391 100644 --- a/lib/arm/arm_helpers.mli +++ b/lib/arm/arm_helpers.mli @@ -1,3 +1,3 @@ -open Core_kernel[@@warning "-D"] +open Core val sexpable_of_string : (Sexp.t -> 'a) -> string -> 'a option diff --git a/lib/arm/arm_insn.ml b/lib/arm/arm_insn.ml index 08a19a7ad..e81567c44 100644 --- a/lib/arm/arm_insn.ml +++ b/lib/arm/arm_insn.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Arm_helpers diff --git a/lib/arm/arm_lifter.ml b/lib/arm/arm_lifter.ml index 38f242c85..0587c96b7 100644 --- a/lib/arm/arm_lifter.ml +++ b/lib/arm/arm_lifter.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Or_error open Bap.Std @@ -303,9 +303,9 @@ let lift_bits mem ops (insn : bits_insn ) = let src1 = Env.of_reg src1 |> Bil.var in let src2 = Env.of_reg src2 |> Bil.var in exec Bil.([ - assn temp (load (var Env.mem) src2 LittleEndian `r8); + assn temp (load ~mem:(var Env.mem) ~addr:src2 LittleEndian `r8); Env.mem := - store (var Env.mem) src2 (extract 7 0 src1) LittleEndian `r8; + store ~mem:(var Env.mem) ~addr:src2 (extract ~hi:7 ~lo:0 src1) LittleEndian `r8; assn dest (cast unsigned 32 (var temp)); ]) cond @@ -317,23 +317,23 @@ let lift_bits mem ops (insn : bits_insn ) = ~shift:(exp_of_op shift) reg32_t in exec [ assn (Env.of_reg dest) - Bil.(extract 31 16 (exp_of_op src1) ^ - extract 15 0 shifted) + Bil.(extract ~hi:31 ~lo:16 (exp_of_op src1) ^ + extract ~hi:15 ~lo:0 shifted) ] cond (* reverses *) | `REV, [|`Reg dest; src; cond; _|] -> let s = exp_of_op src in - let rev = Bil.(extract 7 0 s ^ - extract 15 8 s ^ - extract 23 16 s ^ - extract 31 24 s) in + let rev = Bil.(extract ~hi:7 ~lo:0 s ^ + extract ~hi:15 ~lo:8 s ^ + extract ~hi:23 ~lo:16 s ^ + extract ~hi:31 ~lo:24 s) in exec [assn (Env.of_reg dest) rev] cond | `REV16, [|`Reg dest; src; cond; _|] -> let s = exp_of_op src in - let rev = Bil.(extract 23 16 s ^ - extract 31 24 s ^ - extract 7 0 s ^ - extract 15 8 s) in + let rev = Bil.(extract ~hi:23 ~lo:16 s ^ + extract ~hi:31 ~lo:24 s ^ + extract ~hi:7 ~lo:0 s ^ + extract ~hi:15 ~lo:8 s) in exec [assn (Env.of_reg dest) rev] cond | insn,ops -> fail [%here] "ops %s doesn't match bits insn %s" @@ -1019,7 +1019,7 @@ let lift_special ops insn = **) | `MSR, [|`Imm imm; `Reg src; cond; _|] -> let src = Bil.var (Env.of_reg src) in - let (:=) flag bit = Bil.move flag (Bil.extract bit bit src) in + let (:=) flag bit = Bil.move flag (Bil.extract ~hi:bit ~lo:bit src) in let s1 = if Word.(Int_exn.(imm land word 0x8) = word 0x8) then [ Env.nf := 31; @@ -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/arm/arm_mem.ml b/lib/arm/arm_mem.ml index 051db2c42..a1898af34 100644 --- a/lib/arm/arm_mem.ml +++ b/lib/arm/arm_mem.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std @@ -50,8 +50,8 @@ let lift_r ~(dst1 : Var.t) ?(dst2 : Var.t option) ~(base : Var.t) | H -> `r16 | W | D -> `r32 in - let store m n v = Bil.(store m n v LittleEndian typ) in - let load m n = Bil.(load m n LittleEndian typ) in + let store mem addr v = Bil.(store ~mem ~addr v LittleEndian typ) in + let load mem addr = Bil.(load ~mem ~addr LittleEndian typ) in let temp = match size with | B -> tmp reg8_t @@ -127,9 +127,9 @@ let lift_m dest_list base mode update operation = let mem = Bil.var Env.mem in let addr = Bil.(var o_base + int offset_e) in match operation with - | Ld -> assn dest Bil.(load mem addr LittleEndian `r32) + | Ld -> assn dest Bil.(load ~mem ~addr LittleEndian `r32) | St -> Bil.move Env.mem - Bil.(store Env.(var mem) addr (var dest) LittleEndian `r32) in + Bil.(store ~mem:Env.(var mem) ~addr (var dest) LittleEndian `r32) in (* Jmps should always be the last statement *) let rec move_jump_to_end l = match l with diff --git a/lib/arm/arm_mem.mli b/lib/arm/arm_mem.mli index c64c8b524..b6e8b460c 100644 --- a/lib/arm/arm_mem.mli +++ b/lib/arm/arm_mem.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Arm_types diff --git a/lib/arm/arm_mem_shift.ml b/lib/arm/arm_mem_shift.ml index 5fd1bf9e5..6a1fe77ce 100644 --- a/lib/arm/arm_mem_shift.ml +++ b/lib/arm/arm_mem_shift.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Or_error diff --git a/lib/arm/arm_mem_shift.mli b/lib/arm/arm_mem_shift.mli index b219add37..391c297a3 100644 --- a/lib/arm/arm_mem_shift.mli +++ b/lib/arm/arm_mem_shift.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Arm_types diff --git a/lib/arm/arm_mov.ml b/lib/arm/arm_mov.ml index 77ae91791..2f9d089b8 100644 --- a/lib/arm/arm_mov.ml +++ b/lib/arm/arm_mov.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std open Bap.Std @@ -84,7 +84,7 @@ let lift ?(encoding=Theory.Language.unknown) | `BIC, _, Some (`Imm i64) | `EOR, _, Some (`Imm i64) | `ORR, _, Some (`Imm i64) -> - stmts, set_cf_data i64 raw :: set_nzf Bil.(var dest) reg32_t + stmts, set_cf_data ~imm:i64 ~data:raw :: set_nzf Bil.(var dest) reg32_t | #move, _, _ -> stmts, Bil.move Env.cf carry :: set_nzf Bil.(var dest) reg32_t | #arth as itype1, _, _ -> diff --git a/lib/arm/arm_mov.mli b/lib/arm/arm_mov.mli index a786fd032..a6eab2435 100644 --- a/lib/arm/arm_mov.mli +++ b/lib/arm/arm_mov.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Arm_types diff --git a/lib/arm/arm_mul.ml b/lib/arm/arm_mul.ml index e597fb395..a86b588b6 100644 --- a/lib/arm/arm_mul.ml +++ b/lib/arm/arm_mul.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std @@ -25,8 +25,8 @@ let lift_mull ~lodest ~hidest ~src1 ~src2 sign ?addend ~wflag cond = | None -> Bil.(s1_64 * s2_64) in let insns = [ Bil.move result opn; - Bil.move (Env.of_reg lodest) Bil.(extract 31 0 eres); - Bil.move (Env.of_reg hidest) Bil.(extract 63 32 eres); + Bil.move (Env.of_reg lodest) Bil.(extract ~hi:31 ~lo:0 eres); + Bil.move (Env.of_reg hidest) Bil.(extract ~hi:63 ~lo:32 eres); ] in exec insns ~flags ~wflag cond @@ -34,7 +34,7 @@ let lift_smul ~dest ?hidest ~src1 ~src2 ?accum ?hiaccum ?q size cond = let dest = assert_reg [%here] dest in let src1 = exp_of_op src1 in let src2 = exp_of_op src2 in - let excast hi lo s = Bil.(cast signed 64 (extract hi lo s)) in + let excast hi lo s = Bil.(cast signed 64 (extract ~hi ~lo s)) in let top = excast 31 16 in let bot = excast 15 0 in let top32 = excast 47 16 in @@ -66,12 +66,12 @@ let lift_smul ~dest ?hidest ~src1 ~src2 ?accum ?hiaccum ?q size cond = match hidest with | Some (`Reg hid) -> [ Bil.move res result; - Bil.move (Env.of_reg hid) Bil.(extract 63 32 (var res)); - Bil.move (Env.of_reg dest) Bil.(extract 31 0 (var res)); + Bil.move (Env.of_reg hid) Bil.(extract ~hi:63 ~lo:32 (var res)); + Bil.move (Env.of_reg dest) Bil.(extract ~hi:31 ~lo:0 (var res)); ] | None -> [ Bil.move res result; - Bil.move (Env.of_reg dest) Bil.(extract 31 0 (var res)); + Bil.move (Env.of_reg dest) Bil.(extract ~hi:31 ~lo:0 (var res)); ] | _ -> fail [%here] "unexpected operand type" in exec (instr @ qflag) cond diff --git a/lib/arm/arm_mul.mli b/lib/arm/arm_mul.mli index b2f57a49b..95a674d7a 100644 --- a/lib/arm/arm_mul.mli +++ b/lib/arm/arm_mul.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Arm_types diff --git a/lib/arm/arm_op.ml b/lib/arm/arm_op.ml index 3cec22182..fab485eb3 100644 --- a/lib/arm/arm_op.ml +++ b/lib/arm/arm_op.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std diff --git a/lib/arm/arm_reg.ml b/lib/arm/arm_reg.ml index c91ec0d8a..a4a2b23b1 100644 --- a/lib/arm/arm_reg.ml +++ b/lib/arm/arm_reg.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Arm_helpers diff --git a/lib/arm/arm_shift.ml b/lib/arm/arm_shift.ml index 0eccbbe36..96f4b215f 100644 --- a/lib/arm/arm_shift.ml +++ b/lib/arm/arm_shift.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Or_error @@ -29,9 +29,9 @@ let shift_c ~src shift_type ~shift t = shifted, carry | `LSL -> let shifted = Bil.(src lsl shift) in - let carry = Bil.(ite (shift <> int (Word.zero bits)) - (nth_bit Bil.(bits_e - shift) src) - (var Env.cf)) in + let carry = Bil.(ite ~if_:(shift <> int (Word.zero bits)) + ~then_:(nth_bit Bil.(bits_e - shift) src) + ~else_:(var Env.cf)) in shifted, carry | `LSR -> let shifted = Bil.(src lsr shift) in diff --git a/lib/arm/arm_shift.mli b/lib/arm/arm_shift.mli index f9200d514..8970b28b5 100644 --- a/lib/arm/arm_shift.mli +++ b/lib/arm/arm_shift.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Arm_types diff --git a/lib/arm/arm_target.ml b/lib/arm/arm_target.ml index 1c2f793f8..2581a2fc6 100644 --- a/lib/arm/arm_target.ml +++ b/lib/arm/arm_target.ml @@ -1,6 +1,6 @@ let package = "bap" -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open KB.Syntax @@ -654,7 +654,7 @@ module Encodings = struct Seq.fold ~init:empty ~f:(fun symbols (addr,value) -> let addr = Bitvec.M32.int64 addr in if is_thumb value - then Map.set symbols addr llvm_t32 + then Map.set symbols ~key:addr ~data:llvm_t32 else Map.update symbols addr ~f:(function | None -> llvm_a32 | Some t -> t)) @@ -675,7 +675,7 @@ module Encodings = struct | other -> Sigma.failp "unknown encoding %s, expects :T32 or :A32" other in let* encodings = unit-->slot in - let res = Map.set encodings addr lang in + let res = Map.set encodings ~key:addr ~data:lang in KB.catch (KB.provide slot unit res) (fun _ -> KB.return ()) >>| fun () -> Sigma.Effect.pure Sigma.Value.nil diff --git a/lib/arm/arm_types.ml b/lib/arm/arm_types.ml index 00e9259dd..94ccafac1 100644 --- a/lib/arm/arm_types.ml +++ b/lib/arm/arm_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std diff --git a/lib/arm/arm_utils.ml b/lib/arm/arm_utils.ml index 0fc4a58f3..1ce4007e1 100644 --- a/lib/arm/arm_utils.ml +++ b/lib/arm/arm_utils.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Arm_types diff --git a/lib/arm/arm_utils.mli b/lib/arm/arm_utils.mli index 41eee2431..a022583a2 100644 --- a/lib/arm/arm_utils.mli +++ b/lib/arm/arm_utils.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Arm_types diff --git a/lib/arm/dune b/lib/arm/dune index 93dadcb7e..9cd95611c 100644 --- a/lib/arm/dune +++ b/lib/arm/dune @@ -11,6 +11,6 @@ bap-traces bitvec bitvec-order - core_kernel + core ogre regular)) diff --git a/lib/bap/bap.ml b/lib/bap/bap.ml index 86c7bd46a..5862fe2ae 100644 --- a/lib/bap/bap.ml +++ b/lib/bap/bap.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module Std = struct type 'a printer = Format.formatter -> 'a -> unit diff --git a/lib/bap/bap.mli b/lib/bap/bap.mli index f9d94dbc2..3aa1067c8 100644 --- a/lib/bap/bap.mli +++ b/lib/bap/bap.mli @@ -1,6 +1,6 @@ (** BAP Standard Library *) -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Regular.Std open Graphlib.Std @@ -459,7 +459,7 @@ module Std : sig The following plugin prints all sections in a file: {[ - open Core_kernel[@@warning "-D"] + open Core open Bap.Std open Format @@ -628,7 +628,7 @@ module Std : sig **) module Legacy : sig module Monad : sig - open Core_kernel[@@warning "-D"] + open Core module type Basic = Monad.Basic module type Basic2 = Monad.Basic2 module type Infix = Monad.Infix @@ -1758,7 +1758,7 @@ module Std : sig Note, we're not including [With_zero] interface, since it refers to the `Sign` module, that is available only - in core_kernel >= 113.33.00. + in core >= 113.33.00. *) (** [validate_positive] validates that a value is positive. *) diff --git a/lib/bap/bap_init_toplevel.ml b/lib/bap/bap_init_toplevel.ml index eb579b898..e9d9c548d 100644 --- a/lib/bap/bap_init_toplevel.ml +++ b/lib/bap/bap_init_toplevel.ml @@ -3,16 +3,16 @@ open Bap_plugins.Std let install_printer printer = Topdirs.dir_install_printer Format.err_formatter (Longident.parse printer) -[@@warning "-D"] + let install_printers () = - Core_kernel.Pretty_printer.all () |> + Core.Pretty_printer.all () |> List.iter install_printer -[@@warning "-D"] + let main () = let module Bap_std_is_required = Bap.Std in - let module Core_kernel_is_required = Core_kernel[@warning "-D"] in + let module Core_kernel_is_required = Core[@warning "-D"] in let loader = Topdirs.dir_load Format.err_formatter in setup_dynamic_loader loader; match Bap_main.init ~argv: [|"baptop"|] () with diff --git a/lib/bap/bap_project.ml b/lib/bap/bap_project.ml index 8327749ff..f1de221d8 100644 --- a/lib/bap/bap_project.ml +++ b/lib/bap/bap_project.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_core_theory open Graphlib.Std @@ -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 = @@ -768,7 +768,7 @@ module Registry(T : T)(I : T) = struct invalid_argf "An element with name %s is already registered \ please choose a unique name" (Knowledge.Name.show name) (); - Hashtbl.add_exn registry name (desc,entity,extra) + Hashtbl.add_exn registry ~key:name ~data:(desc,entity,extra) let find ?package name = let name = Knowledge.Name.read ?package name in diff --git a/lib/bap/bap_project.mli b/lib/bap/bap_project.mli index 38ff31a4c..5724d793b 100644 --- a/lib/bap/bap_project.mli +++ b/lib/bap/bap_project.mli @@ -1,6 +1,6 @@ open Bap_knowledge open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_future.Std open Bap_types.Std diff --git a/lib/bap/bap_self.ml b/lib/bap/bap_self.ml index f972f2dd4..f8b597545 100644 --- a/lib/bap/bap_self.ml +++ b/lib/bap/bap_self.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_bundle.Std open Bap_future.Std open Bap_plugins.Std @@ -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/bap_self.mli b/lib/bap/bap_self.mli index 6c4733367..328d25bd8 100644 --- a/lib/bap/bap_self.mli +++ b/lib/bap/bap_self.mli @@ -1,5 +1,5 @@ open Format -open Core_kernel[@@warning "-D"] +open Core open Bap_future.Std open Bap_main.Extension diff --git a/lib/bap/dune b/lib/bap/dune index 1a61c70ea..8abcf4e6c 100644 --- a/lib/bap/dune +++ b/lib/bap/dune @@ -21,8 +21,7 @@ bitvec-binprot bitvec-order bitvec-sexp - core_kernel - core_kernel.caml_unix + core fileutils graphlib monads diff --git a/lib/bap_abi/bap_abi.ml b/lib/bap_abi/bap_abi.ml index da6a3a0e0..680581f53 100644 --- a/lib/bap_abi/bap_abi.ml +++ b/lib/bap_abi/bap_abi.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std diff --git a/lib/bap_abi/dune b/lib/bap_abi/dune index 57db3b5aa..8c9541398 100644 --- a/lib/bap_abi/dune +++ b/lib/bap_abi/dune @@ -3,4 +3,4 @@ (public_name bap-abi) (wrapped false) (preprocess (pps ppx_bap)) - (libraries bap core_kernel)) + (libraries bap core)) diff --git a/lib/bap_api/bap_api.ml b/lib/bap_api/bap_api.ml index 3dfdcbfa1..1426e6f8c 100644 --- a/lib/bap_api/bap_api.ml +++ b/lib/bap_api/bap_api.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std type filename = string diff --git a/lib/bap_api/bap_api.mli b/lib/bap_api/bap_api.mli index 6e2f9d656..b87c08036 100644 --- a/lib/bap_api/bap_api.mli +++ b/lib/bap_api/bap_api.mli @@ -13,7 +13,7 @@ *) -open Core_kernel[@@warning "-D"] +open Core open Bap.Std type filename = string diff --git a/lib/bap_api/dune b/lib/bap_api/dune index 5f0052e73..5ca6fa296 100644 --- a/lib/bap_api/dune +++ b/lib/bap_api/dune @@ -3,4 +3,4 @@ (public_name bap-api) (wrapped false) (preprocess (pps ppx_bap)) - (libraries bap core_kernel)) \ No newline at end of file + (libraries bap core)) \ No newline at end of file diff --git a/lib/bap_bml/bap_bml.ml b/lib/bap_bml/bap_bml.ml index 1a3469811..99049f657 100644 --- a/lib/bap_bml/bap_bml.ml +++ b/lib/bap_bml/bap_bml.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std [@@@warning "-D"] diff --git a/lib/bap_bml/bap_bml.mli b/lib/bap_bml/bap_bml.mli index c227bba07..848e5a519 100644 --- a/lib/bap_bml/bap_bml.mli +++ b/lib/bap_bml/bap_bml.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std (** BML - Bap Mapping Language. diff --git a/lib/bap_bml/dune b/lib/bap_bml/dune index 05322bf76..55de23489 100644 --- a/lib/bap_bml/dune +++ b/lib/bap_bml/dune @@ -3,4 +3,4 @@ (public_name bap-bml) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap core_kernel)) + (libraries bap core)) diff --git a/lib/bap_build/bap_build.ml b/lib/bap_build/bap_build.ml index a6ece6c17..3fcc67982 100644 --- a/lib/bap_build/bap_build.ml +++ b/lib/bap_build/bap_build.ml @@ -19,7 +19,7 @@ module Plugin_rules = struct "bap-main"; "bap-core-theory"; "bap-knowledge"; - "core_kernel"; + "core"; "ppx_bap"; "regular" ] diff --git a/lib/bap_bundle/bap_bundle.ml b/lib/bap_bundle/bap_bundle.ml index 28d092dbf..491d241c2 100644 --- a/lib/bap_bundle/bap_bundle.ml +++ b/lib/bap_bundle/bap_bundle.ml @@ -1,14 +1,14 @@ -open Core_kernel[@@warning "-D"] +open Core -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_bundle/bap_bundle.mli b/lib/bap_bundle/bap_bundle.mli index 78be08ed2..caf2c8bce 100644 --- a/lib/bap_bundle/bap_bundle.mli +++ b/lib/bap_bundle/bap_bundle.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module Std : sig diff --git a/lib/bap_bundle/dune b/lib/bap_bundle/dune index 93b424109..ac3a666b1 100644 --- a/lib/bap_bundle/dune +++ b/lib/bap_bundle/dune @@ -3,7 +3,7 @@ (public_name bap-bundle) (wrapped false) (preprocess (pps ppx_bap)) - (libraries uri camlzip unix core_kernel core_kernel.caml_unix)) + (libraries uri camlzip unix core core_kernel.caml_unix)) (rule (target bap_bundle_config.ml) diff --git a/lib/bap_byteweight/bap_byteweight.ml b/lib/bap_byteweight/bap_byteweight.ml index 3fc8e609d..3db891cc1 100644 --- a/lib/bap_byteweight/bap_byteweight.ml +++ b/lib/bap_byteweight/bap_byteweight.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std module type Corpus = sig @@ -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..fddb1e5b6 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 Core open Bap_core_theory open Bap.Std -module Sys = Caml.Sys +module Sys = Stdlib.Sys module Config = Bap_main.Extension.Configuration @@ -107,7 +107,7 @@ let update_or_fail ?compiler target data payload path = not (matching_entry ?compiler target data entry)) in with_output path @@ fun zip -> let path = make_entry ?compiler target data in - let data = Bytes.unsafe_to_string (data.save payload) in + let data = Bytes.unsafe_to_string ~no_mutation_while_string_reachable:(data.save payload) in Zip.add_entry data zip path; List.iter entries ~f:(fun ({Zip.filename; comment; mtime; _},data) -> Zip.add_entry data zip filename ~comment ~mtime) @@ -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_byteweight/bap_byteweight_signatures.mli b/lib/bap_byteweight/bap_byteweight_signatures.mli index 397e09be8..fae1052a2 100644 --- a/lib/bap_byteweight/bap_byteweight_signatures.mli +++ b/lib/bap_byteweight/bap_byteweight_signatures.mli @@ -10,7 +10,7 @@ those data types, e.g., [Bap_byteweight.Bytes]. *) -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std diff --git a/lib/bap_byteweight/dune b/lib/bap_byteweight/dune index 65d1da90e..78e1c6b9e 100644 --- a/lib/bap_byteweight/dune +++ b/lib/bap_byteweight/dune @@ -4,4 +4,4 @@ (preprocess (pps ppx_bap)) (wrapped false) (libraries bap bap-main bap-core-theory bap-knowledge - core_kernel uri camlzip)) + core uri camlzip)) diff --git a/lib/bap_c/bap_c_abi.ml b/lib/bap_c/bap_c_abi.ml index c9740b134..593e57e36 100644 --- a/lib/bap_c/bap_c_abi.ml +++ b/lib/bap_c/bap_c_abi.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_c_type @@ -193,7 +193,7 @@ let register_model target model = if Hashtbl.mem models target then invalid_argf "A data model for target %s is already set" (Theory.Target.to_string target) (); - Hashtbl.add_exn models target (model :> Bap_c_size.base) + Hashtbl.add_exn models ~key:target ~data:(model :> Bap_c_size.base) let model target = match Hashtbl.find models target with | Some m -> m @@ -336,7 +336,7 @@ end module Arg = struct - open Core_kernel[@@warning "-D"] + open Core open Bap_core_theory open Bap.Std open Monads.Std @@ -421,7 +421,7 @@ module Arg = struct | None -> singleton (info,size) stack | Some (k,(_,s)) -> let k' = stack.align info (k + bytes s) in - {stack with data = Map.add_exn stack.data k' (info,size)} + {stack with data = Map.add_exn stack.data ~key:k' ~data:(info,size)} let add ctype datum size = append (Some {ctype; datum},size) let skip size = append (None,size) @@ -465,12 +465,12 @@ module Arg = struct | _,None,_ -> None | _,_,rt when Map.is_empty rt -> None | _,Some (k',x),rt -> - Some ({self with args = Map.add_exn rt k' x},()) + Some ({self with args = Map.add_exn rt ~key:k' ~data:x},()) let available {args} = Map.length args let of_list = - List.foldi ~f:(fun pos regs reg -> Map.add_exn regs pos reg) + List.foldi ~f:(fun pos regs reg -> Map.add_exn regs ~key:pos ~data:reg) ~init:Int.Map.empty @@ -533,7 +533,7 @@ module Arg = struct s with files = match Map.max_elt s.files with | None -> Map.singleton (module Int) 0 file | Some (k,_) -> - Map.add_exn s.files (k+1) file + Map.add_exn s.files ~key:(k+1) ~data:file } in let+ () = Arg.put s in fst (Map.max_elt_exn s.files) @@ -568,7 +568,7 @@ module Arg = struct let update s n f = match f (get s n) with | None -> Arg.reject () | Some (arena,res) -> - Arg.put {s with files = Map.set s.files n arena} >>= fun () -> + Arg.put {s with files = Map.set s.files ~key:n ~data:arena} >>= fun () -> Arg.return res let pop s n = update s n File.pop let popn ~n s a = update s a (File.popn n) @@ -609,7 +609,7 @@ module Arg = struct push_arg t arg let discard ?(n=1) file = - Arg.get () >>= fun s -> Arena.popn n s file >>| fun _ -> () + Arg.get () >>= fun s -> Arena.popn ~n s file >>| fun _ -> () let registers_for_bits file bits = let+ s = Arg.get () in diff --git a/lib/bap_c/bap_c_abi.mli b/lib/bap_c/bap_c_abi.mli index 39037b170..248f623ff 100644 --- a/lib/bap_c/bap_c_abi.mli +++ b/lib/bap_c/bap_c_abi.mli @@ -4,7 +4,7 @@ modules for C language. *) -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Monads.Std diff --git a/lib/bap_c/bap_c_attr.ml b/lib/bap_c/bap_c_attr.ml index aa00a919c..c7f404bd0 100644 --- a/lib/bap_c/bap_c_attr.ml +++ b/lib/bap_c/bap_c_attr.ml @@ -1,5 +1,5 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_c_type diff --git a/lib/bap_c/bap_c_data.ml b/lib/bap_c/bap_c_data.ml index 5151ad7c1..eec7d82bb 100644 --- a/lib/bap_c/bap_c_data.ml +++ b/lib/bap_c/bap_c_data.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Format diff --git a/lib/bap_c/bap_c_data.mli b/lib/bap_c/bap_c_data.mli index 14b9e3886..1c5b71713 100644 --- a/lib/bap_c/bap_c_data.mli +++ b/lib/bap_c/bap_c_data.mli @@ -6,7 +6,7 @@ the value. This module also defines models for integer representation. *) -open Core_kernel[@@warning "-D"] +open Core open Bap.Std (** models for 32 bit systems *) diff --git a/lib/bap_c/bap_c_parser.ml b/lib/bap_c/bap_c_parser.ml index b4f273394..18d5d6380 100644 --- a/lib/bap_c/bap_c_parser.ml +++ b/lib/bap_c/bap_c_parser.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core type decls = (string * Bap_c_type.t) list type parser = Bap_c_size.base -> string -> decls Or_error.t diff --git a/lib/bap_c/bap_c_parser.mli b/lib/bap_c/bap_c_parser.mli index f307ef193..cf8b80403 100644 --- a/lib/bap_c/bap_c_parser.mli +++ b/lib/bap_c/bap_c_parser.mli @@ -3,7 +3,7 @@ The module doesn't provide any parsers by itself, but allows it to be provided by a third party module. *) -open Core_kernel[@@warning "-D"] +open Core type decls = (string * Bap_c_type.t) list type parser = Bap_c_size.base -> string -> decls Or_error.t diff --git a/lib/bap_c/bap_c_size.ml b/lib/bap_c/bap_c_size.ml index 73d6d6f9f..65626c747 100644 --- a/lib/bap_c/bap_c_size.ml +++ b/lib/bap_c/bap_c_size.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_c_data open Bap_c_type @@ -14,6 +14,7 @@ let next_multitude_of ~n x = (x + (n-1)) land (lnot (n-1)) let padding alignment offset = let align = Size.in_bits alignment in (align - offset mod align) mod align + [@@deprecated "since [2021-05] this method is ignored"] let max_enum_elt xs = diff --git a/lib/bap_c/bap_c_size.mli b/lib/bap_c/bap_c_size.mli index 2d60bcd14..3a0a028c5 100644 --- a/lib/bap_c/bap_c_size.mli +++ b/lib/bap_c/bap_c_size.mli @@ -1,5 +1,5 @@ (** An abstraction of sizeof operator.*) -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_c_data open Bap_c_type @@ -97,7 +97,6 @@ class base : model -> object (** DEPRECATED. Use the [padding] function if you need to compute padding. *) method padding : t -> bits -> size option - [@@deprecated "since [2021-05] this method is ignored"] (* this method was deprecated as 1) it has an incorrect type (padding can have any number of bits) 2) padding is fully defined by the alignemnt and there is no diff --git a/lib/bap_c/bap_c_term_attributes.ml b/lib/bap_c/bap_c_term_attributes.ml index f8ffb6e75..cfde27eac 100644 --- a/lib/bap_c/bap_c_term_attributes.ml +++ b/lib/bap_c/bap_c_term_attributes.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Format diff --git a/lib/bap_c/bap_c_type.ml b/lib/bap_c/bap_c_type.ml index 64ae41362..14dbc0efa 100644 --- a/lib/bap_c/bap_c_type.ml +++ b/lib/bap_c/bap_c_type.ml @@ -10,7 +10,7 @@ to attach attributes of the form [attr(args)] to C type declarations. *) -open Core_kernel[@@warning "-D"] +open Core type char = [ `schar | `char | `uchar] diff --git a/lib/bap_c/bap_c_type.mli b/lib/bap_c/bap_c_type.mli index 84df9b564..036255c1e 100644 --- a/lib/bap_c/bap_c_type.mli +++ b/lib/bap_c/bap_c_type.mli @@ -10,7 +10,7 @@ to attach attributes of the form [attr(args)] to C type declarations. *) -open Core_kernel[@@warning "-D"] +open Core type char = [ `schar | `char | `uchar] diff --git a/lib/bap_c/bap_c_type_mapper.ml b/lib/bap_c/bap_c_type_mapper.ml index b385c4650..91adb1d93 100644 --- a/lib/bap_c/bap_c_type_mapper.ml +++ b/lib/bap_c/bap_c_type_mapper.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std open Bap_c_type diff --git a/lib/bap_c/bap_c_type_mapper.mli b/lib/bap_c/bap_c_type_mapper.mli index f5f138cb8..a96b22457 100644 --- a/lib/bap_c/bap_c_type_mapper.mli +++ b/lib/bap_c/bap_c_type_mapper.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std open Bap_c_type_mapper_intf diff --git a/lib/bap_c/dune b/lib/bap_c/dune index 3871b2c14..a45c89b0e 100644 --- a/lib/bap_c/dune +++ b/lib/bap_c/dune @@ -8,6 +8,6 @@ bap-api bap-core-theory bap-knowledge - core_kernel + core monads regular)) \ No newline at end of file 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..511a82912 100644 --- a/lib/bap_core_theory/bap_core_theory.mli +++ b/lib/bap_core_theory/bap_core_theory.mli @@ -363,8 +363,8 @@ designed for such use-cases. *) -open Core_kernel[@@warning "-D"] -open Caml.Format +open Core +open 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_IEEE754.ml b/lib/bap_core_theory/bap_core_theory_IEEE754.ml index e2f871f3d..e055fb7fc 100644 --- a/lib/bap_core_theory/bap_core_theory_IEEE754.ml +++ b/lib/bap_core_theory/bap_core_theory_IEEE754.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory_value type 'a num = 'a Sort.num diff --git a/lib/bap_core_theory/bap_core_theory_basic.ml b/lib/bap_core_theory/bap_core_theory_basic.ml index cffaa99bd..872acc225 100644 --- a/lib/bap_core_theory/bap_core_theory_basic.ml +++ b/lib/bap_core_theory/bap_core_theory_basic.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap_core_theory_definition 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_effect.ml b/lib/bap_core_theory/bap_core_theory_effect.ml index a184f57b4..bb37a6a26 100644 --- a/lib/bap_core_theory/bap_core_theory_effect.ml +++ b/lib/bap_core_theory/bap_core_theory_effect.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge module KB = Knowledge diff --git a/lib/bap_core_theory/bap_core_theory_manager.ml b/lib/bap_core_theory/bap_core_theory_manager.ml index 58f2abcbe..46b259363 100644 --- a/lib/bap_core_theory/bap_core_theory_manager.ml +++ b/lib/bap_core_theory/bap_core_theory_manager.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap_core_theory_definition @@ -69,7 +69,7 @@ let declare let name = Name.create ?package name in let extends = List.map extends ~f:Name.read in check_uniqueness name; - Hashtbl.add_exn known_theories name { + Hashtbl.add_exn known_theories ~key:name ~data:{ is_empty = false; name = names (name :: Empty.name :: extends); desugared = false; @@ -267,8 +267,8 @@ let equal x y = Set.equal x.name y.name let set_inclusion_order x y : Knowledge.Order.partial = if Set.equal x y then EQ else - if Set.is_subset x y then LT else - if Set.is_subset y x then GT else NC + if Set.is_subset x ~of_:y then LT else + if Set.is_subset y ~of_:x then GT else NC let order t1 t2 = set_inclusion_order t1.name t2.name @@ -328,7 +328,7 @@ let theories () = Knowledge.List.fold ~init ~f:(fun theories (name,def) -> Knowledge.Symbol.intern (Name.unqualified name) theory ~package:(Name.package name) >>| fun name -> - Map.add_exn theories name def) >>= fun r -> + Map.add_exn theories ~key:name ~data:def) >>= fun r -> KB.Context.set theories (Some r) >>| fun () -> r diff --git a/lib/bap_core_theory/bap_core_theory_parser.ml b/lib/bap_core_theory/bap_core_theory_parser.ml index 1d24c3f27..37e9cb88a 100644 --- a/lib/bap_core_theory/bap_core_theory_parser.ml +++ b/lib/bap_core_theory/bap_core_theory_parser.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap_core_theory_definition open Bap_core_theory_value diff --git a/lib/bap_core_theory/bap_core_theory_pass.ml b/lib/bap_core_theory/bap_core_theory_pass.ml index 451e37efd..3088cd4fc 100644 --- a/lib/bap_core_theory/bap_core_theory_pass.ml +++ b/lib/bap_core_theory/bap_core_theory_pass.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap_core_theory_definition @@ -33,8 +33,8 @@ let name_is_taken name = let register ?desc ?package name pass = let name = KB.Name.create ?package name in if Hashtbl.mem passes name then name_is_taken name; - Option.iter desc ~f:(fun desc -> Hashtbl.add_exn info name desc); - Hashtbl.add_exn passes name pass + Option.iter desc ~f:(fun desc -> Hashtbl.add_exn info ~key:name ~data:desc); + Hashtbl.add_exn passes ~key:name ~data:pass let lookup name = match Hashtbl.find passes name with diff --git a/lib/bap_core_theory/bap_core_theory_pass.mli b/lib/bap_core_theory/bap_core_theory_pass.mli index 7efc1e8b3..1017da7ee 100644 --- a/lib/bap_core_theory/bap_core_theory_pass.mli +++ b/lib/bap_core_theory/bap_core_theory_pass.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap_core_theory_definition diff --git a/lib/bap_core_theory/bap_core_theory_program.ml b/lib/bap_core_theory/bap_core_theory_program.ml index 46131b593..a0fa58587 100644 --- a/lib/bap_core_theory/bap_core_theory_program.ml +++ b/lib/bap_core_theory/bap_core_theory_program.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bitvec_order.Comparators open Bap_knowledge diff --git a/lib/bap_core_theory/bap_core_theory_program.mli b/lib/bap_core_theory/bap_core_theory_program.mli index 6dc903969..d63bd0c12 100644 --- a/lib/bap_core_theory/bap_core_theory_program.mli +++ b/lib/bap_core_theory/bap_core_theory_program.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge module Value = Bap_core_theory_value diff --git a/lib/bap_core_theory/bap_core_theory_target.ml b/lib/bap_core_theory/bap_core_theory_target.ml index 7cd8b60c4..c4abd26ec 100644 --- a/lib/bap_core_theory/bap_core_theory_target.ml +++ b/lib/bap_core_theory/bap_core_theory_target.ml @@ -1,6 +1,6 @@ let package = "core" -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge module KB = Knowledge @@ -204,7 +204,7 @@ let collect_regs ?pred init roles = Map.fold roles ~init ~f:(fun ~key:_ ~data:vars' vars -> match pred with | None -> Set.union vars vars' - | Some pred -> Set.union vars (Set.filter vars' pred)) + | Some pred -> Set.union vars (Set.filter vars' ~f:pred)) module Alias = struct type t = unit Var.t * (int * unit Var.t) list @@ -241,7 +241,7 @@ module Alias = struct } let add_sub sol lhs rhs = { - sol with subs = Map.set sol.subs lhs rhs; + sol with subs = Map.set sol.subs ~key:lhs ~data:rhs; } let pp_spec ppf spec = @@ -474,7 +474,7 @@ let declare let info = extend ?bits ?byte ?data ?code ?data_alignment ?code_alignment ?vars ?regs ?aliasing ?endianness ?system ?abi ?fabi ?filetype ?options ?nicknames p parent in - Hashtbl.add_exn targets t info; + Hashtbl.add_exn targets ~key:t ~data:info; t @@ -639,7 +639,7 @@ let partition xs = if is_known p && Set.mem universe p then grandest p else t in List.fold xs ~init:families ~f:(fun families t -> - Map.add_multi families (grandest t) t) |> + Map.add_multi families ~key:(grandest t) ~data:t) |> Map.data |> List.map ~f:sort_family_by_order |> sort_by_parent_name diff --git a/lib/bap_core_theory/bap_core_theory_target.mli b/lib/bap_core_theory/bap_core_theory_target.mli index fa0ed299f..035cc2e7c 100644 --- a/lib/bap_core_theory/bap_core_theory_target.mli +++ b/lib/bap_core_theory/bap_core_theory_target.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge module KB = Knowledge diff --git a/lib/bap_core_theory/bap_core_theory_value.ml b/lib/bap_core_theory/bap_core_theory_value.ml index 648626d6e..13b175ae1 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 Core +open Format open Bap_knowledge module KB = Knowledge @@ -158,11 +158,12 @@ end let of_sexpable x = x end) - include Binable.Of_binable(Exp)(struct + include Binable.Of_binable_with_uuid(Exp)(struct type t = top let to_binable x = x let of_binable x = x - end)[@@warning "-D"] + let caller_identity = Bin_shape.Uuid.of_string "7afb196e-fb95-47d9-892d-043460269e1b" + end) include Base.Comparable.Inherit(Exp)(struct type t = top diff --git a/lib/bap_core_theory/bap_core_theory_value.mli b/lib/bap_core_theory/bap_core_theory_value.mli index f05a8da58..2753af6a9 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 Core +open 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..2b8c46cc3 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 Core -open Caml.Format +open Stdlib.Format open Bap_knowledge open Bap_core_theory_value open Knowledge.Syntax diff --git a/lib/bap_core_theory/bap_core_theory_var.mli b/lib/bap_core_theory/bap_core_theory_var.mli index 0b14767d0..5abbbd05f 100644 --- a/lib/bap_core_theory/bap_core_theory_var.mli +++ b/lib/bap_core_theory/bap_core_theory_var.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap_core_theory_value diff --git a/lib/bap_core_theory/dune b/lib/bap_core_theory/dune index fa935d55e..f36956f53 100644 --- a/lib/bap_core_theory/dune +++ b/lib/bap_core_theory/dune @@ -3,5 +3,5 @@ (public_name bap-core-theory) (wrapped false) (preprocess (pps ppx_bap)) - (libraries bap-knowledge core_kernel core_kernel.caml_unix - bitvec bitvec-order bitvec-sexp bitvec-binprot)) \ No newline at end of file + (libraries bap-knowledge core + bitvec bitvec-order bitvec-sexp bitvec-binprot)) diff --git a/lib/bap_demangle/bap_demangle.ml b/lib/bap_demangle/bap_demangle.ml index 76e353aad..25b2aa1dd 100644 --- a/lib/bap_demangle/bap_demangle.ml +++ b/lib/bap_demangle/bap_demangle.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory module Std = struct @@ -17,7 +17,7 @@ module Std = struct if Hashtbl.mem registry name then failwithf "The demangler %s is already registered, \ please pick a unique name" (KB.Name.show name) (); - Hashtbl.add_exn registry name run; + Hashtbl.add_exn registry ~key:name ~data:run; {name; run} let declare ?package name run = ignore (create ?package name run) @@ -41,7 +41,7 @@ module Std = struct List.map ~f:(fun (name,run) -> {name; run}) let install target demangler = - match Hashtbl.add selected target demangler with + match Hashtbl.add selected ~key:target ~data:demangler with | `Ok -> () | `Duplicate -> let used = Hashtbl.find_exn selected target in diff --git a/lib/bap_demangle/bap_demangle.mli b/lib/bap_demangle/bap_demangle.mli index 44cc797a6..cee9be93c 100644 --- a/lib/bap_demangle/bap_demangle.mli +++ b/lib/bap_demangle/bap_demangle.mli @@ -4,7 +4,7 @@ restore the original source-language names of symbols, like removing leading underscores, or decoding C++ function names. *) -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory diff --git a/lib/bap_demangle/dune b/lib/bap_demangle/dune index fc59b0a93..f17aefa98 100644 --- a/lib/bap_demangle/dune +++ b/lib/bap_demangle/dune @@ -1,4 +1,4 @@ (library (name bap_demangle) (public_name bap-demangle) - (libraries bap-core-theory bap-knowledge core_kernel)) + (libraries bap-core-theory bap-knowledge core)) diff --git a/lib/bap_disasm/bap_disasm.ml b/lib/bap_disasm/bap_disasm.ml index 40cd19af5..504a908c8 100644 --- a/lib/bap_disasm/bap_disasm.ml +++ b/lib/bap_disasm/bap_disasm.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Graphlib.Std open Bap_types.Std diff --git a/lib/bap_disasm/bap_disasm.mli b/lib/bap_disasm/bap_disasm.mli index 6d2fdc696..cdef56e46 100644 --- a/lib/bap_disasm/bap_disasm.mli +++ b/lib/bap_disasm/bap_disasm.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std open Bap_disasm_types diff --git a/lib/bap_disasm/bap_disasm_backend_types.ml b/lib/bap_disasm/bap_disasm_backend_types.ml index db927c05e..fec6a4b70 100644 --- a/lib/bap_disasm/bap_disasm_backend_types.ml +++ b/lib/bap_disasm/bap_disasm_backend_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core type predicate = | Is_true diff --git a/lib/bap_disasm/bap_disasm_basic.ml b/lib/bap_disasm/bap_disasm_basic.ml index 5d5344f5c..152cc60d9 100644 --- a/lib/bap_disasm/bap_disasm_basic.ml +++ b/lib/bap_disasm/bap_disasm_basic.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_types.Std open Bap_core_theory @@ -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" @@ -367,7 +367,7 @@ module Insn = struct let id = v.data.imm_small in let sub = create ~parent:insn ~asm ~kinds dis ~insn:id in let pos = Hashtbl.length subs in - Hashtbl.add_exn subs pos sub; + Hashtbl.add_exn subs ~key:pos ~data:sub; Op.Imm {v with data = {imm_small=pos; imm_large=None}}) in let subs = Array.init (Hashtbl.length subs) ~f:(Hashtbl.find_exn subs) in @@ -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) @@ -628,7 +628,7 @@ let create ?(debug_level=0) ?(cpu="") ?(attrs="") ?(backend="llvm") triple = | None -> match Prim.create ~backend ~triple ~cpu ~attrs ~debug_level with | n when n >= 0 -> let disassembler = init @@ C.create (module Prim) n in - Hashtbl.add_exn disassemblers name disassembler; + Hashtbl.add_exn disassemblers ~key:name ~data:disassembler; Ok {name; asm = false; kinds = false; enc=name} | -2 -> errorf "Unknown backend: %s" backend | -3 -> errorf "Unsupported target: %s %s" triple cpu @@ -642,7 +642,7 @@ let custom target encoding backend t = {name; asm=false; kinds=false; enc=encoding_name encoding} | None -> let disassembler = init @@ C.create backend t in - Hashtbl.add_exn disassemblers name disassembler; + Hashtbl.add_exn disassemblers ~key:name ~data:disassembler; {name; asm=false; kinds=false; enc=encoding_name encoding} let close dis = diff --git a/lib/bap_disasm/bap_disasm_basic.mli b/lib/bap_disasm/bap_disasm_basic.mli index 5727daac2..84cf3d1c3 100644 --- a/lib/bap_disasm/bap_disasm_basic.mli +++ b/lib/bap_disasm/bap_disasm_basic.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_types.Std open Bap_core_theory diff --git a/lib/bap_disasm/bap_disasm_block.ml b/lib/bap_disasm/bap_disasm_block.ml index a56a1874d..fecc9310f 100644 --- a/lib/bap_disasm/bap_disasm_block.ml +++ b/lib/bap_disasm/bap_disasm_block.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_types.Std open Image_internal_std diff --git a/lib/bap_disasm/bap_disasm_block.mli b/lib/bap_disasm/bap_disasm_block.mli index 79b7fb0dc..57140b50a 100644 --- a/lib/bap_disasm/bap_disasm_block.mli +++ b/lib/bap_disasm/bap_disasm_block.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_types.Std open Bap_image_std diff --git a/lib/bap_disasm/bap_disasm_brancher.ml b/lib/bap_disasm/bap_disasm_brancher.ml index c3d4b7f1a..8c4348ea2 100644 --- a/lib/bap_disasm/bap_disasm_brancher.ml +++ b/lib/bap_disasm/bap_disasm_brancher.ml @@ -1,5 +1,5 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std open Monads.Std diff --git a/lib/bap_disasm/bap_disasm_calls.ml b/lib/bap_disasm/bap_disasm_calls.ml index 9fb64d0dd..ecf2fc722 100644 --- a/lib/bap_disasm/bap_disasm_calls.ml +++ b/lib/bap_disasm/bap_disasm_calls.ml @@ -1,6 +1,6 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Graphlib.Std open Bap_types.Std @@ -93,7 +93,7 @@ end module Parents = struct type t = (word,Parent.t) Solution.t - include Binable.Of_binable(struct + include Binable.Of_binable_with_uuid(struct type t = (word * Parent.t) Seq.t [@@deriving bin_io] end)(struct type t = (word,Parent.t) Solution.t @@ -103,8 +103,8 @@ module Parents = struct Map.of_increasing_sequence (module Word) xs in Solution.create init Parent.unknown + let caller_identity = Bin_shape.Uuid.of_string "cb921c64-00a1-4cd3-a219-a0e73f841169" end) - [@@warning "-D"] end type input = Driver.state diff --git a/lib/bap_disasm/bap_disasm_calls.mli b/lib/bap_disasm/bap_disasm_calls.mli index 745103675..704f37617 100644 --- a/lib/bap_disasm/bap_disasm_calls.mli +++ b/lib/bap_disasm/bap_disasm_calls.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Graphlib.Std open Bap_types.Std diff --git a/lib/bap_disasm/bap_disasm_driver.ml b/lib/bap_disasm/bap_disasm_driver.ml index 80ba17393..2a241c93d 100644 --- a/lib/bap_disasm/bap_disasm_driver.ml +++ b/lib/bap_disasm/bap_disasm_driver.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_core_theory open Bap_image_std @@ -213,7 +213,7 @@ end = struct when is_data s next || is_slot s next -> step @@ revert curr {s with work} | Dest {dst=next} as curr :: work -> - let s = {s with begs = Map.add_multi s.begs next curr} in + let s = {s with begs = Map.add_multi s.begs ~key:next ~data:curr} in if is_visited s next then step {s with work} else {s with work; addr=next; curr} @@ -224,7 +224,7 @@ end = struct then step @@ revert curr {s with work} else if wrong_encoding s next encoding then step @@ revert curr {s with work} - else step {s with begs = Map.add_multi s.begs next curr; work} + else step {s with begs = Map.add_multi s.begs ~key:next ~data:curr; work} else if is_data s next then step @@ revert curr {s with work} else {s with work; addr=next; curr} | (Jump {src; dsts} as jump) :: ([] as work) @@ -237,7 +237,7 @@ end = struct then step@@revert jump {s with work} else let dsts = {dsts with resolved} in - let init = {s with jmps = Map.add_exn s.jmps src dsts; work} in + let init = {s with jmps = Map.add_exn s.jmps ~key:src ~data:dsts; work} in step @@ Set.fold resolved ~init ~f:(fun s next -> { s with @@ -269,9 +269,9 @@ end = struct let decoded s mem encoding = let addr = Memory.min_addr mem in { - s with code = Map.add_exn s.code addr encoding.coding; + s with code = Map.add_exn s.code ~key:addr ~data:encoding.coding; usat = Set.remove s.usat addr - } [@@inlined] + } let jumped s encoding mem dsts delay = let s = decoded s mem encoding in @@ -747,7 +747,7 @@ let explore let mem = view ~len beg base in block mem insns >>= fun block -> let fall = Addr.succ (Memory.max_addr mem) in - let blocks = Map.add_exn blocks beg block in + let blocks = Map.add_exn blocks ~key:beg ~data:block in node block cfg >>= fun cfg -> match Map.find jmps fin with | None -> diff --git a/lib/bap_disasm/bap_disasm_driver.mli b/lib/bap_disasm/bap_disasm_driver.mli index 1480d3f8f..4b4087052 100644 --- a/lib/bap_disasm/bap_disasm_driver.mli +++ b/lib/bap_disasm/bap_disasm_driver.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std open Bap_knowledge diff --git a/lib/bap_disasm/bap_disasm_insn.ml b/lib/bap_disasm/bap_disasm_insn.ml index 7606a217a..404b8b22d 100644 --- a/lib/bap_disasm/bap_disasm_insn.ml +++ b/lib/bap_disasm/bap_disasm_insn.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std open Bap_types.Std @@ -40,6 +40,7 @@ module Props = struct type t = Z.t let to_string = Z.to_bits let of_string = Z.of_bits + let caller_identity = Bin_shape.Uuid.of_string "650d7d34-27fc-46c5-b678-080321d2ef84" end let empty = Z.zero let (+) flags (flag,_) = Z.logor flags flag @@ -52,8 +53,7 @@ module Props = struct module T = struct type t = Z.t include Sexpable.Of_stringable(Bits) - include Binable.Of_stringable(Bits) - [@@warning "-D"] + include Binable.Of_stringable_with_uuid(Bits) end @@ -145,8 +145,8 @@ module Slot = struct | None,_ | _,None -> NC | Some x, Some y -> if Set.equal x y then EQ else - if Set.is_subset x y then LT else - if Set.is_subset y x then GT else NC in + if Set.is_subset x ~of_:y then LT else + if Set.is_subset y ~of_:x then GT else NC in let join x y = match x,y with | None,None -> Ok None | None,Some x |Some x,None -> @@ -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 eff insn : t = + write eff Slot.[ name <-- Insn.name insn; asm <-- Insn.asm insn; ops <-- Some (Insn.ops insn); ] let of_basic ?bil insn : t = - let effect = + let eff = 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 eff 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 eff insn : t = + let bil = KB.Value.get Bil.slot eff in + write (set_basic eff insn) Slot.[ Props.slot <-- derive_props ~bil insn ] diff --git a/lib/bap_disasm/bap_disasm_insn.mli b/lib/bap_disasm/bap_disasm_insn.mli index 4839341e6..a27336394 100644 --- a/lib/bap_disasm/bap_disasm_insn.mli +++ b/lib/bap_disasm/bap_disasm_insn.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std open Bap_types.Std diff --git a/lib/bap_disasm/bap_disasm_linear_sweep.ml b/lib/bap_disasm/bap_disasm_linear_sweep.ml index e83c14c08..8aa2754dc 100644 --- a/lib/bap_disasm/bap_disasm_linear_sweep.ml +++ b/lib/bap_disasm/bap_disasm_linear_sweep.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std diff --git a/lib/bap_disasm/bap_disasm_linear_sweep.mli b/lib/bap_disasm/bap_disasm_linear_sweep.mli index 67790ed18..a32680761 100644 --- a/lib/bap_disasm/bap_disasm_linear_sweep.mli +++ b/lib/bap_disasm/bap_disasm_linear_sweep.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std diff --git a/lib/bap_disasm/bap_disasm_prim.ml b/lib/bap_disasm/bap_disasm_prim.ml index 8d8825787..14a29dbad 100644 --- a/lib/bap_disasm/bap_disasm_prim.ml +++ b/lib/bap_disasm/bap_disasm_prim.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_disasm_backend_types type t = int diff --git a/lib/bap_disasm/bap_disasm_rec.ml b/lib/bap_disasm/bap_disasm_rec.ml index 68a83ccff..9d4e4e0e3 100644 --- a/lib/bap_disasm/bap_disasm_rec.ml +++ b/lib/bap_disasm/bap_disasm_rec.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_types.Std open Graphlib.Std diff --git a/lib/bap_disasm/bap_disasm_rec.mli b/lib/bap_disasm/bap_disasm_rec.mli index 1ad0fb924..cde333cb2 100644 --- a/lib/bap_disasm/bap_disasm_rec.mli +++ b/lib/bap_disasm/bap_disasm_rec.mli @@ -1,6 +1,6 @@ (** Recursive Descent Disassembler *) -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Graphlib.Std open Bap_knowledge diff --git a/lib/bap_disasm/bap_disasm_reconstructor.ml b/lib/bap_disasm/bap_disasm_reconstructor.ml index 93e1c4778..4ea2fc27c 100644 --- a/lib/bap_disasm/bap_disasm_reconstructor.ml +++ b/lib/bap_disasm/bap_disasm_reconstructor.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Graphlib.Std open Bap_image_std diff --git a/lib/bap_disasm/bap_disasm_reconstructor.mli b/lib/bap_disasm/bap_disasm_reconstructor.mli index 54bf1a080..8f072a3b0 100644 --- a/lib/bap_disasm/bap_disasm_reconstructor.mli +++ b/lib/bap_disasm/bap_disasm_reconstructor.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std diff --git a/lib/bap_disasm/bap_disasm_rooter.ml b/lib/bap_disasm/bap_disasm_rooter.ml index 1447e1b50..c3c6f0fd0 100644 --- a/lib/bap_disasm/bap_disasm_rooter.ml +++ b/lib/bap_disasm/bap_disasm_rooter.ml @@ -1,6 +1,6 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std @@ -49,7 +49,7 @@ let of_image img = { let of_blocks blocks = let roots = String.Table.create () in Seq.iter blocks ~f:(fun (name,sa,_) -> - Hashtbl.change roots name (function + Hashtbl.change roots name ~f:(function | Some a when Addr.(a < sa) -> Some a | _ -> Some sa)); create (Hashtbl.data roots |> Seq.of_list) diff --git a/lib/bap_disasm/bap_disasm_source.ml b/lib/bap_disasm/bap_disasm_source.ml index 982abaa95..0fc4bf5cf 100644 --- a/lib/bap_disasm/bap_disasm_source.ml +++ b/lib/bap_disasm/bap_disasm_source.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std open Bap_core_theory diff --git a/lib/bap_disasm/bap_disasm_source.mli b/lib/bap_disasm/bap_disasm_source.mli index f94501d2e..c58a9fc1b 100644 --- a/lib/bap_disasm/bap_disasm_source.mli +++ b/lib/bap_disasm/bap_disasm_source.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std open Bap_future.Std diff --git a/lib/bap_disasm/bap_disasm_source_factory.ml b/lib/bap_disasm/bap_disasm_source_factory.ml index ee3aeecc1..486f46238 100644 --- a/lib/bap_disasm/bap_disasm_source_factory.ml +++ b/lib/bap_disasm/bap_disasm_source_factory.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std open Bap_disasm_source_intf diff --git a/lib/bap_disasm/bap_disasm_source_factory.mli b/lib/bap_disasm/bap_disasm_source_factory.mli index ba7c86a63..d1467f308 100644 --- a/lib/bap_disasm/bap_disasm_source_factory.mli +++ b/lib/bap_disasm/bap_disasm_source_factory.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_disasm_source_intf module Factory : sig diff --git a/lib/bap_disasm/bap_disasm_source_intf.ml b/lib/bap_disasm/bap_disasm_source_intf.ml index 14e87a03b..1c9f916ad 100644 --- a/lib/bap_disasm/bap_disasm_source_intf.ml +++ b/lib/bap_disasm/bap_disasm_source_intf.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std open Bap_future.Std diff --git a/lib/bap_disasm/bap_disasm_std.ml b/lib/bap_disasm/bap_disasm_std.ml index 6683da19e..46fbe36ae 100644 --- a/lib/bap_disasm/bap_disasm_std.ml +++ b/lib/bap_disasm/bap_disasm_std.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std diff --git a/lib/bap_disasm/bap_disasm_symbolizer.ml b/lib/bap_disasm/bap_disasm_symbolizer.ml index 35ba9c187..36de87d96 100644 --- a/lib/bap_disasm/bap_disasm_symbolizer.ml +++ b/lib/bap_disasm/bap_disasm_symbolizer.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_types.Std open Bap_image_std @@ -72,7 +72,7 @@ let of_image img = then Bap_relation.add rels addr name else rels) |> fun rels -> Bap_relation.matching rels () - ~saturated:(fun addr name () -> Hashtbl.add_exn names addr name) + ~saturated:(fun addr name () -> Hashtbl.add_exn names ~key:addr ~data:name) ~unmatched:(fun reason () -> report_broken reason); {find = Hashtbl.find names; path=Image.filename img; biased=true} @@ -80,14 +80,14 @@ let of_blocks seq = let names = let empty_rel = Bap_relation.empty Addr.compare String.compare in Seq.fold seq ~init:String.Map.empty ~f:(fun addrs (name,addr,_) -> - Map.update addrs name (function + Map.update addrs name ~f:(function | Some addr' -> Addr.min addr addr' | None -> addr)) |> Map.to_sequence |> Seq.fold ~init:empty_rel ~f:(fun rels (name,entry) -> Bap_relation.add rels entry name) |> fun rels -> Bap_relation.matching rels Addr.Map.empty - ~saturated:(fun addr name names -> Map.add_exn names addr name) + ~saturated:(fun addr name names -> Map.add_exn names ~key:addr ~data:name) ~unmatched:(fun reason names -> report_broken reason; names) in create @@ Map.find names diff --git a/lib/bap_disasm/bap_disasm_symtab.ml b/lib/bap_disasm/bap_disasm_symtab.ml index a13ffa1e0..cd59f0446 100644 --- a/lib/bap_disasm/bap_disasm_symtab.ml +++ b/lib/bap_disasm/bap_disasm_symtab.ml @@ -1,6 +1,6 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_types.Std open Image_internal_std @@ -170,15 +170,15 @@ let collect_graphs disasm calls = else Symbolizer.get_name (Block.addr dst) >>| fun name -> if Addr.equal next dest - then {tab with icalls = Map.set tab.icalls from name},graphs - else {tab with ecalls = Map.set tab.ecalls from name},graphs) + then {tab with icalls = Map.set tab.icalls ~key:from ~data:name},graphs + else {tab with ecalls = Map.set tab.ecalls ~key:from ~data:name},graphs) let collect_externals disasm = Disasm.externals disasm |> Set.to_sequence |> KB.Seq.fold ~init:(Map.empty (module Theory.Label)) ~f:(fun extern label -> let+ insn = label-->Theory.Semantics.slot in - Map.set extern label insn) + Map.set extern ~key:label ~data:insn) let create disasm calls = let* (init,graphs) = collect_graphs disasm calls in diff --git a/lib/bap_disasm/bap_disasm_symtab.mli b/lib/bap_disasm/bap_disasm_symtab.mli index 9c9a90039..cc183c55c 100644 --- a/lib/bap_disasm/bap_disasm_symtab.mli +++ b/lib/bap_disasm/bap_disasm_symtab.mli @@ -1,6 +1,6 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Image_internal_std diff --git a/lib/bap_disasm/bap_disasm_target_factory.ml b/lib/bap_disasm/bap_disasm_target_factory.ml index a5e27ca69..0af5c8ea3 100644 --- a/lib/bap_disasm/bap_disasm_target_factory.ml +++ b/lib/bap_disasm/bap_disasm_target_factory.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std include Bap_disasm_target_intf diff --git a/lib/bap_disasm/bap_disasm_target_intf.ml b/lib/bap_disasm/bap_disasm_target_intf.ml index 850ccbb4f..dcca3507a 100644 --- a/lib/bap_disasm/bap_disasm_target_intf.ml +++ b/lib/bap_disasm/bap_disasm_target_intf.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std diff --git a/lib/bap_disasm/bap_disasm_types.ml b/lib/bap_disasm/bap_disasm_types.ml index 65ee99e20..4a1e73dca 100644 --- a/lib/bap_disasm/bap_disasm_types.ml +++ b/lib/bap_disasm/bap_disasm_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std diff --git a/lib/bap_disasm/bap_insn_aliasing.ml b/lib/bap_disasm/bap_insn_aliasing.ml index 574c6b957..bf17be399 100644 --- a/lib/bap_disasm/bap_insn_aliasing.ml +++ b/lib/bap_disasm/bap_insn_aliasing.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std module Dis = Bap_disasm_basic diff --git a/lib/bap_disasm/dune b/lib/bap_disasm/dune index ee66443d2..376f3fb91 100644 --- a/lib/bap_disasm/dune +++ b/lib/bap_disasm/dune @@ -14,7 +14,7 @@ bitvec bitvec-order camlzip - core_kernel + core graphlib monads ocamlgraph diff --git a/lib/bap_dwarf/bap_dwarf.mli b/lib/bap_dwarf/bap_dwarf.mli index e283a3724..14a4c0e0b 100644 --- a/lib/bap_dwarf/bap_dwarf.mli +++ b/lib/bap_dwarf/bap_dwarf.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std diff --git a/lib/bap_dwarf/dune b/lib/bap_dwarf/dune index a200e9906..a59568916 100644 --- a/lib/bap_dwarf/dune +++ b/lib/bap_dwarf/dune @@ -3,4 +3,4 @@ (public_name bap-dwarf) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap core_kernel core_kernel.binary_packing regular)) + (libraries bap core core_kernel.binary_packing regular)) diff --git a/lib/bap_dwarf/dwarf_data.ml b/lib/bap_dwarf/dwarf_data.ml index b11d32162..2d23c0090 100644 --- a/lib/bap_dwarf/dwarf_data.ml +++ b/lib/bap_dwarf/dwarf_data.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Dwarf_types @@ -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_data.mli b/lib/bap_dwarf/dwarf_data.mli index bef973acd..d38496d7b 100644 --- a/lib/bap_dwarf/dwarf_data.mli +++ b/lib/bap_dwarf/dwarf_data.mli @@ -1,5 +1,5 @@ (** Representation for Dwarf Data. *) -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Dwarf_types diff --git a/lib/bap_dwarf/dwarf_fbi.ml b/lib/bap_dwarf/dwarf_fbi.ml index 0bf00e12d..0451a9c0a 100644 --- a/lib/bap_dwarf/dwarf_fbi.ml +++ b/lib/bap_dwarf/dwarf_fbi.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Or_error open Bap.Std @@ -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 - | Error err -> - eprintf "Failed to move to a next CU: %s" @@ - (Error.to_string_hum err); - Done + | 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_dwarf/dwarf_fbi.mli b/lib/bap_dwarf/dwarf_fbi.mli index 98ed11030..baa4a9558 100644 --- a/lib/bap_dwarf/dwarf_fbi.mli +++ b/lib/bap_dwarf/dwarf_fbi.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Dwarf_types diff --git a/lib/bap_dwarf/dwarf_input.ml b/lib/bap_dwarf/dwarf_input.ml index cd112897e..e4a8535c5 100644 --- a/lib/bap_dwarf/dwarf_input.ml +++ b/lib/bap_dwarf/dwarf_input.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Word_size open Or_error open Binary_packing diff --git a/lib/bap_dwarf/dwarf_input.mli b/lib/bap_dwarf/dwarf_input.mli index fe8790398..306966661 100644 --- a/lib/bap_dwarf/dwarf_input.mli +++ b/lib/bap_dwarf/dwarf_input.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Dwarf_types diff --git a/lib/bap_dwarf/dwarf_leb128.ml b/lib/bap_dwarf/dwarf_leb128.ml index 1e4c91760..95ead21a1 100644 --- a/lib/bap_dwarf/dwarf_leb128.ml +++ b/lib/bap_dwarf/dwarf_leb128.ml @@ -1,5 +1,5 @@ (** The implementation can work with numbers of arbitrary length. *) -open Core_kernel[@@warning "-D"] +open Core module Bits = struct open Binary_packing @@ -57,7 +57,7 @@ let pack7 ~negative (s : Bytes.t) = let bit0 = Cursor.bit0 cur in if cur.bit >= n * 8 then None else - let word = Bits.get_uint16 s cur.pos in + let word = Bits.get_uint16 ~buf:s ~pos:cur.pos in let mask = 0b0111_1111 lsl bit0 in let word = (word land mask) lsr bit0 in let word = @@ -86,13 +86,13 @@ let decode (leb : t) buf ~off ~len : unit = let (_ : Cursor.t) = List.foldi leb.data ~init:(Cursor.init len) ~f:(fun i cur x -> let bit0 = Cursor.bit0 cur in - let word = Bits.get_uint16 buf cur.pos in + let word = Bits.get_uint16 ~buf ~pos:cur.pos in let word = word lor ((x land 0b0111_1111) lsl bit0) in let word = if leb.negative && i = m - 1 then word lor (lnot 0 lsl (bit0 + 7)) else word in let word = word land 0xFFFF in - Bits.set_int16 buf cur.pos word; + Bits.set_int16 ~buf ~pos:cur.pos word; Cursor.next cur) in if leb.negative then begin for i = m to len - 1 do @@ -110,7 +110,7 @@ let read_exn ?(signed=false) bits ~pos_ref = let s = Sequence.unfold ~init:(`Continue) ~f:(function | `Stop -> None | `Continue -> - let x = Bits.get_uint8 bits !pos_ref in + let x = Bits.get_uint8 ~buf:bits ~pos:!pos_ref in incr pos_ref; if x land (1 lsl 7) = 0 then Some (x,`Stop) else Some (x, `Continue)) in @@ -128,7 +128,7 @@ let size t = max 1 @@ List.length t.data let write t bits ~pos : unit = List.iteri t.data ~f:(fun i x -> - Bits.set_int8 bits (pos + i) x) + Bits.set_int8 ~buf:bits ~pos:(pos + i) x) type 'a repr = { size : int; @@ -148,7 +148,7 @@ let int = (fun buf -> Int32.to_int (get_int32 ~buf ~pos:0)), (fun buf x -> set_int32 ~buf ~pos:0 @@ safe Int32.of_int x) | W64 -> - (fun buf -> Int64.to_int (get_int64 buf 0)), + (fun buf -> Int64.to_int (get_int64 ~buf ~pos:0)), (fun buf x -> set_int64 ~buf ~pos:0 @@ Int64.of_int x) in { size = num_bits word_size / 8; @@ -159,16 +159,16 @@ let int = let int32 = { size = 4; - read = (fun buf -> Some (Bits.get_int32 buf 0)); + read = (fun buf -> Some (Bits.get_int32 ~buf ~pos:0)); is_negative = Int32.is_negative; - write = (fun buf x -> Bits.set_int32 buf 0 x); + write = (fun buf x -> Bits.set_int32 ~buf ~pos:0 x); } let int64 = { size = 8; - read = (fun buf -> Some (Bits.get_int64 buf 0)); + read = (fun buf -> Some (Bits.get_int64 ~buf ~pos:0)); is_negative = Int64.is_negative; - write = (fun buf x -> Bits.set_int64 buf 0 x) + write = (fun buf x -> Bits.set_int64 ~buf ~pos:0 x) } let decoder (repr : 'a repr) x : 'a Or_error.t = diff --git a/lib/bap_dwarf/dwarf_leb128.mli b/lib/bap_dwarf/dwarf_leb128.mli index 852fa3525..698fe8369 100644 --- a/lib/bap_dwarf/dwarf_leb128.mli +++ b/lib/bap_dwarf/dwarf_leb128.mli @@ -1,5 +1,5 @@ (** LEB128 - Little Endian Base 128 encoding. *) -open Core_kernel[@@warning "-D"] +open Core (** an encoded value *) type t [@@deriving bin_io, compare, sexp] diff --git a/lib/bap_dwarf/dwarf_types.ml b/lib/bap_dwarf/dwarf_types.ml index 2088c9d1c..31f67207f 100644 --- a/lib/bap_dwarf/dwarf_types.ml +++ b/lib/bap_dwarf/dwarf_types.ml @@ -1,5 +1,5 @@ (** Basic type declarations for DWARF format. *) -open Core_kernel[@@warning "-D"] +open Core open Bap.Std type leb128 = Dwarf_leb128.t [@@deriving bin_io, compare, sexp] diff --git a/lib/bap_elementary/bap_elementary.ml b/lib/bap_elementary/bap_elementary.ml index 9bb09a0c1..6e71b5746 100644 --- a/lib/bap_elementary/bap_elementary.ml +++ b/lib/bap_elementary/bap_elementary.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_knowledge diff --git a/lib/bap_elementary/bap_elementary.mli b/lib/bap_elementary/bap_elementary.mli index d5c632f4b..c2d48a664 100644 --- a/lib/bap_elementary/bap_elementary.mli +++ b/lib/bap_elementary/bap_elementary.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_knowledge open Bap_core_theory diff --git a/lib/bap_elementary/dune b/lib/bap_elementary/dune index 04417ae8e..dc481c5e0 100644 --- a/lib/bap_elementary/dune +++ b/lib/bap_elementary/dune @@ -2,4 +2,4 @@ (name bap_elementary) (public_name bap-elementary) (wrapped false) - (libraries bap bap-core-theory bap-knowledge bitvec core_kernel)) + (libraries bap bap-core-theory bap-knowledge bitvec core)) diff --git a/lib/bap_elf/bap_elf.mli b/lib/bap_elf/bap_elf.mli index 60beb504d..2ed55569b 100644 --- a/lib/bap_elf/bap_elf.mli +++ b/lib/bap_elf/bap_elf.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std diff --git a/lib/bap_elf/dune b/lib/bap_elf/dune index 6cd913cf3..3e4e55399 100644 --- a/lib/bap_elf/dune +++ b/lib/bap_elf/dune @@ -3,4 +3,4 @@ (public_name bap-elf) (preprocess (pps ppx_bap ppx_bitstring)) (wrapped false) - (libraries bap bitstring core_kernel regular)) + (libraries bap bitstring core regular)) diff --git a/lib/bap_elf/elf_internal_utils.ml b/lib/bap_elf/elf_internal_utils.ml index 7080581d6..1ba556cbb 100644 --- a/lib/bap_elf/elf_internal_utils.ml +++ b/lib/bap_elf/elf_internal_utils.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core let int_of_int64 n = match Int64.to_int n with | Some v -> Ok v diff --git a/lib/bap_elf/elf_internal_utils.mli b/lib/bap_elf/elf_internal_utils.mli index 401ab6fb9..c4d2a53e6 100644 --- a/lib/bap_elf/elf_internal_utils.mli +++ b/lib/bap_elf/elf_internal_utils.mli @@ -1,3 +1,3 @@ -open Core_kernel[@@warning "-D"] +open Core val int_of_int64 : int64 -> int Or_error.t diff --git a/lib/bap_elf/elf_parse.ml b/lib/bap_elf/elf_parse.ml index 9d4ec35c6..e06fe7a6d 100644 --- a/lib/bap_elf/elf_parse.ml +++ b/lib/bap_elf/elf_parse.ml @@ -28,13 +28,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *) -open Core_kernel[@@warning "-D"] +open Core 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! *) @@ -239,7 +239,7 @@ let parse_elf_ident bits = parse_e_osabi e_osabi, e_abiver, rest) -[@@warning "-D"] + (* elf header *) let parse_elf_hdr elf = @@ -327,7 +327,7 @@ let parse_elf_hdr elf = } in elf, seg_table, sec_table ) -[@@warning "-D"] + (* segment *) let parse_segment ei_class endian bit = @@ -370,7 +370,7 @@ let parse_segment ei_class endian bit = p_filesz; p_offset; }) -[@@warning "-D"] + (* section *) let parse_section ei_class endian bit = @@ -422,7 +422,7 @@ let parse_section ei_class endian bit = sh_size; sh_offset; }) -[@@warning "-D"] + let validate_offsets desc ~pos ~len ~offset ~size : unit Or_error.t = Validate.(result @@ name_list desc [ @@ -435,13 +435,13 @@ let validate_offsets desc ~pos ~len ~offset ~size : unit Or_error.t = Int.validate_ubound (size + offset) ~max:(Incl (pos + len)) ]) -[@@warning "-D"] + let split bits size : bitstring * bitstring = match%bitstring bits with | {|hd : size * 8 : bitstring; tl : -1 : bitstring|} -> hd,tl -[@@warning "-D"] + (* Bitlength needed that's why we multiply by 8 *) let bitstring_of_bytes b = b, 0, Bytes.length b * 8 diff --git a/lib/bap_elf/elf_parse.mli b/lib/bap_elf/elf_parse.mli index 747bb1f8b..b8950cfba 100644 --- a/lib/bap_elf/elf_parse.mli +++ b/lib/bap_elf/elf_parse.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Elf_types val from_bigstring : ?pos:int -> ?len:int -> Bigstring.t -> elf Or_error.t diff --git a/lib/bap_elf/elf_types.ml b/lib/bap_elf/elf_types.ml index 1c92771dc..9aa6beeb2 100644 --- a/lib/bap_elf/elf_types.ml +++ b/lib/bap_elf/elf_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std type e_class = diff --git a/lib/bap_elf/elf_utils.ml b/lib/bap_elf/elf_utils.ml index a5cfecb2c..586ea443c 100644 --- a/lib/bap_elf/elf_utils.ml +++ b/lib/bap_elf/elf_utils.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Elf_types open Elf_internal_utils open Or_error diff --git a/lib/bap_elf/elf_utils.mli b/lib/bap_elf/elf_utils.mli index 7eb5e9b5e..90ae75c5a 100644 --- a/lib/bap_elf/elf_utils.mli +++ b/lib/bap_elf/elf_utils.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Elf_types (** [section_name data elf section] extracts section name from data *) diff --git a/lib/bap_future/bap_future.ml b/lib/bap_future/bap_future.ml index 4e9915883..5faf52a13 100644 --- a/lib/bap_future/bap_future.ml +++ b/lib/bap_future/bap_future.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std module Std = struct diff --git a/lib/bap_future/bap_future.mli b/lib/bap_future/bap_future.mli index 88bd14ceb..e876cd356 100644 --- a/lib/bap_future/bap_future.mli +++ b/lib/bap_future/bap_future.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std (** Future library. diff --git a/lib/bap_future/dune b/lib/bap_future/dune index 3be5833eb..ab55d70a5 100644 --- a/lib/bap_future/dune +++ b/lib/bap_future/dune @@ -2,4 +2,4 @@ (name bap_future) (public_name bap-future) (wrapped false) - (libraries core_kernel monads)) \ No newline at end of file + (libraries core monads)) \ No newline at end of file diff --git a/lib/bap_ghidra/dune b/lib/bap_ghidra/dune index 4b04e02b3..cb8a1fe34 100644 --- a/lib/bap_ghidra/dune +++ b/lib/bap_ghidra/dune @@ -6,7 +6,7 @@ let () = Format.kasprintf Jbuild_plugin.V1.send {| (public_name bap-ghidra) (wrapped false) (preprocess (pps ppx_bap)) - (libraries bap core_kernel mmap) + (libraries bap core mmap) (foreign_stubs (language cxx) (names ghidra_disasm) diff --git a/lib/bap_ida/bap_ida.ml b/lib/bap_ida/bap_ida.ml index 14d3ff49a..b54cf05c1 100644 --- a/lib/bap_ida/bap_ida.ml +++ b/lib/bap_ida/bap_ida.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module Command = struct type 'a t = { diff --git a/lib/bap_ida/dune b/lib/bap_ida/dune index a9f9cc3dd..957c51571 100644 --- a/lib/bap_ida/dune +++ b/lib/bap_ida/dune @@ -3,4 +3,4 @@ (public_name bap-ida) (preprocess (pps ppx_bap)) (wrapped false) - (libraries core_kernel fileutils re.posix)) + (libraries core fileutils re.posix)) diff --git a/lib/bap_image/bap_fileutils.ml b/lib/bap_image/bap_fileutils.ml index aab90cac4..9717db02d 100644 --- a/lib/bap_image/bap_fileutils.ml +++ b/lib/bap_image/bap_fileutils.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Option.Monad_infix module Unix = Caml_unix @@ -13,7 +13,7 @@ let mapfile path : Bigstring.t option = with exn -> Unix.close fd; None -[@@warning "-D"] + let readfile path : Bigstring.t = match mapfile path with diff --git a/lib/bap_image/bap_fileutils.mli b/lib/bap_image/bap_fileutils.mli index a0b21b6b4..95f289dfe 100644 --- a/lib/bap_image/bap_fileutils.mli +++ b/lib/bap_image/bap_fileutils.mli @@ -1,6 +1,6 @@ (**Helper IO functions. *) -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std val readfile : string -> Bigstring.t diff --git a/lib/bap_image/bap_image.ml b/lib/bap_image/bap_image.ml index 6598dfd53..73a7a09f0 100644 --- a/lib/bap_image/bap_image.ml +++ b/lib/bap_image/bap_image.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap_core_theory open Regular.Std @@ -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_image.mli b/lib/bap_image/bap_image.mli index 5771a55e6..a8801de0a 100644 --- a/lib/bap_image/bap_image.mli +++ b/lib/bap_image/bap_image.mli @@ -1,7 +1,7 @@ (** A loadable memory image of an executable. *) open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_types.Std diff --git a/lib/bap_image/bap_memmap.ml b/lib/bap_image/bap_memmap.ml index 03203455e..bf6d4d956 100644 --- a/lib/bap_image/bap_memmap.ml +++ b/lib/bap_image/bap_memmap.ml @@ -1,5 +1,5 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_types.Std open Option.Monad_infix diff --git a/lib/bap_image/bap_memmap.mli b/lib/bap_image/bap_memmap.mli index f4a8ed388..2d23bc265 100644 --- a/lib/bap_image/bap_memmap.mli +++ b/lib/bap_image/bap_memmap.mli @@ -1,5 +1,5 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std type mem = Bap_memory.t diff --git a/lib/bap_image/bap_memory.ml b/lib/bap_image/bap_memory.ml index 4e3c705c2..023f120c2 100644 --- a/lib/bap_image/bap_memory.ml +++ b/lib/bap_image/bap_memory.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std open Bap_types.Std @@ -32,7 +32,7 @@ module Repr = struct } [@@deriving bin_io] end -include Binable.Of_binable(Repr)(struct +include Binable.Of_binable_with_uuid(Repr)(struct type nonrec t = t let to_binable {endian; addr; data; off; size} : Repr.t = { endian; @@ -47,8 +47,10 @@ include Binable.Of_binable(Repr)(struct off = 0; size = Bigstring.length data; } + + let caller_identity = Bin_shape.Uuid.of_string "61de198b-c547-4250-ab5f-80c7d2518159" end) -[@@warning "-D"] + let sexp_of_t mem = Sexp.List [ diff --git a/lib/bap_image/bap_memory.mli b/lib/bap_image/bap_memory.mli index 5cbc82d26..370804250 100644 --- a/lib/bap_image/bap_memory.mli +++ b/lib/bap_image/bap_memory.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std open Bap_types.Std diff --git a/lib/bap_image/bap_table.ml b/lib/bap_image/bap_table.ml index bcdd768d9..65887327e 100644 --- a/lib/bap_image/bap_table.ml +++ b/lib/bap_image/bap_table.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Or_error @@ -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,11 +281,11 @@ 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 - { map; bound} + { map; bound } let mapi ?start ?until tab ~f = make_map Map.mapi Map.set ?start ?until tab ~f diff --git a/lib/bap_image/bap_table.mli b/lib/bap_image/bap_table.mli index 43bff5459..e8d75ead9 100644 --- a/lib/bap_image/bap_table.mli +++ b/lib/bap_image/bap_table.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std type 'a t [@@deriving sexp_of] diff --git a/lib/bap_image/dune b/lib/bap_image/dune index d311785be..aa0fa81fe 100644 --- a/lib/bap_image/dune +++ b/lib/bap_image/dune @@ -7,9 +7,9 @@ bap-core-theory bap-knowledge bap_types - core_kernel - core_kernel.caml_unix + core mmap monads ogre - regular)) \ No newline at end of file + regular)) + diff --git a/lib/bap_image/image_backend.ml b/lib/bap_image/image_backend.ml index 44d5dc541..ba082e138 100644 --- a/lib/bap_image/image_backend.ml +++ b/lib/bap_image/image_backend.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_types.Std open Image_common diff --git a/lib/bap_image/image_common.ml b/lib/bap_image/image_common.ml index b4caa9fad..b234a9126 100644 --- a/lib/bap_image/image_common.ml +++ b/lib/bap_image/image_common.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std module Location = struct diff --git a/lib/bap_image/image_internal_std.ml b/lib/bap_image/image_internal_std.ml index 832ea8379..9d49a3289 100644 --- a/lib/bap_image/image_internal_std.ml +++ b/lib/bap_image/image_internal_std.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std include Image_common diff --git a/lib/bap_language/bap_language.ml b/lib/bap_language/bap_language.ml index 251e5e8b7..1110ef139 100644 --- a/lib/bap_language/bap_language.ml +++ b/lib/bap_language/bap_language.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_plugins.Std open Format diff --git a/lib/bap_language/bap_language.mli b/lib/bap_language/bap_language.mli index 14323f556..ec18cf614 100644 --- a/lib/bap_language/bap_language.mli +++ b/lib/bap_language/bap_language.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std diff --git a/lib/bap_llvm/bap_llvm.ml b/lib/bap_llvm/bap_llvm.ml index 3f915a4da..fc0661d23 100644 --- a/lib/bap_llvm/bap_llvm.ml +++ b/lib/bap_llvm/bap_llvm.ml @@ -1,8 +1,8 @@ -open Core_kernel[@@warning "-D"] +open Core let strip_version ver = if String.length ver <> 5 then ver - else String.sub ver 0 3 + else String.sub ver ~pos:0 ~len:3 module Std = struct diff --git a/lib/bap_llvm/bap_llvm.mli b/lib/bap_llvm/bap_llvm.mli index 2e96a081a..03cfeb7fd 100644 --- a/lib/bap_llvm/bap_llvm.mli +++ b/lib/bap_llvm/bap_llvm.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core (** Initialize LLVM backend. diff --git a/lib/bap_llvm/bap_llvm_disasm.ml b/lib/bap_llvm/bap_llvm_disasm.ml index aefef79dc..0ea1dc75b 100644 --- a/lib/bap_llvm/bap_llvm_disasm.ml +++ b/lib/bap_llvm/bap_llvm_disasm.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core [@@@ocaml.warning "-3"] diff --git a/lib/bap_llvm/bap_llvm_disasm.mli b/lib/bap_llvm/bap_llvm_disasm.mli index 196ff4cdc..12c44fb31 100644 --- a/lib/bap_llvm/bap_llvm_disasm.mli +++ b/lib/bap_llvm/bap_llvm_disasm.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core type x86_syntax = [`att | `intel] [@@deriving sexp] diff --git a/lib/bap_llvm/bap_llvm_loader.ml b/lib/bap_llvm/bap_llvm_loader.ml index b3db45b4b..d9bdef0ef 100644 --- a/lib/bap_llvm/bap_llvm_loader.ml +++ b/lib/bap_llvm/bap_llvm_loader.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap_core_theory open Bap.Std @@ -7,7 +7,7 @@ open Or_error include Self() -module Sys = Caml.Sys +module Sys = Stdlib.Sys module Unix = Caml_unix module Ogre = struct @@ -102,17 +102,17 @@ module LLVM = struct Tuple.T2.create (** elf program header as it is in file *) - let elf_program_header () = Ogre.declare "llvm:elf-program-header" + let elf_program_header () = Ogre.declare ~name:"llvm:elf-program-header" (scheme name $ off $ size) Tuple.T3.create (** elf program header as it is in memory *) let elf_virtual_program_header () = - Ogre.declare "llvm:elf-virtual-program-header" + Ogre.declare ~name:"llvm:elf-virtual-program-header" (scheme name $ addr $ size) Tuple.T3.create (** elf program header flags *) let elf_program_header_flags () = - Ogre.declare "llvm:elf-program-header-flags" + Ogre.declare ~name:"llvm:elf-program-header-flags" (scheme name $ ld $ readable $ writable $ executable) (fun name ld r w x -> name,ld,r,w,x) @@ -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 @@ -475,7 +475,7 @@ let map_file path = Unix.close fd; Or_error.errorf "unable to process file %s: %s" path (Exn.to_string exn) -[@@warning "-D"] + let from_file ~base ~pdb path = let open KB.Syntax in diff --git a/lib/bap_llvm/bap_llvm_loader.mli b/lib/bap_llvm/bap_llvm_loader.mli index 39d62d20b..8504944dc 100644 --- a/lib/bap_llvm/bap_llvm_loader.mli +++ b/lib/bap_llvm/bap_llvm_loader.mli @@ -1,3 +1,3 @@ -open Core_kernel[@@warning "-D"] +open Core val init : ?base:int64 -> ?pdb_path:string -> unit -> unit Or_error.t diff --git a/lib/bap_llvm/config/llvm_config.ml.ab b/lib/bap_llvm/config/llvm_config.ml.ab index c4b0158bb..68e5afe66 100644 --- a/lib/bap_llvm/config/llvm_config.ml.ab +++ b/lib/bap_llvm/config/llvm_config.ml.ab @@ -1 +1 @@ -let llvm_config = "${llvm-config}" \ No newline at end of file +let llvm_config = "${llvm-config}" 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_llvm/dune b/lib/bap_llvm/dune index ad7fc43a2..51ffac935 100644 --- a/lib/bap_llvm/dune +++ b/lib/bap_llvm/dune @@ -5,8 +5,7 @@ (preprocess (pps ppx_bap)) (libraries bap - core_kernel - core_kernel.caml_unix + core mmap monads ogre) diff --git a/lib/bap_main/bap_main.ml b/lib/bap_main/bap_main.ml index 726d4c802..944366120 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 @@ -454,11 +454,11 @@ module Context = struct List.iter plugins ~f:(fun (plugin,info) -> if not (Set.mem disabled plugin) then - Hashtbl.add_exn plugin_descriptions plugin info); + Hashtbl.add_exn plugin_descriptions ~key:plugin ~data:info); List.iter commands ~f:(fun (plugin,commands) -> if not (Set.mem disabled plugin) then Hashtbl.add_exn command_descriptions - plugin commands); + ~key:plugin ~data:commands); update @@ fun ctxt -> { env = Map.filter ctxt.env ~f:(fun {scope} -> @@ -469,7 +469,7 @@ module Context = struct if Set.mem disabled name then plugins else let data = Set.of_list (module String) tags in - Map.add_exn plugins name data) + Map.add_exn plugins ~key:name ~data) } let request () = @@ -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 *) @@ -897,13 +897,13 @@ end = struct Hashtbl.update plugin_pages name ~f:(function | None -> man | Some men -> men @ man); - Hashtbl.add_exn plugin_codes name !plugin_code; - Hashtbl.add_exn plugin_infos name info; - Hashtbl.add_exn plugins name p; + Hashtbl.add_exn plugin_codes ~key:name ~data:!plugin_code; + Hashtbl.add_exn plugin_infos ~key:name ~data:info; + Hashtbl.add_exn plugins ~key:name ~data:p; if not (List.is_empty !actions) - then Hashtbl.add_exn plugin_cmds name !actions; + then Hashtbl.add_exn plugin_cmds ~key:name ~data:!actions; reset_plugin (); - Hashtbl.add_exn plugin_specs name term; + Hashtbl.add_exn plugin_specs ~key:name ~data:term; | `Errored _ -> reset_plugin () | _ -> () @@ -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.mli b/lib/bap_main/bap_main.mli index 0e60e053d..8abb226e2 100644 --- a/lib/bap_main/bap_main.mli +++ b/lib/bap_main/bap_main.mli @@ -81,7 +81,7 @@ dependencies, which leverages plugin portability, so that it can be loaded when the development environment is no longer available. (Note, by default all dependencies except the bap - library itself and core_kernel) are packed into the plugin. + library itself and core) are packed into the plugin. The [bapbuild] tool is used to build plugins from OCaml source code. The [bapbundle] tool could be used to deploy the plugin into @@ -584,7 +584,7 @@ module Extension : sig Note, the examples below assume the following preamble: {[ - open Core_kernel[@@warning "-D"] + open Core open Bap_main.Extension ]} @@ -1035,7 +1035,7 @@ module Extension : sig Declaring a simple configuration parameter: {[ - open Core_kernel[@@warning "-D"] + open Core open Bap_main.Extension let depth = Configuration.parameter Type.int "depth" @@ -1051,7 +1051,7 @@ module Extension : sig example could be rewritten as: {[ - open Core_kernel[@@warning "-D"] + open Core open Bap_main.Extension open Bap_main.Extension.Syntax diff --git a/lib/bap_main/bap_main_event.ml b/lib/bap_main/bap_main_event.ml index cb65bf743..126063976 100644 --- a/lib/bap_main/bap_main_event.ml +++ b/lib/bap_main/bap_main_event.ml @@ -1,11 +1,11 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_future.Std 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..7551f575a 100644 --- a/lib/bap_main/bap_main_log.ml +++ b/lib/bap_main/bap_main_log.ml @@ -1,15 +1,15 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_future.Std 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_main/dune b/lib/bap_main/dune index 99b30948b..7267e0745 100644 --- a/lib/bap_main/dune +++ b/lib/bap_main/dune @@ -5,7 +5,7 @@ (libraries stdlib-shims base stdio cmdliner - core_kernel + core core_kernel.caml_unix fileutils bap-future diff --git a/lib/bap_mips/bap_mips_target.ml b/lib/bap_mips/bap_mips_target.ml index 8e0d9b78e..591d05b80 100644 --- a/lib/bap_mips/bap_mips_target.ml +++ b/lib/bap_mips/bap_mips_target.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std diff --git a/lib/bap_mips/dune b/lib/bap_mips/dune index ad865e33d..163817d98 100644 --- a/lib/bap_mips/dune +++ b/lib/bap_mips/dune @@ -3,4 +3,4 @@ (public_name bap-mips) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap bap-core-theory bap-knowledge core_kernel ogre)) + (libraries bap bap-core-theory bap-knowledge core ogre)) diff --git a/lib/bap_piqi/bil_piqi.ml b/lib/bap_piqi/bil_piqi.ml index c54ecd0d5..e7dfc1727 100644 --- a/lib/bap_piqi/bil_piqi.ml +++ b/lib/bap_piqi/bil_piqi.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bil.Types diff --git a/lib/bap_piqi/bir_piqi.ml b/lib/bap_piqi/bir_piqi.ml index 65743811c..8a86b0cdc 100644 --- a/lib/bap_piqi/bir_piqi.ml +++ b/lib/bap_piqi/bir_piqi.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Option.Monad_infix 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/test/run_piqi_tests.ml b/lib/bap_piqi/test/run_piqi_tests.ml index 696fe9a7e..f724e9117 100644 --- a/lib/bap_piqi/test/run_piqi_tests.ml +++ b/lib/bap_piqi/test/run_piqi_tests.ml @@ -1,5 +1,5 @@ open OUnit2 -open Core_kernel[@@warning "-D"] +open Core open Bap.Std module Example = struct 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_common.ml.ab b/lib/bap_plugins/bap_common.ml.ab index 0a513eeb1..f4f390f49 100644 --- a/lib/bap_plugins/bap_common.ml.ab +++ b/lib/bap_plugins/bap_common.ml.ab @@ -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..336acc7ee 100644 --- a/lib/bap_plugins/bap_plugins.ml +++ b/lib/bap_plugins/bap_plugins.ml @@ -1,12 +1,12 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_bundle.Std open Bap_future.Std 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.mli b/lib/bap_plugins/bap_plugins.mli index eb8d922fd..774a7dab4 100644 --- a/lib/bap_plugins/bap_plugins.mli +++ b/lib/bap_plugins/bap_plugins.mli @@ -1,6 +1,6 @@ (** Bap Plugin Library. *) -open Core_kernel[@@warning "-D"] +open Core open Bap_bundle.Std open Bap_future.Std diff --git a/lib/bap_plugins/bap_plugins_units.ml b/lib/bap_plugins/bap_plugins_units.ml index 21aac8dd0..50eca3d55 100644 --- a/lib/bap_plugins/bap_plugins_units.ml +++ b/lib/bap_plugins/bap_plugins_units.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_plugins_units_intf @@ -45,8 +45,8 @@ module Findlib = struct let extract_units_from_packages ~findlib_is_required = Findlib.(recorded_packages Record_core) |> List.iter ~f:(fun pkg -> Hashtbl.set units - (unit_of_package ~findlib_is_required pkg) - `In_core) + ~key:(unit_of_package ~findlib_is_required pkg) + ~data:`In_core) let init () = if not (Hashtbl.is_empty units) @@ -55,7 +55,7 @@ module Findlib = struct extract_units_from_packages ~findlib_is_required:(Hashtbl.is_empty units) let record name reason = - Hashtbl.add_exn units name reason + Hashtbl.add_exn units ~key:name ~data:reason let lookup = Hashtbl.find units @@ -79,11 +79,11 @@ module Dynlink = struct let copy_units_from_dynlink () = init_dynlink (); Dynlink.all_units () |> - List.iter ~f:(fun unit -> Hashtbl.add_exn units unit `In_core) + List.iter ~f:(fun unit -> Hashtbl.add_exn units ~key:unit ~data:`In_core) let init () = copy_units_from_dynlink () let list () = Hashtbl.keys units - let record name reason = match Hashtbl.add units name reason with + let record name reason = match Hashtbl.add units ~key:name ~data:reason with | `Ok -> () | `Duplicate -> failwithf "bap-plugins: internal error - \ @@ -92,14 +92,14 @@ module Dynlink = struct let lookup = Hashtbl.find units let handle_error name reason = function | Dynlink.Module_already_loaded _ -> - Hashtbl.set units name reason; + Hashtbl.set units ~key:name ~data:reason; Ok () | other -> Or_error.error_string (Dynlink.error_message other) 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_plugins/bap_plugins_units_intf.ml b/lib/bap_plugins/bap_plugins_units_intf.ml index 6ec28549a..27eaaa533 100644 --- a/lib/bap_plugins/bap_plugins_units_intf.ml +++ b/lib/bap_plugins/bap_plugins_units_intf.ml @@ -1,6 +1,6 @@ (** Internal module. *) -open Core_kernel[@@warning "-D"] +open Core type reason = [ | `In_core diff --git a/lib/bap_plugins/dune b/lib/bap_plugins/dune index 994bc1bcd..9f1c475ec 100644 --- a/lib/bap_plugins/dune +++ b/lib/bap_plugins/dune @@ -9,7 +9,7 @@ bap_plugins_package bap_plugins_units) (preprocess (pps ppx_bap)) - (libraries core_kernel dynlink fileutils findlib uri + (libraries core dynlink fileutils findlib uri bap-bundle bap-common bap-future dune-site dune-site.plugins diff --git a/lib/bap_powerpc/bap_powerpc_target.ml b/lib/bap_powerpc/bap_powerpc_target.ml index 7ac4e7c94..0d6969f74 100644 --- a/lib/bap_powerpc/bap_powerpc_target.ml +++ b/lib/bap_powerpc/bap_powerpc_target.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std diff --git a/lib/bap_powerpc/dune b/lib/bap_powerpc/dune index cf36170ec..ec12b61c9 100644 --- a/lib/bap_powerpc/dune +++ b/lib/bap_powerpc/dune @@ -3,4 +3,4 @@ (public_name bap-powerpc) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap bap-knowledge bap-core-theory core_kernel ogre)) + (libraries bap bap-knowledge bap-core-theory core ogre)) diff --git a/lib/bap_primus/bap_primus.mli b/lib/bap_primus/bap_primus.mli index 3bdab0a97..d5d0236a9 100644 --- a/lib/bap_primus/bap_primus.mli +++ b/lib/bap_primus/bap_primus.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Regular.Std open Bap.Std @@ -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 @@ -4398,7 +4398,7 @@ text ::= ?any atom that is not recognized as a ? (* undocumented since it is deprecated *) module type Primitives = functor (Machine : Machine.S) -> sig - val defs : unit -> value Machine.t Primitive.t list [@@warning "-D"] + val defs : unit -> value Machine.t Primitive.t list end [@@deprecated "[since 2018-03] use [Closure]"] (** a list of primitives. *) diff --git a/lib/bap_primus/bap_primus_env.ml b/lib/bap_primus/bap_primus_env.ml index 3b1bfbae8..224a55e04 100644 --- a/lib/bap_primus/bap_primus_env.ml +++ b/lib/bap_primus/bap_primus_env.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_primus_types diff --git a/lib/bap_primus/bap_primus_exn.ml b/lib/bap_primus/bap_primus_exn.ml index e9ba04dd9..b443165c7 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"] +open Core 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_generator.ml b/lib/bap_primus/bap_primus_generator.ml index 364c6014e..ba2f76653 100644 --- a/lib/bap_primus/bap_primus_generator.ml +++ b/lib/bap_primus/bap_primus_generator.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus_types @@ -147,7 +147,7 @@ module Make(Machine : Machine) = struct seed } in Machine.Local.put iterators { - iterators = Map.set iters gen.id next; + iterators = Map.set iters ~key:gen.id ~data:next; salt; } >>| fun () -> value @@ -158,13 +158,13 @@ module Make(Machine : Machine) = struct | Const Iter it -> let iter = Iter {it with self = it.seed seed} in Machine.Local.put iterators { - iterators = Map.set iters gen.id iter; + iterators = Map.set iters ~key:gen.id ~data:iter; salt = salt + 1; } >>= fun () -> call gen | Seeded init -> Machine.Local.put iterators { - iterators = Map.set iters gen.id (init seed); + iterators = Map.set iters ~key:gen.id ~data:(init seed); salt; } >>= fun () -> call gen diff --git a/lib/bap_primus/bap_primus_info.ml b/lib/bap_primus/bap_primus_info.ml index 828fe75be..b6e5046a7 100644 --- a/lib/bap_primus/bap_primus_info.ml +++ b/lib/bap_primus/bap_primus_info.ml @@ -1,5 +1,5 @@ open Bap_knowledge -open Core_kernel[@@warning "-D"] +open Core module Name = Knowledge.Name diff --git a/lib/bap_primus/bap_primus_interpreter.ml b/lib/bap_primus/bap_primus_interpreter.ml index 1ac76a3f9..46376676c 100644 --- a/lib/bap_primus/bap_primus_interpreter.ml +++ b/lib/bap_primus/bap_primus_interpreter.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_c.Std @@ -483,7 +483,7 @@ module Make (Machine : Machine) = struct let memory typ name = match typ with | Type.Mem (ks,vs) -> let ks = Size.in_bits ks and vs = Size.in_bits vs in - Primus.Memory.Descriptor.create ks vs name + Primus.Memory.Descriptor.create ~addr_size:ks ~data_size:vs name | _ as t -> failwithf "type error - load from %s:%a" name Type.pps t () let rec memory_of_storage : exp -> _ = function @@ -724,7 +724,7 @@ module Make (Machine : Machine) = struct | Error err -> Machine.raise err | Ok curr -> update_pc t >>= fun () -> - Machine.Local.update state (fun s -> {s with curr}) >>= fun () -> + Machine.Local.update state ~f:(fun s -> {s with curr}) >>= fun () -> enter cls curr t >>= fun () -> f x t >>= fun r -> leave cls curr t >>= fun () -> diff --git a/lib/bap_primus/bap_primus_interpreter.mli b/lib/bap_primus/bap_primus_interpreter.mli index 6087ab1fd..4bbd03cfb 100644 --- a/lib/bap_primus/bap_primus_interpreter.mli +++ b/lib/bap_primus/bap_primus_interpreter.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus_types diff --git a/lib/bap_primus/bap_primus_iterator.ml b/lib/bap_primus/bap_primus_iterator.ml index 61608fdd7..a09b2bfb9 100644 --- a/lib/bap_primus/bap_primus_iterator.ml +++ b/lib/bap_primus/bap_primus_iterator.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module type Base = sig type t diff --git a/lib/bap_primus/bap_primus_iterator.mli b/lib/bap_primus/bap_primus_iterator.mli index c8f212d6b..f538f3b43 100644 --- a/lib/bap_primus/bap_primus_iterator.mli +++ b/lib/bap_primus/bap_primus_iterator.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_primus_generator_types module type Base = Iterator.Base diff --git a/lib/bap_primus/bap_primus_linker.ml b/lib/bap_primus/bap_primus_linker.ml index 1052708b9..841e6ac3d 100644 --- a/lib/bap_primus/bap_primus_linker.ml +++ b/lib/bap_primus/bap_primus_linker.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Regular.Std open Format diff --git a/lib/bap_primus/bap_primus_linker.mli b/lib/bap_primus/bap_primus_linker.mli index 5dde01e2d..1bf9d6204 100644 --- a/lib/bap_primus/bap_primus_linker.mli +++ b/lib/bap_primus/bap_primus_linker.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Regular.Std open Bap_primus_types diff --git a/lib/bap_primus/bap_primus_lisp.ml b/lib/bap_primus/bap_primus_lisp.ml index 3ff7918ba..eef236f59 100644 --- a/lib/bap_primus/bap_primus_lisp.ml +++ b/lib/bap_primus/bap_primus_lisp.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Format @@ -426,7 +426,7 @@ module Interpreter(Machine : Machine) = struct let msg = String.concat contents in Machine.Observation.make new_message msg >>= fun () -> Eval.const Word.b0 in - Machine.Local.update state (fun s -> {s with cur = exp.id}) >>= fun () -> + Machine.Local.update state ~f:(fun s -> {s with cur = exp.id}) >>= fun () -> eval exp let eval_signal name args : unit Machine.t = @@ -772,7 +772,7 @@ module Make(Machine : Machine) = struct proj x >>= Self.eval_signal name) >>= fun sub -> Machine.Local.update state ~f:(fun s -> { s with program = Lisp.Program.add s.program signal r; - signals = Map.add_exn s.signals name sub; + signals = Map.add_exn s.signals ~key:name ~data:sub; }) diff --git a/lib/bap_primus/bap_primus_lisp.mli b/lib/bap_primus/bap_primus_lisp.mli index 0e32320ee..fc66a5703 100644 --- a/lib/bap_primus/bap_primus_lisp.mli +++ b/lib/bap_primus/bap_primus_lisp.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Format open Bap_primus_types diff --git a/lib/bap_primus/bap_primus_lisp_attribute.ml b/lib/bap_primus/bap_primus_lisp_attribute.ml index 9d744239f..571525471 100644 --- a/lib/bap_primus/bap_primus_lisp_attribute.ml +++ b/lib/bap_primus/bap_primus_lisp_attribute.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std @@ -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_attributes.ml b/lib/bap_primus/bap_primus_lisp_attributes.ml index 5ddd88019..7e14a164a 100644 --- a/lib/bap_primus/bap_primus_lisp_attributes.ml +++ b/lib/bap_primus/bap_primus_lisp_attributes.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap.Std diff --git a/lib/bap_primus/bap_primus_lisp_attributes.mli b/lib/bap_primus/bap_primus_lisp_attributes.mli index 2d221350a..29d543514 100644 --- a/lib/bap_primus/bap_primus_lisp_attributes.mli +++ b/lib/bap_primus/bap_primus_lisp_attributes.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_primus_lisp_types diff --git a/lib/bap_primus/bap_primus_lisp_context.ml b/lib/bap_primus/bap_primus_lisp_context.ml index 94cd0c5dd..ec9d7ce2f 100644 --- a/lib/bap_primus/bap_primus_lisp_context.ml +++ b/lib/bap_primus/bap_primus_lisp_context.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std @@ -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_context.mli b/lib/bap_primus/bap_primus_lisp_context.mli index 984ff0e32..91062e7c1 100644 --- a/lib/bap_primus/bap_primus_lisp_context.mli +++ b/lib/bap_primus/bap_primus_lisp_context.mli @@ -234,7 +234,7 @@ that we can use a much more concrete (call-the-advised)). *) -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std diff --git a/lib/bap_primus/bap_primus_lisp_def.ml b/lib/bap_primus/bap_primus_lisp_def.ml index 1f086cd7d..4d7023ea7 100644 --- a/lib/bap_primus/bap_primus_lisp_def.ml +++ b/lib/bap_primus/bap_primus_lisp_def.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Format diff --git a/lib/bap_primus/bap_primus_lisp_index.ml b/lib/bap_primus/bap_primus_lisp_index.ml index 0eea90537..970a796df 100644 --- a/lib/bap_primus/bap_primus_lisp_index.ml +++ b/lib/bap_primus/bap_primus_lisp_index.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module type S = sig type t [@@deriving sexp_of] diff --git a/lib/bap_primus/bap_primus_lisp_index.mli b/lib/bap_primus/bap_primus_lisp_index.mli index da60a61e7..cf1f1a4d4 100644 --- a/lib/bap_primus/bap_primus_lisp_index.mli +++ b/lib/bap_primus/bap_primus_lisp_index.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core type ('a,'i,'e) interned = { data : 'a; diff --git a/lib/bap_primus/bap_primus_lisp_loc.ml b/lib/bap_primus/bap_primus_lisp_loc.ml index fa8abab1c..3e65ef1f0 100644 --- a/lib/bap_primus/bap_primus_lisp_loc.ml +++ b/lib/bap_primus/bap_primus_lisp_loc.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Format type range = Parsexp.Positions.range [@@deriving compare, sexp_of] @@ -37,8 +37,8 @@ let shift_pos p off = Parsexp.Positions.{ let nth_char p off = Parsexp.Positions.{ p with range = { - start_pos = shift_pos p.range.start_pos off; - end_pos = shift_pos p.range.end_pos (off + 1)} + start_pos = shift_pos p.range.start_pos ~cols:off; + end_pos = shift_pos p.range.end_pos ~cols:(off + 1)} } diff --git a/lib/bap_primus/bap_primus_lisp_loc.mli b/lib/bap_primus/bap_primus_lisp_loc.mli index b432cfa78..f000142d8 100644 --- a/lib/bap_primus/bap_primus_lisp_loc.mli +++ b/lib/bap_primus/bap_primus_lisp_loc.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core (* a region in a file *) type range = Parsexp.Positions.range [@@deriving sexp_of] diff --git a/lib/bap_primus/bap_primus_lisp_parse.ml b/lib/bap_primus/bap_primus_lisp_parse.ml index b2084b50c..5f8c0fab0 100644 --- a/lib/bap_primus/bap_primus_lisp_parse.ml +++ b/lib/bap_primus/bap_primus_lisp_parse.ml @@ -1,9 +1,9 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Format open Bap_core_theory -module Sys = Caml.Sys +module Sys = Stdlib.Sys open Bap_primus_lisp_types @@ -660,7 +660,7 @@ module Load = struct match file_of_feature paths name with | None -> raise (Fail (Unresolved_feature (name,pos))) | Some file -> match Source.find p file with - | None -> Map.set required name pos + | None -> Map.set required ~key:name ~data:pos | Some _ -> required)) let transitive_closure paths p = diff --git a/lib/bap_primus/bap_primus_lisp_program.ml b/lib/bap_primus/bap_primus_lisp_program.ml index 71f0b1731..9ca0ec89e 100644 --- a/lib/bap_primus/bap_primus_lisp_program.ml +++ b/lib/bap_primus/bap_primus_lisp_program.ml @@ -1,6 +1,6 @@ open Bap.Std open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Graphlib.Std open Regular.Std open Monads.Std @@ -143,7 +143,7 @@ let (++) : 'a defs -> 'a defs -> 'a defs = fun xs ys -> let add ~key:name ~data:defs init = List.fold defs ~init ~f:(fun (set,defs) def -> if is_presented set def then set,defs - else remember set def, Map.add_multi defs name def) in + else remember set def, Map.add_multi defs ~key:name ~data:def) in let init = Map.empty (module String),nodefs in snd@@Map.fold ys ~f:add ~init:(Map.fold ~init xs ~f:add) @@ -167,7 +167,7 @@ let merge_packages p1 p2 = { } let update_package_documentation prog package docs = { - prog with pkgdocs = Map.set prog.pkgdocs package docs; + prog with pkgdocs = Map.set prog.pkgdocs ~key:package ~data:docs; } let packages {library; pkgdocs} = @@ -249,12 +249,12 @@ let add_to_package (fld : 'a item) x p = let defs = Field.get fld p and name = Def.name x in match Map.find defs name with - | None -> Field.fset fld p (Map.add_multi defs name x) + | None -> Field.fset fld p (Map.add_multi defs ~key:name ~data:x) | Some ds -> if List.exists ds ~f:(fun d -> String.equal name (Def.name d) && Id.equal x.id d.id) then p - else Field.fset fld p (Map.add_multi defs name x) + else Field.fset fld p (Map.add_multi defs ~key:name ~data:x) let is_applicable {context=global} def = let def_ctxt = @@ -320,7 +320,7 @@ module Places = struct Theory.Target.regs t |> Set.to_sequence |> Seq.fold ~init:regs ~f:(fun regs v -> let name = KB.Name.create ~package (Theory.Var.name v) in - Map.set regs name v)) + Map.set regs ~key:name ~data:v)) ~init:(Map.empty (module KB.Name)) @@ -737,7 +737,7 @@ end = struct let repack defs = List.fold defs ~f:(fun defs def -> - Map.add_multi defs (Def.name def) def) + Map.add_multi defs ~key:(Def.name def) ~data:def) ~init:nodefs let package prog macros pkgname = @@ -747,7 +747,7 @@ end = struct { prog with sources; - library = Map.set prog.library pkgname { + library = Map.set prog.library ~key:pkgname ~data:{ pkg with defs = repack defs; mets = repack mets; @@ -763,7 +763,7 @@ end = struct { prog with sources; - library = Map.set prog.library package { + library = Map.set prog.library ~key:package ~data:{ pkg with defs = repack defs; mets = repack mets; @@ -999,10 +999,10 @@ module Typing = struct | Some v -> Map.find g.vals v let add_var x v g = - {g with vars = Map.add_exn g.vars x v} + {g with vars = Map.add_exn g.vars ~key:x ~data:v} let set_var x v g = - {g with vars = Map.set g.vars x v} + {g with vars = Map.set g.vars ~key:x ~data:v} let set_val v t g = {g with vals = Map.set g.vals ~key:v ~data:t} @@ -1056,7 +1056,7 @@ module Typing = struct let g = add_var x u g in {g with vals = match Map.find g1.vals u with | None -> g.vals - | Some t -> Map.set g.vals u t} + | Some t -> Map.set g.vals ~key:u ~data:t} (* merges g2 into g1. @@ -1125,7 +1125,7 @@ module Typing = struct let join_vars vars = let init = Tvar.Map.empty in Map.fold vars ~init ~f:(fun ~key:x ~data:u joined -> - Map.add_multi joined u x) + Map.add_multi joined ~key:u ~data:x) let partition {vars; vals} = join_vars vars |> @@ -1406,7 +1406,7 @@ module Typing = struct | None -> ps | Some types -> let name = KB.Name.create ~package (Def.name def) in - Map.set ps name types) + Map.set ps ~key:name ~data:types) let make_prims program init = @@ -1476,7 +1476,7 @@ module Typing = struct let make_defs = fold_library ~f:(fun ~package {defs} funcs -> fold_multi defs ~init:funcs ~f:(fun funcs def -> let name = KB.Name.read ~package (Def.name def) in - Map.add_multi funcs name def)) + Map.add_multi funcs ~key:name ~data:def)) ~init:empty_names let add_places prog = @@ -1484,14 +1484,14 @@ module Typing = struct let name = KB.Name.read ~package (Def.name place) in let var = Var.reify@@Def.Place.location place in match Var.typ var with - | Type.Imm n -> Map.set vars name n + | Type.Imm n -> Map.set vars ~key:name ~data:n | _ -> vars) ~init:(Map.empty (module KB.Name)) let make_externals = List.fold ~f:(fun exts (n,s) -> let n = KB.Name.create ~package:"external" n in - Map.set exts n s) + Map.set exts ~key:n ~data:s) ~init:(Map.empty (module KB.Name)) let infer externals (p : program) : Gamma.t = diff --git a/lib/bap_primus/bap_primus_lisp_resolve.ml b/lib/bap_primus/bap_primus_lisp_resolve.ml index a5b264574..e4969b407 100644 --- a/lib/bap_primus/bap_primus_lisp_resolve.ml +++ b/lib/bap_primus/bap_primus_lisp_resolve.ml @@ -1,5 +1,5 @@ open Bap.Std -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Format 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..d999db3da 100644 --- a/lib/bap_primus/bap_primus_lisp_semantics.ml +++ b/lib/bap_primus/bap_primus_lisp_semantics.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_core_theory open Monads.Std @@ -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 @@ -171,7 +171,7 @@ let declare please choose a different name for your \ primitive" (KB.Name.show name) (); - Hashtbl.add_exn library name { + Hashtbl.add_exn library ~key:name ~data:{ docs; types; body; @@ -198,7 +198,7 @@ let signal ?params ?(docs="undocumented") property reflect = ] >>= fun () -> KB.collect Theory.Semantics.slot lbl >>| ignore end; - Hashtbl.add_exn library name { + Hashtbl.add_exn library ~key:name ~data:{ docs; types; body=None; @@ -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 @@ -337,7 +337,7 @@ module Env = struct let set v x = State.update @@ fun s -> { s with binds = Map.set s.binds - (Theory.Var.forget v) x + ~key:(Theory.Var.forget v) ~data:x } let del v = @@ -359,7 +359,7 @@ module Env = struct let binds,old = List.fold bs ~init:(s.binds,[]) ~f:(fun (s,old) (v,x) -> let v = var ws v in - Map.set s v x,(v,Map.find s v) :: old) in + Map.set s ~key:v ~data:x,(v,Map.find s v) :: old) in State.set {s with binds} >>| fun () -> List.rev old @@ -367,7 +367,7 @@ module Env = struct s with binds = List.fold bs ~init:s.binds ~f:(fun s (v,x) -> match x with | None -> Map.remove s v - | Some x -> Map.set s v x) + | Some x -> Map.set s ~key:v ~data:x) } end @@ -734,7 +734,7 @@ let collect_names kind key prog = if Program.is_applicable prog def then let name = Def.name def in - Map.set names (KB.Name.create ~package name) kind + Map.set names ~key:(KB.Name.create ~package name) ~data:kind else names) ~init:(Map.empty (module KB.Name)) @@ -765,7 +765,7 @@ let obtain_typed_program unit = let places = Program.fold prog Key.place ~f:(fun ~package place places -> let name = KB.Name.create ~package (Def.name place) in - Map.set places name (Def.Place.location place)) + Map.set places ~key:name ~data:(Def.Place.location place)) ~init:(Map.empty (module KB.Name)) in let names = merge_names [ collect_names Defn Key.func prog; diff --git a/lib/bap_primus/bap_primus_lisp_semantics.mli b/lib/bap_primus/bap_primus_lisp_semantics.mli index 4273f937e..df9504a29 100644 --- a/lib/bap_primus/bap_primus_lisp_semantics.mli +++ b/lib/bap_primus/bap_primus_lisp_semantics.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_primus_lisp_types diff --git a/lib/bap_primus/bap_primus_lisp_source.ml b/lib/bap_primus/bap_primus_lisp_source.ml index 9348466fc..55e2a8e51 100644 --- a/lib/bap_primus/bap_primus_lisp_source.ml +++ b/lib/bap_primus/bap_primus_lisp_source.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Format module Cst = Parsexp.Cst diff --git a/lib/bap_primus/bap_primus_lisp_type.ml b/lib/bap_primus/bap_primus_lisp_type.ml index 8a6d15b45..8908033b9 100644 --- a/lib/bap_primus/bap_primus_lisp_type.ml +++ b/lib/bap_primus/bap_primus_lisp_type.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus_lisp_types diff --git a/lib/bap_primus/bap_primus_lisp_type.mli b/lib/bap_primus/bap_primus_lisp_type.mli index 4adf4f551..3e07ace6d 100644 --- a/lib/bap_primus/bap_primus_lisp_type.mli +++ b/lib/bap_primus/bap_primus_lisp_type.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus_lisp_types diff --git a/lib/bap_primus/bap_primus_lisp_types.ml b/lib/bap_primus/bap_primus_lisp_types.ml index 8c3925ebf..af1f2dab2 100644 --- a/lib/bap_primus/bap_primus_lisp_types.ml +++ b/lib/bap_primus/bap_primus_lisp_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus_sexp open Bap_core_theory diff --git a/lib/bap_primus/bap_primus_lisp_var.ml b/lib/bap_primus/bap_primus_lisp_var.ml index d02b13b04..896fd361a 100644 --- a/lib/bap_primus/bap_primus_lisp_var.ml +++ b/lib/bap_primus/bap_primus_lisp_var.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_primus_lisp_types diff --git a/lib/bap_primus/bap_primus_lisp_var.mli b/lib/bap_primus/bap_primus_lisp_var.mli index a63be3798..a6b5511ad 100644 --- a/lib/bap_primus/bap_primus_lisp_var.mli +++ b/lib/bap_primus/bap_primus_lisp_var.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_primus_lisp_types diff --git a/lib/bap_primus/bap_primus_lisp_word.ml b/lib/bap_primus/bap_primus_lisp_word.ml index cca27ab45..58fe93a2b 100644 --- a/lib/bap_primus/bap_primus_lisp_word.ml +++ b/lib/bap_primus/bap_primus_lisp_word.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_primus_lisp_types module Type = Bap_primus_lisp_type diff --git a/lib/bap_primus/bap_primus_lisp_word.mli b/lib/bap_primus/bap_primus_lisp_word.mli index b7078ec34..8188d3ded 100644 --- a/lib/bap_primus/bap_primus_lisp_word.mli +++ b/lib/bap_primus/bap_primus_lisp_word.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_primus_lisp_types type t = word [@@deriving compare, sexp_of] diff --git a/lib/bap_primus/bap_primus_machine.ml b/lib/bap_primus/bap_primus_machine.ml index b56075581..3a65b43f0 100644 --- a/lib/bap_primus/bap_primus_machine.ml +++ b/lib/bap_primus/bap_primus_machine.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std open Bap_primus_types @@ -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 @@ -149,7 +149,7 @@ module Make(M : Monad.S) = struct let get_global () : _ t = gets (fun s -> s.global) let set_local local = update @@ fun s -> { - s with local = Map.set s.local s.self local + s with local = Map.set s.local ~key:s.self ~data:local } let set_global global = update @@ fun s -> { @@ -262,12 +262,12 @@ module Make(M : Monad.S) = struct local = Map.change s.local child ~f:(fun _ -> Map.find s.local s.self); self = child; - parent = Map.set s.parent child s.self; + parent = Map.set s.parent ~key:child ~data:s.self; } let switch_state self : unit t = update @@ fun s -> {s with self} let store_curr k = update @@ fun s -> { - s with conts = Map.set s.conts s.self k + s with conts = Map.set s.conts ~key:s.self ~data:k } let get_curr = gets @@ fun {conts; self} -> diff --git a/lib/bap_primus/bap_primus_machine.mli b/lib/bap_primus/bap_primus_machine.mli index fa70ebd17..865c84a55 100644 --- a/lib/bap_primus/bap_primus_machine.mli +++ b/lib/bap_primus/bap_primus_machine.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std open Bap_primus_types diff --git a/lib/bap_primus/bap_primus_main.ml b/lib/bap_primus/bap_primus_main.ml index 54c7c0bd4..8959957d3 100644 --- a/lib/bap_primus/bap_primus_main.ml +++ b/lib/bap_primus/bap_primus_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap.Std open Bap_primus_types diff --git a/lib/bap_primus/bap_primus_memory.ml b/lib/bap_primus/bap_primus_memory.ml index ca8de860f..624286ef9 100644 --- a/lib/bap_primus/bap_primus_memory.ml +++ b/lib/bap_primus/bap_primus_memory.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Format @@ -46,7 +46,7 @@ module Descriptor = struct } let unknown ~addr_size ~data_size = - create addr_size data_size "unknown" + create ~addr_size ~data_size "unknown" let name d = d.name let addr_size d = d.addr @@ -127,8 +127,8 @@ let virtual_memory target = let s = Theory.Var.sort mem in let ks = Theory.Mem.keys s and vs = Theory.Mem.vals s in Descriptor.create - (Theory.Bitv.size ks) - (Theory.Bitv.size vs) + ~addr_size:(Theory.Bitv.size ks) + ~data_size:(Theory.Bitv.size vs) (Theory.Var.name mem) let state = Bap_primus_machine.State.declare @@ -255,7 +255,7 @@ module Make(Machine : Machine) = struct let remembered {values; layers} addr word = memory >>= fun {size} -> Machine.gets Project.arch >>= fun arch -> - store_word arch size addr word values >>= fun values -> + store_word arch size ~addr word values >>= fun values -> put_curr {layers; values} >>| fun () -> Map.find_exn values addr diff --git a/lib/bap_primus/bap_primus_memory.mli b/lib/bap_primus/bap_primus_memory.mli index 50eac2a5a..372a00042 100644 --- a/lib/bap_primus/bap_primus_memory.mli +++ b/lib/bap_primus/bap_primus_memory.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus_types diff --git a/lib/bap_primus/bap_primus_observation.ml b/lib/bap_primus/bap_primus_observation.ml index 895654b22..e49f76535 100644 --- a/lib/bap_primus/bap_primus_observation.ml +++ b/lib/bap_primus/bap_primus_observation.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_knowledge open Bap_future.Std @@ -80,10 +80,10 @@ let add_observer observers key obs = register_observer (name key); match Map.find observers key with | None -> - Map.add_exn observers key {last=1; subs=[1,obs]}, + Map.add_exn observers ~key ~data:{last=1; subs=[1,obs]}, Subs (key,1) | Some {last; subs} -> - Map.set observers key { + Map.set observers ~key ~data:{ last = last + 1; subs = (last + 1, obs) :: subs }, diff --git a/lib/bap_primus/bap_primus_observation.mli b/lib/bap_primus/bap_primus_observation.mli index cfe97fd82..eb3279ce9 100644 --- a/lib/bap_primus/bap_primus_observation.mli +++ b/lib/bap_primus/bap_primus_observation.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_future.Std diff --git a/lib/bap_primus/bap_primus_pos.ml b/lib/bap_primus/bap_primus_pos.ml index 4129c6e90..fe252c476 100644 --- a/lib/bap_primus/bap_primus_pos.ml +++ b/lib/bap_primus/bap_primus_pos.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std module Exn = Bap_primus_exn diff --git a/lib/bap_primus/bap_primus_pos.mli b/lib/bap_primus/bap_primus_pos.mli index f27d2c9b0..d02e1e88c 100644 --- a/lib/bap_primus/bap_primus_pos.mli +++ b/lib/bap_primus/bap_primus_pos.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std diff --git a/lib/bap_primus/bap_primus_random.ml b/lib/bap_primus/bap_primus_random.ml index 8401dfee1..80c0af69c 100644 --- a/lib/bap_primus/bap_primus_random.ml +++ b/lib/bap_primus/bap_primus_random.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module Iterator = Bap_primus_iterator module type S = Iterator.Infinite.S @@ -68,7 +68,7 @@ module MCG = struct let noise = Output.size - generators let create seed : t = - Array.init generators (fun salt -> + Array.init generators ~f:(fun salt -> Sub.create (seed + salt)) let next = Array.map ~f:Sub.next diff --git a/lib/bap_primus/bap_primus_sexp.ml b/lib/bap_primus/bap_primus_sexp.ml index 58a3e5af3..943cc410e 100644 --- a/lib/bap_primus/bap_primus_sexp.ml +++ b/lib/bap_primus/bap_primus_sexp.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Format diff --git a/lib/bap_primus/bap_primus_state.ml b/lib/bap_primus/bap_primus_state.ml index 1e235f67b..4dfaaf009 100644 --- a/lib/bap_primus/bap_primus_state.ml +++ b/lib/bap_primus/bap_primus_state.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std module Dict = Univ_map @@ -64,6 +64,6 @@ module Bag = struct { uids = Map.set t.uids ~key:state.uuid ~data:(Key.hash state.key); - dict = Dict.set t.dict state.key data; + dict = Dict.set t.dict ~key:state.key ~data:data; } end diff --git a/lib/bap_primus/bap_primus_state.mli b/lib/bap_primus/bap_primus_state.mli index c2f32b951..de94f6e10 100644 --- a/lib/bap_primus/bap_primus_state.mli +++ b/lib/bap_primus/bap_primus_state.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std type 'a t diff --git a/lib/bap_primus/bap_primus_system.ml b/lib/bap_primus/bap_primus_system.ml index 9c0701cc5..8ba861cd4 100644 --- a/lib/bap_primus/bap_primus_system.ml +++ b/lib/bap_primus/bap_primus_system.ml @@ -1,7 +1,7 @@ open Bap.Std open Bap_primus_types open Bap_knowledge -open Core_kernel[@@warning "-D"] +open Core module Name = Knowledge.Name module Info = Bap_primus_info @@ -43,7 +43,7 @@ module Repository = struct if Hashtbl.mem self sys.name then invalid_argf "System named %s is already present in the repository" (Name.show sys.name) (); - Hashtbl.add_exn self sys.name sys + Hashtbl.add_exn self ~key:sys.name ~data:sys let require name = match Hashtbl.find self name with @@ -57,7 +57,7 @@ module Repository = struct let update ?package name ~f = let name = Name.create ?package name in - Hashtbl.set self name (f (require name)) + Hashtbl.set self ~key:name ~data:(f (require name)) let list () = Hashtbl.data self |> List.map ~f:(fun {desc; name} -> @@ -120,7 +120,7 @@ module Components = struct then invalid_argf "A %s component named %s is already registered, \ please choose a unique name" ns (Name.show name) (); - Hashtbl.add_exn table name {init; desc; hide=internal} + Hashtbl.add_exn table ~key:name ~data:{init; desc; hide=internal} let register_generic = add_component "generic" generics diff --git a/lib/bap_primus/bap_primus_types.ml b/lib/bap_primus/bap_primus_types.ml index 0b566ce47..24840dc76 100644 --- a/lib/bap_primus/bap_primus_types.ml +++ b/lib/bap_primus/bap_primus_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std @@ -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/bap_primus_value.ml b/lib/bap_primus/bap_primus_value.ml index 7057abd03..1db75ce1e 100644 --- a/lib/bap_primus/bap_primus_value.ml +++ b/lib/bap_primus/bap_primus_value.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Bap_strings.Std diff --git a/lib/bap_primus/bap_primus_value.mli b/lib/bap_primus/bap_primus_value.mli index bad86a696..d4f3db623 100644 --- a/lib/bap_primus/bap_primus_value.mli +++ b/lib/bap_primus/bap_primus_value.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Bap_strings.Std diff --git a/lib/bap_primus/dune b/lib/bap_primus/dune index b4df0a7d9..d57a6fcdc 100644 --- a/lib/bap_primus/dune +++ b/lib/bap_primus/dune @@ -13,7 +13,7 @@ bap-strings bitvec bitvec-binprot - core_kernel + core graphlib monads parsexp diff --git a/lib/bap_primus_machine/bap_primus_machine.ml b/lib/bap_primus_machine/bap_primus_machine.ml index f4b300176..c101963b5 100644 --- a/lib/bap_primus_machine/bap_primus_machine.ml +++ b/lib/bap_primus_machine/bap_primus_machine.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Bap_knowledge @@ -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_primus_machine/bap_primus_machine.mli b/lib/bap_primus_machine/bap_primus_machine.mli index c0e39ccaf..8b1d69d60 100644 --- a/lib/bap_primus_machine/bap_primus_machine.mli +++ b/lib/bap_primus_machine/bap_primus_machine.mli @@ -1,6 +1,6 @@ (* Not yet released. - open Core_kernel[@@warning "-D"] + open Core open Monads.Std open Bap_knowledge diff --git a/lib/bap_primus_track_visited/bap_primus_track_visited.ml b/lib/bap_primus_track_visited/bap_primus_track_visited.ml index 9e2264aa1..39727484e 100644 --- a/lib/bap_primus_track_visited/bap_primus_track_visited.ml +++ b/lib/bap_primus_track_visited/bap_primus_track_visited.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus.Std diff --git a/lib/bap_primus_track_visited/dune b/lib/bap_primus_track_visited/dune index 3ee82aea7..23c852e31 100644 --- a/lib/bap_primus_track_visited/dune +++ b/lib/bap_primus_track_visited/dune @@ -3,4 +3,4 @@ (public_name bap-primus-track-visited) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap bap-primus core_kernel)) + (libraries bap bap-primus core)) 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_riscv/bap_riscv_target.ml b/lib/bap_riscv/bap_riscv_target.ml index 920255c5b..00370e045 100644 --- a/lib/bap_riscv/bap_riscv_target.ml +++ b/lib/bap_riscv/bap_riscv_target.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory let package = "bap" diff --git a/lib/bap_riscv/dune b/lib/bap_riscv/dune index 6d0c74eab..22122c7c0 100644 --- a/lib/bap_riscv/dune +++ b/lib/bap_riscv/dune @@ -3,4 +3,4 @@ (public_name bap-riscv) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap-core-theory bap-knowledge core_kernel )) + (libraries bap-core-theory bap-knowledge core )) diff --git a/lib/bap_sema/bap_sema.ml b/lib/bap_sema/bap_sema.ml index 8fbe3580c..b1547daf0 100644 --- a/lib/bap_sema/bap_sema.ml +++ b/lib/bap_sema/bap_sema.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Graphlib.Std open Bap_disasm_std diff --git a/lib/bap_sema/bap_sema_flatten.ml b/lib/bap_sema/bap_sema_flatten.ml index 17a5e0404..5b0b55610 100644 --- a/lib/bap_sema/bap_sema_flatten.ml +++ b/lib/bap_sema/bap_sema_flatten.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_ir open Bap_core_theory diff --git a/lib/bap_sema/bap_sema_free_vars.ml b/lib/bap_sema/bap_sema_free_vars.ml index a391c49fe..6082245c8 100644 --- a/lib/bap_sema/bap_sema_free_vars.ml +++ b/lib/bap_sema/bap_sema_free_vars.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Graphlib.Std open Bap_ir @@ -46,7 +46,7 @@ module Live = struct let block_transitions sub = Term.enum blk_t sub |> Seq.fold ~init:Tid.Map.empty ~f:(fun fs blk -> - Map.add_exn fs (Term.tid blk) { + Map.add_exn fs ~key:(Term.tid blk) ~data:{ defs = blk_defs blk; uses = Ir_blk.free_vars blk; }) |> fun trans -> diff --git a/lib/bap_sema/bap_sema_lift.ml b/lib/bap_sema/bap_sema_lift.ml index bc5c85ed4..0f2ebbb45 100644 --- a/lib/bap_sema/bap_sema_lift.ml +++ b/lib/bap_sema/bap_sema_lift.ml @@ -1,6 +1,6 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Graphlib.Std open Bap_image_std diff --git a/lib/bap_sema/bap_sema_lift.mli b/lib/bap_sema/bap_sema_lift.mli index 6dbf89e16..b948de1ae 100644 --- a/lib/bap_sema/bap_sema_lift.mli +++ b/lib/bap_sema/bap_sema_lift.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Bap_image_std open Bap_disasm_std diff --git a/lib/bap_sema/bap_sema_ssa.ml b/lib/bap_sema/bap_sema_ssa.ml index e025f6cc0..a90350123 100644 --- a/lib/bap_sema/bap_sema_ssa.ml +++ b/lib/bap_sema/bap_sema_ssa.ml @@ -12,7 +12,7 @@ Basically they describe the same algorithm but in different flavors and levels of detail. *) -open Core_kernel[@@warning "-D"] +open Core open Bap_types.Std open Graphlib.Std open Format @@ -112,7 +112,7 @@ let rename t = | None | Some [] -> v | Some (v :: _) -> v in let new_name x = - Hashtbl.change nums x (function + Hashtbl.change nums x ~f:(function | None -> Some 1 | Some x -> Some (x + 1)); let n = Hashtbl.find_exn nums x in @@ -137,7 +137,7 @@ let rename t = Ir_phi.update phi tid (Bil.var (top v)) | _ -> phi)) in let pop_defs blk = - let pop v = Hashtbl.change vars (Var.base v) (function + let pop v = Hashtbl.change vars (Var.base v) ~f:(function | Some (_::xs) -> Some xs | xs -> xs) in Term.enum phi_t blk |> diff --git a/lib/bap_sema/bap_sema_taint.ml b/lib/bap_sema/bap_sema_taint.ml index b393975e7..8cd9f7575 100644 --- a/lib/bap_sema/bap_sema_taint.ml +++ b/lib/bap_sema/bap_sema_taint.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Bap_types.Std open Regular.Std @@ -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_sema/dune b/lib/bap_sema/dune index dc1b44259..be90b605c 100644 --- a/lib/bap_sema/dune +++ b/lib/bap_sema/dune @@ -9,7 +9,7 @@ bap_image bap-knowledge bap_types - core_kernel + core graphlib monads regular)) \ No newline at end of file diff --git a/lib/bap_strings/bap_strings_detector.ml b/lib/bap_strings/bap_strings_detector.ml index d769e99e3..96174b3d9 100644 --- a/lib/bap_strings/bap_strings_detector.ml +++ b/lib/bap_strings/bap_strings_detector.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Format type stage = Working | Accepted | Finished [@@deriving equal] @@ -111,8 +111,8 @@ let abort t = 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))) + let t = step t x c in + 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_detector.mli b/lib/bap_strings/bap_strings_detector.mli index 876b40080..3c51df5cf 100644 --- a/lib/bap_strings/bap_strings_detector.mli +++ b/lib/bap_strings/bap_strings_detector.mli @@ -47,7 +47,7 @@ *) -open Core_kernel[@@warning "-D"] +open Core open Format diff --git a/lib/bap_strings/bap_strings_index.ml b/lib/bap_strings/bap_strings_index.ml index dcc7cfb0d..890f2afd8 100644 --- a/lib/bap_strings/bap_strings_index.ml +++ b/lib/bap_strings/bap_strings_index.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module type Key = sig diff --git a/lib/bap_strings/bap_strings_scanner.ml b/lib/bap_strings/bap_strings_scanner.ml index a35450c15..8bdacca7e 100644 --- a/lib/bap_strings/bap_strings_scanner.ml +++ b/lib/bap_strings/bap_strings_scanner.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module Seq = Sequence @@ -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_strings/bap_strings_scanner.mli b/lib/bap_strings/bap_strings_scanner.mli index 064af06a7..f925ab4b7 100644 --- a/lib/bap_strings/bap_strings_scanner.mli +++ b/lib/bap_strings/bap_strings_scanner.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core (** [next ~is_stop ~read off] reads characters starting with the diff --git a/lib/bap_strings/bap_strings_unscrambler.ml b/lib/bap_strings/bap_strings_unscrambler.ml index 5aefed61a..93f94a382 100644 --- a/lib/bap_strings/bap_strings_unscrambler.ml +++ b/lib/bap_strings/bap_strings_unscrambler.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Format module type Alphabet = sig diff --git a/lib/bap_strings/bap_strings_unscrambler.mli b/lib/bap_strings/bap_strings_unscrambler.mli index 1667019eb..bc5068330 100644 --- a/lib/bap_strings/bap_strings_unscrambler.mli +++ b/lib/bap_strings/bap_strings_unscrambler.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core (** symbol encoding *) module type Alphabet = sig diff --git a/lib/bap_strings/dune b/lib/bap_strings/dune index c8d6a9e5b..9b77370c3 100644 --- a/lib/bap_strings/dune +++ b/lib/bap_strings/dune @@ -3,4 +3,4 @@ (public_name bap-strings) (preprocess (pps ppx_bap)) (wrapped false) - (libraries core_kernel)) \ No newline at end of file + (libraries core)) \ No newline at end of file diff --git a/lib/bap_systemz/bap_systemz_target.ml b/lib/bap_systemz/bap_systemz_target.ml index cb043712a..8465974d0 100644 --- a/lib/bap_systemz/bap_systemz_target.ml +++ b/lib/bap_systemz/bap_systemz_target.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory let package = "bap" diff --git a/lib/bap_systemz/dune b/lib/bap_systemz/dune index 08de847f6..ef5d84491 100644 --- a/lib/bap_systemz/dune +++ b/lib/bap_systemz/dune @@ -2,4 +2,4 @@ (name bap_systemz) (public_name bap-systemz) (wrapped false) - (libraries bap-core-theory bap-knowledge core_kernel)) + (libraries bap-core-theory bap-knowledge core)) diff --git a/lib/bap_taint/bap_taint.ml b/lib/bap_taint/bap_taint.ml index 5396b9412..b9b8055ce 100644 --- a/lib/bap_taint/bap_taint.ml +++ b/lib/bap_taint/bap_taint.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus.Std open Monads.Std diff --git a/lib/bap_taint/bap_taint.mli b/lib/bap_taint/bap_taint.mli index bbbcfbe91..5562ea58b 100644 --- a/lib/bap_taint/bap_taint.mli +++ b/lib/bap_taint/bap_taint.mli @@ -55,7 +55,7 @@ *) -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus.Std diff --git a/lib/bap_taint/dune b/lib/bap_taint/dune index 9a27edffd..b4bdb4c36 100644 --- a/lib/bap_taint/dune +++ b/lib/bap_taint/dune @@ -3,4 +3,4 @@ (public_name bap-taint) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap bap-primus bap-strings core_kernel monads regular)) + (libraries bap bap-primus bap-strings core monads regular)) diff --git a/lib/bap_traces/bap_trace.ml b/lib/bap_traces/bap_trace.ml index 4e2c76596..561b5d0f1 100644 --- a/lib/bap_traces/bap_trace.ml +++ b/lib/bap_traces/bap_trace.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Result.Monad_infix open Bap.Std @@ -82,7 +82,7 @@ let protos : (module P) Tab.t = mk_tab () let readers: (Uri.t -> id -> (reader, io_error) Result.t) Tab.t = mk_tab () let writers: (Uri.t -> t -> (unit, io_error) Result.t) Tab.t = mk_tab () -let make_id () = Bap_trace_id.v `V4 +let make_id () = Bap_trace_id.v4_gen (Stdlib.Random.State.make_self_init ()) () let make_error (#error as r) = Error r @@ -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 { state = (); value = e } 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 { state = (); value = e }) let read_all t tag = read_events t |> Seq.filter_map ~f:(Value.get tag) diff --git a/lib/bap_traces/bap_trace.mli b/lib/bap_traces/bap_trace.mli index 6aacd444d..83c1fcf8d 100644 --- a/lib/bap_traces/bap_trace.mli +++ b/lib/bap_traces/bap_trace.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std diff --git a/lib/bap_traces/bap_trace_binprot.ml b/lib/bap_traces/bap_trace_binprot.ml index d45a309cf..a9c8d7d70 100644 --- a/lib/bap_traces/bap_trace_binprot.ml +++ b/lib/bap_traces/bap_trace_binprot.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Result.Monad_infix diff --git a/lib/bap_traces/bap_trace_event_types.ml b/lib/bap_traces/bap_trace_event_types.ml index ad0fcaacc..8f4c5eca2 100644 --- a/lib/bap_traces/bap_trace_event_types.ml +++ b/lib/bap_traces/bap_trace_event_types.ml @@ -1,5 +1,5 @@ open Bap.Std -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap_core_theory diff --git a/lib/bap_traces/bap_trace_events.ml b/lib/bap_traces/bap_trace_events.ml index a01493205..b6cccc52e 100644 --- a/lib/bap_traces/bap_trace_events.ml +++ b/lib/bap_traces/bap_trace_events.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Bap_trace_event_types diff --git a/lib/bap_traces/bap_trace_id.ml b/lib/bap_traces/bap_trace_id.ml index d66758c21..a332c6d7e 100644 --- a/lib/bap_traces/bap_trace_id.ml +++ b/lib/bap_traces/bap_trace_id.ml @@ -1,16 +1,17 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std -module Bin = Bin_prot.Utils.Make_binable(struct +module Bin = Bin_prot.Utils.Make_binable_with_uuid(struct module Binable = String type t = Uuidm.t - let to_binable = Uuidm.to_bytes - let of_binable s = match Uuidm.of_bytes s with + let to_binable = Uuidm.to_binary_string + let of_binable s = match Uuidm.of_binary_string s with | None -> invalid_arg "Bad UUID format" | Some uuid -> uuid + let caller_identity = Bin_shape.Uuid.of_string "82c292b4-04e0-4f92-957b-3755d74d5794" end) -[@@warning "-D"] + module Stringable = struct type t = Uuidm.t @@ -33,7 +34,7 @@ include Regular.Make(struct let module_name = None let version = "1.0.0" - let pp ppf t = Uuidm.print ppf t[@@warning "-D"] + let pp ppf t = Uuidm.pp ppf t end) let of_string = Stringable.of_string diff --git a/lib/bap_traces/bap_trace_id.mli b/lib/bap_traces/bap_trace_id.mli index bc7283dd1..92cb1dae8 100644 --- a/lib/bap_traces/bap_trace_id.mli +++ b/lib/bap_traces/bap_trace_id.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std diff --git a/lib/bap_traces/bap_trace_meta.ml b/lib/bap_traces/bap_trace_meta.ml index eaf58d29e..9094132ef 100644 --- a/lib/bap_traces/bap_trace_meta.ml +++ b/lib/bap_traces/bap_trace_meta.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Format @@ -36,10 +36,10 @@ end let byte2hexchar = "0123456789abcdef" let hexstring_of_bytestring str = - String.init (String.length str * 2) (fun dstix -> + String.init (String.length str * 2) ~f:(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_traces/bap_trace_meta_types.ml b/lib/bap_traces/bap_trace_meta_types.ml index 7f2a31994..cd4412e98 100644 --- a/lib/bap_traces/bap_trace_meta_types.ml +++ b/lib/bap_traces/bap_trace_meta_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std module Tracer = struct diff --git a/lib/bap_traces/bap_trace_traces.ml b/lib/bap_traces/bap_trace_traces.ml index 78189876f..7de56029f 100644 --- a/lib/bap_traces/bap_trace_traces.ml +++ b/lib/bap_traces/bap_trace_traces.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module Trace = Bap_trace diff --git a/lib/bap_traces/bap_trace_traces.mli b/lib/bap_traces/bap_trace_traces.mli index acdf31752..6c2c65543 100644 --- a/lib/bap_traces/bap_trace_traces.mli +++ b/lib/bap_traces/bap_trace_traces.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core val to_list : unit -> Bap_trace.t list val enum : unit -> Bap_trace.t Sequence.t val add : Bap_trace.t -> unit diff --git a/lib/bap_traces/bap_traces.mli b/lib/bap_traces/bap_traces.mli index 947506a7f..6af0682db 100644 --- a/lib/bap_traces/bap_traces.mli +++ b/lib/bap_traces/bap_traces.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Bap_knowledge diff --git a/lib/bap_traces/dune b/lib/bap_traces/dune index c9bee6954..969095f36 100644 --- a/lib/bap_traces/dune +++ b/lib/bap_traces/dune @@ -7,8 +7,7 @@ bap bap-core-theory bap-knowledge - core_kernel - core_kernel.caml_unix + core regular uri uuidm)) diff --git a/lib/bap_types/bap_addr.ml b/lib/bap_types/bap_addr.ml index ddea23dd1..e43a57a8e 100644 --- a/lib/bap_types/bap_addr.ml +++ b/lib/bap_types/bap_addr.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_common_types diff --git a/lib/bap_types/bap_addr.mli b/lib/bap_types/bap_addr.mli index a18c783d2..05d6aa404 100644 --- a/lib/bap_types/bap_addr.mli +++ b/lib/bap_types/bap_addr.mli @@ -8,7 +8,7 @@ representation of an address. *) -open Core_kernel[@@warning "-D"] +open Core open Bap_common_types val memref : ?disp:int -> ?index:int -> ?scale:size -> addr -> addr diff --git a/lib/bap_types/bap_arch.ml b/lib/bap_types/bap_arch.ml index 56445c0dd..d8b74df72 100644 --- a/lib/bap_types/bap_arch.ml +++ b/lib/bap_types/bap_arch.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std open Bap_common_types diff --git a/lib/bap_types/bap_arch.mli b/lib/bap_types/bap_arch.mli index 87afeda59..be1fb4141 100644 --- a/lib/bap_types/bap_arch.mli +++ b/lib/bap_types/bap_arch.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std open Bap_common_types diff --git a/lib/bap_types/bap_attributes.ml b/lib/bap_types/bap_attributes.ml index 9600160d4..f1afa8a77 100644 --- a/lib/bap_types/bap_attributes.ml +++ b/lib/bap_types/bap_attributes.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_value.Tag diff --git a/lib/bap_types/bap_bil.ml b/lib/bap_types/bap_bil.ml index d746166bc..1bda5d366 100644 --- a/lib/bap_types/bap_bil.ml +++ b/lib/bap_types/bap_bil.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_common_types diff --git a/lib/bap_types/bap_bil_adt.ml b/lib/bap_types/bap_bil_adt.ml index b34aed93f..5df84c9d7 100644 --- a/lib/bap_types/bap_bil_adt.ml +++ b/lib/bap_types/bap_bil_adt.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_common_types open Bap_bil diff --git a/lib/bap_types/bap_bil_adt.mli b/lib/bap_types/bap_bil_adt.mli index ad9ee5af1..dff541eb1 100644 --- a/lib/bap_types/bap_bil_adt.mli +++ b/lib/bap_types/bap_bil_adt.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_common_types open Bap_bil open Format diff --git a/lib/bap_types/bap_bil_optimizations.ml b/lib/bap_types/bap_bil_optimizations.ml index 4adfd1a59..fe1b872aa 100644 --- a/lib/bap_types/bap_bil_optimizations.ml +++ b/lib/bap_types/bap_bil_optimizations.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Bap_common_types open Bap_bil @@ -57,7 +57,7 @@ module Propagate(SM : Monad.State.S2) = struct method update const v : unit r = SM.get () >>= fun ctxt -> - SM.put (update ctxt v const) + SM.put (update ctxt ~key:v ~data:const) method private update_var v e = let const = match e with @@ -77,13 +77,13 @@ module Propagate(SM : Monad.State.S2) = struct method eval_load ~mem ~addr e s = self#eval_exp mem >>= fun mem -> self#eval_exp addr >>= fun addr -> - SM.return (load mem addr e s) + SM.return (load ~mem ~addr e s) method eval_store ~mem ~addr data e s = self#eval_exp mem >>= fun mem -> self#eval_exp addr >>= fun addr -> self#eval_exp data >>= fun data -> - SM.return (store mem addr data e s) + SM.return (store ~mem ~addr data e s) method eval_unop op e = self#eval_exp e >>= fun e -> @@ -115,11 +115,11 @@ module Propagate(SM : Monad.State.S2) = struct self#eval_exp cond >>= fun cond -> self#eval_exp yes >>= fun yes -> self#eval_exp no >>= fun no -> - SM.return (ite cond yes no) + SM.return (ite ~if_:cond ~then_:yes ~else_:no) method eval_extract hi lo e = self#eval_exp e >>= fun e -> - SM.return (extract hi lo e) + SM.return (extract ~hi ~lo e) method eval_concat x y = self#eval_exp x >>= fun x -> diff --git a/lib/bap_types/bap_bil_pass.ml b/lib/bap_types/bap_bil_pass.ml index 6aafb8e3b..1a665058e 100644 --- a/lib/bap_types/bap_bil_pass.ml +++ b/lib/bap_types/bap_bil_pass.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_bil @@ -14,7 +14,7 @@ let selected : (bil -> bil) list ref = ref [] let register_pass ?(desc="No description provided") name body = let pass = {name;desc;body} in - Hashtbl.set passes name pass; + Hashtbl.set passes ~key:name ~data:pass; pass let select_passes ps = selected := List.map ps ~f:(fun x -> x.body) diff --git a/lib/bap_types/bap_bili.ml b/lib/bap_types/bap_bili.ml index 36e64413a..a6fe9fe6c 100644 --- a/lib/bap_types/bap_bili.ml +++ b/lib/bap_types/bap_bili.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Bap_common_types open Bap_bil @@ -70,7 +70,7 @@ module Make(SM : Monad.State.S2) = struct if Bitvector.(r = b0) then return () else if Bitvector.(r = b1) then self#eval body >>= fun () -> self#eval_while ~cond ~body - else self#type_error' @@ TE.bad_type bool_t (imm_t r) + else self#type_error' @@ TE.bad_type ~exp:bool_t ~got:(imm_t r) method eval_if ~cond ~yes ~no : 'a u = self#eval_exp cond >>| value >>= function @@ -79,7 +79,7 @@ module Make(SM : Monad.State.S2) = struct | Imm r -> if Bitvector.(r = b0) then self#eval no else if Bitvector.(r = b1) then self#eval yes - else self#type_error' @@ TE.bad_type bool_t (imm_t r) + else self#type_error' @@ TE.bad_type ~exp:bool_t ~got:(imm_t r) end end diff --git a/lib/bap_types/bap_biri.ml b/lib/bap_types/bap_biri.ml index 2fa70f747..5293bca67 100644 --- a/lib/bap_types/bap_biri.ml +++ b/lib/bap_types/bap_biri.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Bap_common_types open Bap_bil diff --git a/lib/bap_types/bap_biri.mli b/lib/bap_types/bap_biri.mli index 80183b341..3b014d536 100644 --- a/lib/bap_types/bap_biri.mli +++ b/lib/bap_types/bap_biri.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Bap_result open Bap_ir diff --git a/lib/bap_types/bap_bitvector.ml b/lib/bap_types/bap_bitvector.ml index bf6f9f28b..aa87e1676 100644 --- a/lib/bap_types/bap_bitvector.ml +++ b/lib/bap_types/bap_bitvector.ml @@ -1,5 +1,5 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Or_error open Format @@ -133,9 +133,10 @@ end = struct type t = packed let to_string {packed} = Z.to_bits packed let of_string s = {packed = Z.of_bits s} + let caller_identity = Bin_shape.Uuid.of_string "18adbffd-ea55-4ff0-a377-0a7dbe15d1b1" end - include Binable.Of_stringable(Stringable) [@@warning "-D"] + include Binable.Of_stringable_with_uuid(Stringable) include Sexpable.Of_stringable(Stringable) end @@ -684,14 +685,15 @@ let zero = Cons.zero (* old representation for backward compatibility. *) module V1 = struct module Bignum = struct - module Repr : Stringable with type t = Z.t = struct + module Repr = struct type t = Z.t let to_string z = sprintf "0x%s" (Z.format "%X" z) let of_string = Z.of_string + let caller_identity = Bin_shape.Uuid.of_string "32e96b23-cfee-470e-a99a-1be199b301d3" end include Z include Sexpable.Of_stringable(Repr) - include Binable.Of_stringable(Repr) [@@warning "-D"] + include Binable.Of_stringable_with_uuid(Repr) end type t = { @@ -717,11 +719,12 @@ module Stable = struct signed = is_signed x; } - include Binable.Of_binable(V1)(struct + include Binable.Of_binable_with_uuid(V1)(struct type t = Packed.t let to_binable = to_legacy let of_binable = of_legacy - end) [@@warning "-D"] + let caller_identity = Bin_shape.Uuid.of_string "1d938f5b-1fe7-4db4-97ec-d4de3a8e29da" + end) include Sexpable.Of_sexpable(V1)(struct type t = Packed.t diff --git a/lib/bap_types/bap_bitvector.mli b/lib/bap_types/bap_bitvector.mli index ae18ebc00..fdf04e4fe 100644 --- a/lib/bap_types/bap_bitvector.mli +++ b/lib/bap_types/bap_bitvector.mli @@ -1,5 +1,5 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Format diff --git a/lib/bap_types/bap_common_types.ml b/lib/bap_types/bap_common_types.ml index b63c9523d..040e0b7dc 100644 --- a/lib/bap_types/bap_common_types.ml +++ b/lib/bap_types/bap_common_types.ml @@ -3,7 +3,7 @@ In this module basic types are defined, and it can be considered as an internal [Std] module, that should be included most modules, internal to the library. *) -open Core_kernel[@@warning "-D"] +open Core open Regular.Std (** {2 Basic modules} diff --git a/lib/bap_types/bap_context.ml b/lib/bap_types/bap_context.ml index 83c4f8bc3..7509299b8 100644 --- a/lib/bap_types/bap_context.ml +++ b/lib/bap_types/bap_context.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_result open Bap_common_types open Bap_bil diff --git a/lib/bap_types/bap_context.mli b/lib/bap_types/bap_context.mli index 9d438e80c..f14c298af 100644 --- a/lib/bap_types/bap_context.mli +++ b/lib/bap_types/bap_context.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_result open Bap_common_types open Bap_bil diff --git a/lib/bap_types/bap_core_theory_bil_parser.ml b/lib/bap_types/bap_core_theory_bil_parser.ml index f80c55ba3..b6421e72f 100644 --- a/lib/bap_types/bap_core_theory_bil_parser.ml +++ b/lib/bap_types/bap_core_theory_bil_parser.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Theory.Parser diff --git a/lib/bap_types/bap_eval.ml b/lib/bap_types/bap_eval.ml index e0fbd3982..b6586d1ca 100644 --- a/lib/bap_types/bap_eval.ml +++ b/lib/bap_types/bap_eval.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Regular.Std open Bap_common_types @@ -168,7 +168,7 @@ module Make2(State : Monad.S2) = struct then self#eval t else if Bitvector.(u = b0) then self#eval f - else self#type_error @@ TE.bad_type bool_t (imm_t u) + else self#type_error @@ TE.bad_type ~exp:bool_t ~got:(imm_t u) method eval_extract hi lo w = self#eval_imm w >>= function diff --git a/lib/bap_types/bap_eval_types.ml b/lib/bap_types/bap_eval_types.ml index 138b3b734..b7f07eaab 100644 --- a/lib/bap_types/bap_eval_types.ml +++ b/lib/bap_types/bap_eval_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Bap_common_types open Bap_result diff --git a/lib/bap_types/bap_exp.ml b/lib/bap_types/bap_exp.ml index 06fb03f8f..61235f910 100644 --- a/lib/bap_types/bap_exp.ml +++ b/lib/bap_types/bap_exp.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_knowledge open Bap_core_theory diff --git a/lib/bap_types/bap_exp.mli b/lib/bap_types/bap_exp.mli index efc068d84..d8df87873 100644 --- a/lib/bap_types/bap_exp.mli +++ b/lib/bap_types/bap_exp.mli @@ -1,5 +1,5 @@ (** Extends [exp] interface. *) -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std open Bap_knowledge diff --git a/lib/bap_types/bap_expi.ml b/lib/bap_types/bap_expi.ml index 84b2787bd..0c4dded7e 100644 --- a/lib/bap_types/bap_expi.ml +++ b/lib/bap_types/bap_expi.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Bap_result open Bap_expi_types diff --git a/lib/bap_types/bap_expi.mli b/lib/bap_types/bap_expi.mli index e2992f37d..ea5e91a71 100644 --- a/lib/bap_types/bap_expi.mli +++ b/lib/bap_types/bap_expi.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Bap_common_types open Bap_bil diff --git a/lib/bap_types/bap_expi_types.ml b/lib/bap_types/bap_expi_types.ml index 574c00c1e..5064605d3 100644 --- a/lib/bap_types/bap_expi_types.ml +++ b/lib/bap_types/bap_expi_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_result open Bap_common_types open Bap_bil diff --git a/lib/bap_types/bap_helpers.ml b/lib/bap_types/bap_helpers.ml index 0e4a813b7..5a493a870 100644 --- a/lib/bap_types/bap_helpers.ml +++ b/lib/bap_types/bap_helpers.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Bap_common_types open Bap_bil @@ -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_helpers.mli b/lib/bap_types/bap_helpers.mli index a6b16553b..c685d2127 100644 --- a/lib/bap_types/bap_helpers.mli +++ b/lib/bap_types/bap_helpers.mli @@ -1,5 +1,5 @@ (** BIL high level functions. *) -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_common_types open Bap_bil diff --git a/lib/bap_types/bap_int_conversions.ml b/lib/bap_types/bap_int_conversions.ml index bd97fb27b..7a8a10fae 100644 --- a/lib/bap_types/bap_int_conversions.ml +++ b/lib/bap_types/bap_int_conversions.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Or_error diff --git a/lib/bap_types/bap_int_conversions.mli b/lib/bap_types/bap_int_conversions.mli index 003203b7b..bb62a254a 100644 --- a/lib/bap_types/bap_int_conversions.mli +++ b/lib/bap_types/bap_int_conversions.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core val int_of_int32 : int32 -> int Or_error.t val int_of_int64 : int64 -> int Or_error.t diff --git a/lib/bap_types/bap_integer.ml b/lib/bap_types/bap_integer.ml index 52cde0c6d..a04a5da45 100644 --- a/lib/bap_types/bap_integer.ml +++ b/lib/bap_types/bap_integer.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_integer_intf module type Base = Base diff --git a/lib/bap_types/bap_interval_tree.ml b/lib/bap_types/bap_interval_tree.ml index 26f902bb2..93a1513fe 100644 --- a/lib/bap_types/bap_interval_tree.ml +++ b/lib/bap_types/bap_interval_tree.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Option.Monad_infix module Seq = Sequence @@ -281,7 +281,7 @@ module Make(Interval : Interval) = struct start |> go |> run (* we do not use include Container.Make(...) per the jane street *) - (* `core_kernel` `container.ml` best practice documentation *) + (* `core` `container.ml` best practice documentation *) module C = Container.Make( struct type 'a t = 'a node option diff --git a/lib/bap_types/bap_interval_tree.mli b/lib/bap_types/bap_interval_tree.mli index 3c9c94126..ec196b941 100644 --- a/lib/bap_types/bap_interval_tree.mli +++ b/lib/bap_types/bap_interval_tree.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module type Interval = sig type t [@@deriving compare, sexp_of] diff --git a/lib/bap_types/bap_ir.ml b/lib/bap_types/bap_ir.ml index d17fbb7ba..a6e85aa70 100644 --- a/lib/bap_types/bap_ir.ml +++ b/lib/bap_types/bap_ir.ml @@ -1,6 +1,6 @@ let package = "bap" -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std open Bap_common_types @@ -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,8 +500,8 @@ 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 ()) -[@@warning "-D"] (* for open and close tag *) + Seq.iter attrs ~f:(fun _ -> pp_close_stag ppf ()) + (* for open and close tag *) let pp_value slots ppf x = match slots with @@ -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 ~f:(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_ir.mli b/lib/bap_types/bap_ir.mli index 7641e809a..a2b7458c5 100644 --- a/lib/bap_types/bap_ir.mli +++ b/lib/bap_types/bap_ir.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_core_theory open Bap_common_types diff --git a/lib/bap_types/bap_ir_callgraph.ml b/lib/bap_types/bap_ir_callgraph.ml index ed0e5b626..7d612b926 100644 --- a/lib/bap_types/bap_ir_callgraph.ml +++ b/lib/bap_types/bap_ir_callgraph.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Graphlib.Std open Bap_ir diff --git a/lib/bap_types/bap_ir_graph.ml b/lib/bap_types/bap_ir_graph.ml index bb8117ba4..9c2528a68 100644 --- a/lib/bap_types/bap_ir_graph.ml +++ b/lib/bap_types/bap_ir_graph.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Graphlib.Std open Option.Monad_infix @@ -17,7 +17,7 @@ module Pred = struct (** [remove src dst preds] remove a predecessor [src] from a set of predecessors of [dst] *) let remove src dst rdep = - Map.change rdep dst (function + Map.change rdep dst ~f:(function | None -> None | Some xs -> Some (Set.remove xs src)) @@ -25,7 +25,7 @@ module Pred = struct Map.map rdep ~f:(Set.filter ~f:(fun id -> Tid.(id <> src))) let update src dst rdep = - Map.change rdep dst (function + Map.change rdep dst ~f:(function | None -> None | Some xs -> Some (Set.add xs src)) @@ -362,14 +362,14 @@ let preds_of_sub sub : Tid.Set.t Tid.Map.t = Term.enum blk_t sub |> Seq.fold ~init:Tid.Map.empty ~f:(fun ins src -> let src_id = Term.tid src in - let ins = Map.change ins src_id (function + let ins = Map.change ins src_id ~f:(function | None -> Some Tid.Set.empty | other -> other) in Term.enum jmp_t src |> Seq.fold ~init:ins ~f:(fun ins jmp -> match succ_tid_of_jmp jmp with | None -> ins - | Some tid -> Map.change ins tid (function + | Some tid -> Map.change ins tid ~f:(function | None -> Some (Tid.Set.singleton src_id) | Some set -> Some (Set.add set src_id)))) diff --git a/lib/bap_types/bap_ir_graph.mli b/lib/bap_types/bap_ir_graph.mli index c00ed5f0e..047332b79 100644 --- a/lib/bap_types/bap_ir_graph.mli +++ b/lib/bap_types/bap_ir_graph.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Graphlib.Std open Bap_common_types diff --git a/lib/bap_types/bap_monad.ml b/lib/bap_types/bap_monad.ml index 13d2f88c4..43fae00ae 100644 --- a/lib/bap_types/bap_monad.ml +++ b/lib/bap_types/bap_monad.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module Legacy = struct include Bap_monad_types @@ -44,7 +44,7 @@ module T = struct include Monad.Make2(struct type nonrec ('a,'b) t = ('a,'b) t let return x = Or_error.return x |> M.return - let bind m f = M.bind m (function + let bind m f = M.bind m ~f:(function | Ok r -> f r | Error err -> M.return (Error err)) let map = `Define_using_bind diff --git a/lib/bap_types/bap_monad.mli b/lib/bap_types/bap_monad.mli index 24bde22c7..7a82cb0e4 100644 --- a/lib/bap_types/bap_monad.mli +++ b/lib/bap_types/bap_monad.mli @@ -1,6 +1,6 @@ [@@@deprecated "[since 2017-04] use new monads library instead"] -open Core_kernel[@@warning "-D"] +open Core open Bap_monad_types module type Basic = Monad.Basic diff --git a/lib/bap_types/bap_monad_types.ml b/lib/bap_types/bap_monad_types.ml index 50759d4cd..6fd26a540 100644 --- a/lib/bap_types/bap_monad_types.ml +++ b/lib/bap_types/bap_monad_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module type State = sig type ('a,'s) t diff --git a/lib/bap_types/bap_ogre.ml b/lib/bap_types/bap_ogre.ml index 53967f240..7dd817949 100644 --- a/lib/bap_types/bap_ogre.ml +++ b/lib/bap_types/bap_ogre.ml @@ -1,6 +1,6 @@ let package = "bap" open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core type t = Ogre.Doc.t [@@deriving compare] @@ -12,11 +12,12 @@ module Stringable = struct | Error err -> failwithf "can't deserialize Ogre doc - %s" (Error.to_string_hum err) () + let caller_identity = Bin_shape.Uuid.of_string "899cb8f5-8201-4e72-9e80-b13cf152ea6a" end let pp = Ogre.Doc.pp include Sexpable.Of_stringable(Stringable) -include Binable.Of_stringable(Stringable) [@@warning "-D"] +include Binable.Of_stringable_with_uuid(Stringable) type KB.Conflict.t += Spec_inconsistency of Error.t diff --git a/lib/bap_types/bap_ogre.mli b/lib/bap_types/bap_ogre.mli index 6e94c3dcb..6608d848a 100644 --- a/lib/bap_types/bap_ogre.mli +++ b/lib/bap_types/bap_ogre.mli @@ -1,5 +1,5 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core type t = Ogre.doc [@@deriving bin_io, compare, sexp] val pp : Format.formatter -> t -> unit diff --git a/lib/bap_types/bap_result.ml b/lib/bap_types/bap_result.ml index b653d0d4d..9a412b848 100644 --- a/lib/bap_types/bap_result.ml +++ b/lib/bap_types/bap_result.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Regular.Std open Bap_common_types diff --git a/lib/bap_types/bap_result.mli b/lib/bap_types/bap_result.mli index 05ec939f1..fc1e08cec 100644 --- a/lib/bap_types/bap_result.mli +++ b/lib/bap_types/bap_result.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Regular.Std open Bap_common_types diff --git a/lib/bap_types/bap_size.ml b/lib/bap_types/bap_size.ml index 1183687c4..1a1ac68e0 100644 --- a/lib/bap_types/bap_size.ml +++ b/lib/bap_types/bap_size.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Or_error diff --git a/lib/bap_types/bap_size.mli b/lib/bap_types/bap_size.mli index c692d17d1..d62224af0 100644 --- a/lib/bap_types/bap_size.mli +++ b/lib/bap_types/bap_size.mli @@ -1,6 +1,6 @@ (** Extends [size] type. *) -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_common_types diff --git a/lib/bap_types/bap_stmt.ml b/lib/bap_types/bap_stmt.ml index 6f3c366f9..1c697d069 100644 --- a/lib/bap_types/bap_stmt.ml +++ b/lib/bap_types/bap_stmt.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_knowledge open Regular.Std diff --git a/lib/bap_types/bap_stmt.mli b/lib/bap_types/bap_stmt.mli index 10f70625c..34fb79165 100644 --- a/lib/bap_types/bap_stmt.mli +++ b/lib/bap_types/bap_stmt.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_knowledge open Regular.Std diff --git a/lib/bap_types/bap_tid_graph.ml b/lib/bap_types/bap_tid_graph.ml index 59470e57a..0d7d7e250 100644 --- a/lib/bap_types/bap_tid_graph.ml +++ b/lib/bap_types/bap_tid_graph.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Graphlib.Std open Bap_ir diff --git a/lib/bap_types/bap_toplevel.ml b/lib/bap_types/bap_toplevel.ml index bc9968e52..c419c982a 100644 --- a/lib/bap_types/bap_toplevel.ml +++ b/lib/bap_types/bap_toplevel.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Knowledge.Syntax @@ -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..f268e2dc2 100644 --- a/lib/bap_types/bap_trie.ml +++ b/lib/bap_types/bap_trie.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Format open Option.Monad_infix @@ -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 ~f:(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 ~key:c ~data: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 ~f:(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_trie.mli b/lib/bap_types/bap_trie.mli index f791837f2..ae6cbe853 100644 --- a/lib/bap_types/bap_trie.mli +++ b/lib/bap_types/bap_trie.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Format open Bap_trie_intf diff --git a/lib/bap_types/bap_type.ml b/lib/bap_types/bap_type.ml index bd0ed2a7a..52ff0ee9e 100644 --- a/lib/bap_types/bap_type.ml +++ b/lib/bap_types/bap_type.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Format diff --git a/lib/bap_types/bap_type.mli b/lib/bap_types/bap_type.mli index ec1ccb7eb..97f463f78 100644 --- a/lib/bap_types/bap_type.mli +++ b/lib/bap_types/bap_type.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_common_types diff --git a/lib/bap_types/bap_type_error.ml b/lib/bap_types/bap_type_error.ml index a5b569b2a..f3671c388 100644 --- a/lib/bap_types/bap_type_error.ml +++ b/lib/bap_types/bap_type_error.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_common_types diff --git a/lib/bap_types/bap_type_error.mli b/lib/bap_types/bap_type_error.mli index 8ad3e9fe5..844dce4c1 100644 --- a/lib/bap_types/bap_type_error.mli +++ b/lib/bap_types/bap_type_error.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_common_types diff --git a/lib/bap_types/bap_types.ml b/lib/bap_types/bap_types.ml index 28163a344..a93b7fcac 100644 --- a/lib/bap_types/bap_types.ml +++ b/lib/bap_types/bap_types.ml @@ -5,7 +5,7 @@ *) -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_common_types open Bap_knowledge diff --git a/lib/bap_types/bap_value.ml b/lib/bap_types/bap_value.ml index d865c09c9..20936c86c 100644 --- a/lib/bap_types/bap_value.ml +++ b/lib/bap_types/bap_value.ml @@ -1,5 +1,5 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Format @@ -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 @@ -57,7 +55,7 @@ let register_slot (type a) ?uuid slot let name = KB.Name.show @@ KB.Name.create ~package:uuid @@ KB.Name.unqualified slot_name in - let key = Type_equal.Id.create name S.sexp_of_t in + let key = Type_equal.Id.create ~name S.sexp_of_t in let pp ppf (Value.T (k,x)) = let T = Equal.proof k key in S.pp ppf x in @@ -81,7 +79,7 @@ let register_slot (type a) ?uuid slot let open KB.Syntax in KB.collect slot obj >>| function | None -> dict - | Some x -> Univ_map.set dict key x in + | Some x -> Univ_map.set dict ~key ~data:x in let info = { pp; of_sexp; @@ -147,7 +145,7 @@ module Univ = struct } [@@deriving bin_io] end - include Binable.Of_binable(Repr)(struct + include Binable.Of_binable_with_uuid(Repr)(struct type t = Value.t let to_binable x = Repr.{ typeid = typeid x; @@ -155,7 +153,9 @@ module Univ = struct } let of_binable {Repr.typeid; data} = (info typeid).of_string data - end) [@@warning "-D"] + let caller_identity = + Bin_shape.Uuid.of_string "913162b9-e664-449f-ad92-c276625f01c7" + end) end let create {key} x = Value.T (key,x) @@ -216,7 +216,7 @@ module Match = struct } let case t f (tab : 's t) = - let h = Map.set tab.handlers (Tag.uid t) (fun v -> f (get_exn t v)) in + let h = Map.set tab.handlers ~key:(Tag.uid t) ~data:(fun v -> f (get_exn t v)) in {tab with handlers = h} let run (Value.T (k,_) as v) tab = @@ -232,11 +232,11 @@ module Dict = struct type t = Univ_map.t let empty = Univ_map.empty let is_empty = Univ_map.is_empty - let set dict {key} x = Univ_map.set dict key x + let set dict {key} x = Univ_map.set dict ~key ~data:x let remove dict {key} = Univ_map.remove dict key let mem dict {key} = Univ_map.mem dict key let find dict {key} = Univ_map.find dict key - let add dict {key} x = Univ_map.add dict key x + let add dict {key} x = Univ_map.add dict ~key ~data:x let change dict {key} f = Univ_map.change dict key ~f let data dict = Univ_map.to_alist dict |> @@ -246,7 +246,7 @@ module Dict = struct let filter t ~f = data t |> Seq.fold ~init:empty ~f:(fun dict (Value.T (k,x) as v) -> - if f v then Univ_map.set dict k x else dict) + if f v then Univ_map.set dict ~key:k ~data:x else dict) let compare x y = compare_list @@ -259,13 +259,15 @@ module Dict = struct let of_dict = Univ_map.to_alist let to_dict = List.fold ~init:empty ~f:(fun dict (Value.T (k,x)) -> - Univ_map.set dict k x) + Univ_map.set dict ~key:k ~data:x) end - include Binable.Of_binable(Data)(struct + include Binable.Of_binable_with_uuid(Data)(struct type t = Univ_map.t let to_binable = Data.of_dict let of_binable = Data.to_dict - end) [@@warning "-D"] + let caller_identity = + Bin_shape.Uuid.of_string "24ff7880-bd9a-4c2b-bc85-3611a07b2fd5" + end) include Sexpable.Of_sexpable(Data)(struct type t = Univ_map.t let to_sexpable = Data.of_dict diff --git a/lib/bap_types/bap_value.mli b/lib/bap_types/bap_value.mli index 847ab4f2a..91539b71d 100644 --- a/lib/bap_types/bap_value.mli +++ b/lib/bap_types/bap_value.mli @@ -1,6 +1,6 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Regular.Std type t [@@deriving bin_io, compare, sexp] diff --git a/lib/bap_types/bap_var.ml b/lib/bap_types/bap_var.ml index 724f4557c..a7a070887 100644 --- a/lib/bap_types/bap_var.ml +++ b/lib/bap_types/bap_var.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std open Bap_common_types @@ -115,11 +115,12 @@ module T = struct let of_sexpable = Repr.to_var end) - include Binable.Of_binable(Repr)(struct + include Binable.Of_binable_with_uuid(Repr)(struct type t = var let to_binable = Repr.of_var let of_binable = Repr.to_var - end) [@@warning "-D"] + let caller_identity = Bin_shape.Uuid.of_string "f5bbbd23-6f83-4ba6-9090-26e38c169526" + end) let compare x y = Theory.Var.Ident.compare (ident x) (ident y) diff --git a/lib/bap_types/bap_var.mli b/lib/bap_types/bap_var.mli index ddb94ab53..80556f750 100644 --- a/lib/bap_types/bap_var.mli +++ b/lib/bap_types/bap_var.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std diff --git a/lib/bap_types/bap_vector.ml b/lib/bap_types/bap_vector.ml index d7f459b06..8f6c0f71b 100644 --- a/lib/bap_types/bap_vector.ml +++ b/lib/bap_types/bap_vector.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Format @@ -142,7 +142,7 @@ let find = C.find let find_map = C.find_map let to_list vec = - List.init vec.size (fun i -> + List.init vec.size ~f:(fun i -> Array.unsafe_get vec.data i) let min_elt = C.min_elt diff --git a/lib/bap_types/bap_vector.mli b/lib/bap_types/bap_vector.mli index 3f7b30ece..bb0bca399 100644 --- a/lib/bap_types/bap_vector.mli +++ b/lib/bap_types/bap_vector.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Format type 'a t [@@deriving bin_io, compare, sexp] diff --git a/lib/bap_types/bap_visitor.ml b/lib/bap_types/bap_visitor.ml index ba5bb5dfe..31937cdd1 100644 --- a/lib/bap_types/bap_visitor.ml +++ b/lib/bap_types/bap_visitor.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_common_types open Bap_bil diff --git a/lib/bap_types/bap_visitor.mli b/lib/bap_types/bap_visitor.mli index 1ccd065f9..a7a5125d7 100644 --- a/lib/bap_types/bap_visitor.mli +++ b/lib/bap_types/bap_visitor.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_common_types open Bap_bil diff --git a/lib/bap_types/dune b/lib/bap_types/dune index 44f950277..1994d16ab 100644 --- a/lib/bap_types/dune +++ b/lib/bap_types/dune @@ -10,7 +10,7 @@ bitvec bitvec-order bitvec-sexp - core_kernel + core graphlib monads ogre diff --git a/lib/bare/bare.ml b/lib/bare/bare.ml index c935c166a..d84e33d32 100644 --- a/lib/bare/bare.ml +++ b/lib/bare/bare.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Format (* Algorithm description. diff --git a/lib/bare/bare.mli b/lib/bare/bare.mli index 6e4063ac1..ab3c75ed1 100644 --- a/lib/bare/bare.mli +++ b/lib/bare/bare.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core (** Binary Analysis Rule Engine (BARE). diff --git a/lib/bare/dune b/lib/bare/dune index 6bc0e966c..e7666cced 100644 --- a/lib/bare/dune +++ b/lib/bare/dune @@ -2,4 +2,4 @@ (name bare) (public_name bare) (wrapped false) - (libraries core_kernel parsexp)) + (libraries core parsexp)) diff --git a/lib/beagle/beagle_prey.ml b/lib/beagle/beagle_prey.ml index 866d4d315..1747bfc54 100644 --- a/lib/beagle/beagle_prey.ml +++ b/lib/beagle/beagle_prey.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus.Std open Format diff --git a/lib/beagle/beagle_prey.mli b/lib/beagle/beagle_prey.mli index a9dcfcacf..5d9a887a8 100644 --- a/lib/beagle/beagle_prey.mli +++ b/lib/beagle/beagle_prey.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus.Std diff --git a/lib/beagle/dune b/lib/beagle/dune index 2594e4483..56dc89f8f 100644 --- a/lib/beagle/dune +++ b/lib/beagle/dune @@ -3,4 +3,4 @@ (public_name bap-beagle) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap bap-primus core_kernel monads regular)) + (libraries bap bap-primus core monads regular)) diff --git a/lib/bitvec_binprot/bitvec_binprot.ml b/lib/bitvec_binprot/bitvec_binprot.ml index 19e8bfd25..4f8bdcf89 100644 --- a/lib/bitvec_binprot/bitvec_binprot.ml +++ b/lib/bitvec_binprot/bitvec_binprot.ml @@ -1,11 +1,12 @@ open Bin_prot.Std type t = Bitvec.t -module Functions = Bin_prot.Utils.Make_binable(struct +module Functions = Bin_prot.Utils.Make_binable_with_uuid(struct module Binable = struct type t = string [@@deriving bin_io] end type t = Bitvec.t let to_binable = Bitvec.to_binary let of_binable = Bitvec.of_binary - end) [@@warning "-D"] + let caller_identity = Bin_shape.Uuid.of_string "ae1bec04-6b5f-45b0-b4d6-412204cdc45b" + end) include Functions diff --git a/lib/bitvec_order/bitvec_order.mli b/lib/bitvec_order/bitvec_order.mli index a53a161d5..2c6967de0 100644 --- a/lib/bitvec_order/bitvec_order.mli +++ b/lib/bitvec_order/bitvec_order.mli @@ -5,7 +5,7 @@ equality between two comparison functions. Comparators are extensively used in the Janestreet's suite of - libraries, e.g., Base, Core_kernel[@@warning "-D"], Core, etc. Comparators are + libraries, e.g., Base, Core, etc. Comparators are used to create sets, maps, hashtables, to instantiate interfaces, and algorithms that require comparison. diff --git a/lib/graphlib/dune b/lib/graphlib/dune index 040f732e0..6e8d2ef0f 100644 --- a/lib/graphlib/dune +++ b/lib/graphlib/dune @@ -8,5 +8,5 @@ graphlib_regular graphlib_regular_intf graphlib_pp) - (libraries core_kernel core_kernel.pairing_heap + (libraries core core_kernel.pairing_heap regular ocamlgraph)) diff --git a/lib/graphlib/graphlib.mli b/lib/graphlib/graphlib.mli index b8f33e4e0..b24013f36 100644 --- a/lib/graphlib/graphlib.mli +++ b/lib/graphlib/graphlib.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std (** @@ -699,7 +699,7 @@ module Std : sig interface and has unlabeled nodes of type [Node.t] and edges labeled with [Edge.t] - In [Core_kernel[@@warning "-D"]] basically any type that is reasonable to be + In [Core] basically any type that is reasonable to be used as a graph node, satisfies the {!Opaque.S} interface. So, a new graph structure can be implemented directly, e.g., {[module G = Graphlib.Make(Int64)(Unit)]} diff --git a/lib/graphlib/graphlib_graph.ml b/lib/graphlib/graphlib_graph.ml index af705673e..c4893fcb4 100644 --- a/lib/graphlib/graphlib_graph.ml +++ b/lib/graphlib/graphlib_graph.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Graphlib_intf open Format @@ -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 @@ -635,7 +635,7 @@ module Ordering(G : Graph) = struct let enter t u = { t with nodes_entered = t.nodes_entered + 1; - numbers = Map.change t.numbers u (fun _ -> Some { + numbers = Map.change t.numbers u ~f:(fun _ -> Some { pre = t.nodes_entered; rpost = 0; }) @@ -644,7 +644,7 @@ module Ordering(G : Graph) = struct let leave t u = { t with nodes_left = t.nodes_left - 1; - numbers = Map.change t.numbers u (function + numbers = Map.change t.numbers u ~f:(function | None -> assert false | Some n -> Some {n with rpost = t.nodes_left - 1}) }, t.nodes_left - 1 @@ -795,9 +795,9 @@ let to_dot end in let module Dot = Graph.Graphviz.Dot(Dottable) in - Option.iter channel (fun chan -> Dot.output_graph chan g); - Option.iter formatter (fun ppf -> Dot.fprint_graph ppf g); - Option.iter filename (Out_channel.with_file ~f:(fun chan -> + Option.iter channel ~f:(fun chan -> Dot.output_graph chan g); + Option.iter formatter ~f:(fun ppf -> Dot.fprint_graph ppf g); + Option.iter filename ~f:(Out_channel.with_file ~f:(fun chan -> Dot.output_graph chan g)) @@ -908,7 +908,7 @@ module Dom_frontier_cooper(G:Graph) = struct let dom = idom n in Seq.fold adj ~init:G.Node.Set.empty ~f:(walk dom) |> Set.fold ~init:dfs ~f:(fun dfs visited -> - Map.change dfs visited (function + Map.change dfs visited ~f:(function | None -> Some (G.Node.Set.singleton n) | Some set -> Some (Set.add set n)))) end @@ -950,7 +950,7 @@ let strong_components if not (Hashtbl.mem comps w) then let min x y = if fst x < fst y then x else y in let data = min (root v) (root w) in - Hashtbl.change roots v (fun _ -> Some data)); + Hashtbl.change roots v ~f:(fun _ -> Some data)); if G.Node.(snd (root v) = v) then spill_comp v stack else stack) |> function | [] -> Partition.create (module G.Node) comps @@ -1011,10 +1011,10 @@ let shortest_path match Hashtbl.find dist ev with | Some w when w < dev -> () | _ -> - Hashtbl.set dist ev dev; + Hashtbl.set dist ~key:ev ~data:dev; Heap.add q (dev, ev, e :: p)) in Heap.add q (0, v1, []); - Hashtbl.set dist v1 0; + Hashtbl.set dist ~key:v1 ~data:0; loop () let is_reachable graph ?rev g u v = @@ -1409,7 +1409,7 @@ module Fixpoint = struct | Done approx -> make_solution iters approx | Step (visits,works,approx) -> loop visits (iters+1) works approx else make_solution iters approx in - let works = List.init (Array.length nodes) Fn.id in + let works = List.init (Array.length nodes) ~f:Fn.id in let approx = Map.fold init ~init:Int.Map.empty ~f:(fun ~key:node ~data approx -> match Map.find rnodes node with diff --git a/lib/graphlib/graphlib_graph.mli b/lib/graphlib/graphlib_graph.mli index 8392e03f9..2311dcd1d 100644 --- a/lib/graphlib/graphlib_graph.mli +++ b/lib/graphlib/graphlib_graph.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Graphlib_intf open Format diff --git a/lib/graphlib/graphlib_intf.ml b/lib/graphlib/graphlib_intf.ml index 494230a94..82ffbd6aa 100644 --- a/lib/graphlib/graphlib_intf.ml +++ b/lib/graphlib/graphlib_intf.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std module type Node = sig diff --git a/lib/graphlib/graphlib_pp.ml b/lib/graphlib/graphlib_pp.ml index 501fd6ca6..7bd2ce64f 100644 --- a/lib/graphlib/graphlib_pp.ml +++ b/lib/graphlib/graphlib_pp.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Format diff --git a/lib/graphlib/graphlib_pp.mli b/lib/graphlib/graphlib_pp.mli index 342caada8..4869510fe 100644 --- a/lib/graphlib/graphlib_pp.mli +++ b/lib/graphlib/graphlib_pp.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Format type scheme diff --git a/lib/graphlib/graphlib_regular.ml b/lib/graphlib/graphlib_regular.ml index 2c7d86c5f..1f206ab12 100644 --- a/lib/graphlib/graphlib_regular.ml +++ b/lib/graphlib/graphlib_regular.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Graphlib_intf open Graphlib_regular_intf @@ -57,7 +57,7 @@ module Make(Node : Opaque.S)(Label : T) = struct let inputs n = edges inc (fun dst src -> src,dst) n let outputs n = edges out (fun src dst -> src,dst) n - let insert n g = Map.change g n (function + let insert n g = Map.change g n ~f:(function | None -> Some empty_node | other -> other) @@ -131,7 +131,7 @@ module Make(Node : Opaque.S)(Label : T) = struct | Some a -> Map.mem a.out e.dst let upsert_arrow src dst field e g = - Map.change g (src e) (function + Map.change g (src e) ~f:(function | None -> Some (Field.fset field empty_node (Node.Map.singleton (dst e) e.data)) @@ -140,7 +140,7 @@ module Make(Node : Opaque.S)(Label : T) = struct Some (Field.fset field ns (Map.set map ~key:(dst e) ~data:e.data))) - let remove_arrow field arr src g = Map.change g src (function + let remove_arrow field arr src g = Map.change g src ~f:(function | None -> None | Some ns -> let set = Field.get field ns in diff --git a/lib/graphlib/graphlib_regular.mli b/lib/graphlib/graphlib_regular.mli index c6a200c51..d5e9960f7 100644 --- a/lib/graphlib/graphlib_regular.mli +++ b/lib/graphlib/graphlib_regular.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Graphlib_intf open Graphlib_graph diff --git a/lib/knowledge/bap_knowledge.ml b/lib/knowledge/bap_knowledge.ml index ea4d64797..a8340a5c7 100644 --- a/lib/knowledge/bap_knowledge.ml +++ b/lib/knowledge/bap_knowledge.ml @@ -1,7 +1,6 @@ -open Core_kernel[@@warning "-D"] [@@warning "-D"] +open Core open Monads.Std - -module Unix = Caml_unix [@@warning "-49"] +module Unix = Core_unix type ('a,'b) eq = ('a,'b) Type_equal.t = T : ('a,'a) eq @@ -17,9 +16,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 +158,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 @@ -212,8 +211,8 @@ end else join t k' (Tip (k, f None)) k | Bin (k', l, r) -> match Key.compare k' k with | NA -> join (Tip (k,f None)) k t (Key.payload k') - | LB -> Bin (k', update l k f, r) - | RB -> Bin (k', l, update r k f) + | LB -> Bin (k', update l k ~f, r) + | RB -> Bin (k', l, update r k ~f) [@@specialise] let rec set t k v = match t with @@ -364,7 +363,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); @@ -471,7 +470,7 @@ end = struct let intern name = let id = hash_name name in match Hashtbl.find registry id with - | None -> Hashtbl.add_exn registry id name; id + | None -> Hashtbl.add_exn registry ~key:id ~data:name; id | Some name' -> if equal_fullname name name' then id @@ -594,11 +593,11 @@ 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 (); - Hashtbl.add_exn agents agent { + Hashtbl.add_exn agents ~key:agent ~data:{ desc; name; rcls = reliability; }; agent @@ -772,14 +771,14 @@ module Domain = struct | false,false -> if equal x y then EQ else NC) let powerset (type t o) - (module S : Comparator.S with type t = t + (module S : Base.Comparator.S with type t = t and type comparator_witness = o) ?(inspect=S.comparator.sexp_of_t) name = let empty = Set.empty (module S) in let order x y : Order.partial = if Set.equal x y then EQ else - if Set.is_subset x y then LT else - if Set.is_subset y x then GT else NC in + if Set.is_subset x ~of_:y then LT else + if Set.is_subset y ~of_:x then GT else NC in let join x y = Ok (Set.union x y) in let module Inspectable = struct include S @@ -795,7 +794,7 @@ module Domain = struct define ~inspect ~empty ~order name let mapping (type k o d) - (module K : Comparator.S with type t = k + (module K : Base.Comparator.S with type t = k and type comparator_witness = o) ?(inspect=sexp_of_opaque) ?join @@ -1051,11 +1050,11 @@ module Registry = struct let is_public cls = Hashtbl.mem public cls let public_class cls = - Hashtbl.add_exn public cls [] + Hashtbl.add_exn public ~key:cls ~data:[] let update_class ~cls ~slot = if is_public cls - then Hashtbl.add_multi public cls slot + then Hashtbl.add_multi public ~key:cls ~data:slot let find namespace name = let names = Hashtbl.find_exn namespace (Name.package name) in @@ -1459,7 +1458,7 @@ module Dict = struct (Key.Uid.(<)[@inlined]) k1 k2 [@@inline] - let make0 = T0 [@@inlined] + let make0 = T0 let make1 k a = T1 (k,a) [@@inline] let make2 ka a kb b = T2 (ka,a,kb,b) [@@inline] let make3 ka a kb b kc c = T3 (ka,a,kb,b,kc,c) [@@inline] @@ -2121,7 +2120,7 @@ module Record = struct end } - include Binable.Of_binable(Repr)(struct + include Binable.Of_binable_with_uuid(Repr)(struct type t = record let to_binable s = Dict.foreach s ~init:[] { @@ -2140,8 +2139,11 @@ module Record = struct match Hashtbl.find io name with | None -> s | Some {reader} -> reader data s) + + let caller_identity = + Bin_shape.Uuid.of_string "1b0bac12-16f0-42f7-89c9-aef05e549537" end) - [@@warning "-D"] + let eq = Dict.Key.same @@ -2362,7 +2364,7 @@ module Knowledge = struct let name = Registry.add_slot ?desc ?package name in let key = Dict.Key.create ~name dom.inspect in if public then Registry.update_class ~cls:cls.Class.name ~slot:name; - Option.iter persistent (Record.register_persistent key); + Option.iter persistent ~f:(Record.register_persistent key); Record.register_domain key dom; let promises = Hashtbl.create (module Pid) in let watchers = Hashtbl.create (module Pid) in @@ -2472,13 +2474,15 @@ module Knowledge = struct let t_of_sexp = opaque_of_sexp let empty = empty cls - include Binable.Of_binable(Record)(struct + include Binable.Of_binable_with_uuid(Record)(struct type t = (a,b) cls value let to_binable : 'a value -> Record.t = fun {data} -> data let of_binable : Record.t -> 'a value = fun data -> {cls; data; time = next_second ()} - end) [@@warning "-D"] + let caller_identity = + Bin_shape.Uuid.of_string "6c440a4b-2be3-4d8a-9559-40f6971df733" + end) type comparator_witness = Comparator.comparator_witness include Base.Comparable.Make_using_comparator(struct type t = (a,b) cls value @@ -2533,7 +2537,7 @@ module Knowledge = struct let objs = f @@ match Map.find state.classes name with | None -> Env.empty_class | Some objs -> objs in - {state with classes = Map.set state.classes name objs} + {state with classes = Map.set state.classes ~key:name ~data:objs} [@@specialise] let map_update_objects {Class.name} f = @@ -2542,7 +2546,7 @@ module Knowledge = struct | None -> Env.empty_class | Some objs -> objs in f objs @@ fun objs res -> - put {state with classes = Map.set state.classes name objs} >>| fun () -> + put {state with classes = Map.set state.classes ~key:name ~data:objs} >>| fun () -> res [@@specialise] @@ -2607,11 +2611,11 @@ module Knowledge = struct let vals = Oid.Tree.update_with objects.vals obj ~has:(fun info -> {info with name = Some name}) ~nil:(fun () -> {noinfo with name = Some name}) in - let objs = Map.add_exn objects.objs name obj in + let objs = Map.add_exn objects.objs ~key:name ~data:obj in let objects = {objects with objs; vals} in let objects = if public then publicize name obj objects else objects in - put {s with classes = Map.set classes clsid objects} >>| fun () -> + put {s with classes = Map.set classes ~key:clsid ~data:objects} >>| fun () -> obj in fun ?(public=false) ?desc:_ name {Class.name=id} -> @@ -2626,7 +2630,7 @@ module Knowledge = struct if is_public name obj objects then unchanged obj else let objects = publicize name obj objects in - put {s with classes = Map.set classes id objects} >>| fun () -> + put {s with classes = Map.set classes ~key:id ~data:objects} >>| fun () -> obj (* any [:] in names here are never treated as separators, @@ -2700,11 +2704,12 @@ module Knowledge = struct end in let module R = struct include Comparator - include Binable.Of_binable(Oid)(struct + include Binable.Of_binable_with_uuid(Oid)(struct type t = a obj let to_binable = Fn.id let of_binable = Fn.id - end) [@@warning "-D"] + let caller_identity = Bin_shape.Uuid.of_string "97c4dd90-34db-4ebb-a8b9-43b75164144e" + end) include Base.Comparable.Make_using_comparator(Comparator) end in (module R) @@ -2714,7 +2719,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 +2729,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 +2760,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 |> @@ -2796,13 +2801,13 @@ module Knowledge = struct let register_watcher (type a b)(s : (a,b) slot) run = Pid.incr pids; let pid = !pids in - Hashtbl.add_exn s.watchers pid {run; pid}; + Hashtbl.add_exn s.watchers ~key:pid ~data:{run; pid}; pid let register_promise (type a b)(s : (a,b) slot) run = Pid.incr pids; let pid = !pids in - Hashtbl.add_exn s.promises pid {run; pid}; + Hashtbl.add_exn s.promises ~key:pid ~data:{run; pid}; pid let remove_promise (s : _ slot) pid = @@ -2852,7 +2857,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 @@ -2923,7 +2928,7 @@ module Knowledge = struct | Env.Work {waiting} -> let waiting = Pid.Tree.fold waiting ~init:[] ~f:(fun p () ps -> Hashtbl.find_exn s.Slot.promises p :: ps) in - let info = {info with comp=Map.set works (uid s) no_work} in + let info = {info with comp=Map.set works ~key:(uid s) ~data:no_work} in let objs = {objs with vals = Oid.Tree.set vals x info} in k objs waiting @@ -2933,7 +2938,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 @@ -3043,7 +3048,7 @@ module Knowledge = struct let intern_symbol name obj cls = Knowledge.return Env.{ cls - with objs = Map.add_exn cls.objs name obj + with objs = Map.add_exn cls.objs ~key:name ~data:obj } @@ -3117,7 +3122,7 @@ module Knowledge = struct ~f:(fun classes (clsid,objects) -> import_class ~strict ~package ~needs_import objects >>| fun objects -> - Map.set classes clsid objects)) + Map.set classes ~key:clsid ~data:objects)) >>= fun classes -> put {s with classes} let package = get () >>| fun {Env.package} -> package @@ -3213,7 +3218,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 @@ -3289,7 +3294,7 @@ module Knowledge = struct List.fold comp ~init:(Map.empty (module Name)) ~f:(fun works slot -> - Map.add_exn works slot Env.Done) + Map.add_exn works ~key:slot ~data:Env.Done) let add_object ({Env.vals; objs} as self) @@ -3305,7 +3310,7 @@ module Knowledge = struct | None -> self | Some s -> { self with - objs = Map.add_exn objs s key; + objs = Map.add_exn objs ~key:s ~data:key; } let names_in_syms = Oid.Tree.fold @@ -3403,12 +3408,12 @@ module Knowledge = struct } let load path = - let fd = Unix.openfile path Unix.[O_RDONLY] 0o400 in + let fd = Unix.openfile path ~mode: Unix.[O_RDONLY] ~perm: 0o400 in try let data = Bigarray.array1_of_genarray @@ Unix.map_file fd - Bigarray.char Bigarray.c_layout false [| -1 |]in + Bigarray.char Bigarray.c_layout ~shared:false [| -1 |]in let r = of_bigstring data in Unix.close fd; r @@ -3433,12 +3438,12 @@ module Knowledge = struct let repr = to_canonical state in let size = String.length magic + bin_size_canonical bin_size_v2 repr in - let fd = Unix.openfile path Unix.[O_RDWR; O_CREAT; O_TRUNC] 0o660 in + let fd = Unix.openfile path ~mode: Unix.[O_RDWR; O_CREAT; O_TRUNC] ~perm: 0o660 in try let dim = [|size |]in let buf = Bigarray.array1_of_genarray @@ - Unix.map_file fd Bigarray.char Bigarray.c_layout true dim in + Unix.map_file fd Bigarray.char Bigarray.c_layout ~shared:true dim in blit_canonical_to_bigstring repr buf; Unix.close fd with exn -> diff --git a/lib/knowledge/bap_knowledge.mli b/lib/knowledge/bap_knowledge.mli index 175edb549..6d7ddebf3 100644 --- a/lib/knowledge/bap_knowledge.mli +++ b/lib/knowledge/bap_knowledge.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std @@ -885,7 +885,6 @@ module Knowledge : sig (** a witness of the ordering *) type 'a ord - include Type_equal.Injective with type 'a t := 'a t (** [empty cls] the empty value of class [cls]. @@ -1471,7 +1470,7 @@ module Knowledge : sig return the least upper bound of [x] and [y], if it exists. *) val mapping : - ('a,'e) Map.comparator -> + (module Core.Comparator.S with type t = 'a and type comparator_witness = 'e) -> ?inspect:('d -> Base.Sexp.t) -> ?join:('d -> 'd -> ('d, conflict) result) -> equal:('d -> 'd -> bool) -> @@ -1485,7 +1484,8 @@ 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 : + (module Core.Comparator.S with type t = 'a and type comparator_witness = 'e) -> ?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) Core.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) Core.Comparator.Module.t -> 'k t -> 'd t -> ('k,'d,'c) Map.t persistent end (** Conflicting information. diff --git a/lib/knowledge/dune b/lib/knowledge/dune index 112a73209..6fc497e39 100644 --- a/lib/knowledge/dune +++ b/lib/knowledge/dune @@ -3,4 +3,4 @@ (public_name bap-knowledge) (wrapped false) (preprocess (pps ppx_bap)) - (libraries core_kernel core_kernel.caml_unix monads)) \ No newline at end of file + (libraries core core_unix monads)) diff --git a/lib/microx/dune b/lib/microx/dune index 065519258..2b1538b71 100644 --- a/lib/microx/dune +++ b/lib/microx/dune @@ -3,4 +3,4 @@ (public_name bap-microx) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap monads core_kernel)) + (libraries bap monads core)) diff --git a/lib/microx/microx_concretizer.ml b/lib/microx/microx_concretizer.ml index f7d1b1a5a..983c59645 100644 --- a/lib/microx/microx_concretizer.ml +++ b/lib/microx/microx_concretizer.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std diff --git a/lib/microx/microx_conqueror.ml b/lib/microx/microx_conqueror.ml index 8bfd00a1d..9a8848ab7 100644 --- a/lib/microx/microx_conqueror.ml +++ b/lib/microx/microx_conqueror.ml @@ -1,9 +1,7 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std -[@@@warning "-D"] - module SM = Monad.State open SM.Monad_infix open Format @@ -72,7 +70,7 @@ class context else {< cps = Map.update cps key ~f:(function | None -> Tid.Map.singleton p self - | Some ps -> Map.set ps p self) + | Some ps -> Map.set ps ~key:p ~data:self) >} method merge runner = {< diff --git a/lib/microx/microx_conqueror.mli b/lib/microx/microx_conqueror.mli index cd9078767..82a02ae3f 100644 --- a/lib/microx/microx_conqueror.mli +++ b/lib/microx/microx_conqueror.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std [@@@warning "-D"] diff --git a/lib/monads/dune b/lib/monads/dune index 1977445b9..3e3b8653d 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 jane_rope) (private_modules monads_monad monads_monoid monads_types)) diff --git a/lib/monads/monads.mli b/lib/monads/monads.mli index f924115fb..1f605f564 100644 --- a/lib/monads/monads.mli +++ b/lib/monads/monads.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core (** Monad Transformer Library. diff --git a/lib/monads/monads_monad.ml b/lib/monads/monads_monad.ml index 79c72fe68..5a4cf595a 100644 --- a/lib/monads/monads_monad.ml +++ b/lib/monads/monads_monad.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core let ident = Fn.id @@ -264,7 +264,7 @@ module Monad = struct let void t = Fn.ignore t let sequence = List.sequence - let rec forever t = bind t (fun _ -> forever t) + let rec forever t = bind t ~f:(fun _ -> forever t) include Syntax include Let end @@ -510,12 +510,12 @@ module OptionT = struct module Basic = struct include T2(M) let return x = M.return (Some x) - let bind m f = M.bind m (function + let bind m f = M.bind m ~f:(function | Some r -> f r | None -> M.return None) [@@inline] - let map m ~f = M.bind m (function + let map m ~f = M.bind m ~f:(function | Some r -> M.return (Some (f r)) | None -> M.return None) [@@inline] @@ -584,8 +584,8 @@ module ResultT = struct = struct include struct - let (>>=) m f = M.bind m f [@@inline] - let (>>|) m f = M.map m f [@@inline] + let (>>=) m f = M.bind m ~f [@@inline] + let (>>|) m f = M.map m ~f [@@inline] end module Base = struct @@ -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 () = @@ -1024,8 +1024,8 @@ module State = struct and type 'a env := 'a Tp(T)(M).env = struct include struct - let (>>=) m f = M.bind m f [@@inline] - let (>>|) m f = M.map m f [@@inline] + let (>>=) m f = M.bind m ~f [@@inline] + let (>>|) m f = M.map m ~f [@@inline] end let make run = State run [@@inline] @@ -1047,7 +1047,7 @@ module State = struct let run m s = M.(m => s >>| fun {x;s} -> (x,s)) let eval m s = M.(run m s >>| fst) let exec m s = M.(run m s >>| snd) - let lift m = make @@ fun s -> M.bind m (fun x -> M.return {x;s}) [@@inline] + let lift m = make @@ fun s -> M.bind m ~f:(fun x -> M.return {x;s}) [@@inline] include Basic include Monad.Make2(Basic) end diff --git a/lib/monads/monads_monad.mli b/lib/monads/monads_monad.mli index fd5dd18ac..491364bda 100644 --- a/lib/monads/monads_monad.mli +++ b/lib/monads/monads_monad.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module Types = Monads_types module Monoid = Monads_monoid @@ -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/monads/monads_monoid.ml b/lib/monads/monads_monoid.ml index 5af2545af..2552e1a8c 100644 --- a/lib/monads/monads_monoid.ml +++ b/lib/monads/monads_monoid.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module type Base = sig type t diff --git a/lib/monads/monads_monoid.mli b/lib/monads/monads_monoid.mli index 89a65eef5..2e681229a 100644 --- a/lib/monads/monads_monoid.mli +++ b/lib/monads/monads_monoid.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module type Base = sig type t diff --git a/lib/monads/monads_types.ml b/lib/monads/monads_types.ml index 89e670565..211458cb2 100644 --- a/lib/monads/monads_types.ml +++ b/lib/monads/monads_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module Monoid = Monads_monoid diff --git a/lib/ogre/dune b/lib/ogre/dune index cff48c78c..e083c6140 100644 --- a/lib/ogre/dune +++ b/lib/ogre/dune @@ -3,4 +3,4 @@ (public_name ogre) (wrapped false) (preprocess (pps ppx_bap)) - (libraries core_kernel monads)) \ No newline at end of file + (libraries core monads)) \ No newline at end of file diff --git a/lib/ogre/ogre.ml b/lib/ogre/ogre.ml index f6847ff8a..822576814 100644 --- a/lib/ogre/ogre.ml +++ b/lib/ogre/ogre.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Format @@ -673,8 +673,7 @@ 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)) + bool (String.equal (Map.find_exn row.(x).fields n1) (Map.find_exn row.(y).fields n2))) | 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/ogre/ogre.mli b/lib/ogre/ogre.mli index f6f159f0b..05c0c87ae 100644 --- a/lib/ogre/ogre.mli +++ b/lib/ogre/ogre.mli @@ -60,7 +60,7 @@ to Ogre's field. *) -open Core_kernel[@@warning "-D"] +open Core open Monads.Std open Format diff --git a/lib/regular/dune b/lib/regular/dune index 85fd215fa..77132ed40 100644 --- a/lib/regular/dune +++ b/lib/regular/dune @@ -13,4 +13,4 @@ regular_data_read regular_opaque regular_seq) - (libraries core_kernel)) + (libraries core)) diff --git a/lib/regular/regular.ml b/lib/regular/regular.ml index 4527ce935..71ea8dc26 100644 --- a/lib/regular/regular.ml +++ b/lib/regular/regular.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core module Std = struct diff --git a/lib/regular/regular.mli b/lib/regular/regular.mli index ad8a888b6..1000fa67c 100644 --- a/lib/regular/regular.mli +++ b/lib/regular/regular.mli @@ -1,6 +1,6 @@ (** Regular Library. *) -open Core_kernel[@@warning "-D"] +open Core (** Interface that should support any regular data type. @@ -47,7 +47,7 @@ open Core_kernel[@@warning "-D"] functions. @see < - https://ocaml.janestreet.com/ocaml-core/latest/doc/core_kernel/> + https://ocaml.janestreet.com/ocaml-core/latest/doc/core/> Core Kernel Documentation *) module Std : sig @@ -148,10 +148,10 @@ module Std : sig (** Lazy sequence. - This is the extension of Core_kernel[@@warning "-D"]'s [Sequence] module + This is the extension of Core's [Sequence] module @see - + [Sequence] *) @@ -760,11 +760,11 @@ module Std : sig [str], [pps], [ppo]. @see - + [Comparable.S_binable] @see - + [Hashable.S_binable] @@ -807,11 +807,11 @@ module Std : sig pretty-printed. @see - + [Comparable.S] @see - + [Hashable.S] *) module type S = sig diff --git a/lib/regular/regular_bytes.ml b/lib/regular/regular_bytes.ml index ec3f41882..06cb4cf48 100644 --- a/lib/regular/regular_bytes.ml +++ b/lib/regular/regular_bytes.ml @@ -1,14 +1,15 @@ module Std_bytes = Bytes -open Core_kernel[@@warning "-D"] +open Core -module Binable = Bin_prot.Utils.Make_binable(struct +module Binable = Bin_prot.Utils.Make_binable_with_uuid(struct module Binable = String type t = Std_bytes.t let to_binable = Std_bytes.unsafe_to_string let of_binable = Std_bytes.of_string + let caller_identity = Bin_shape.Uuid.of_string "19071993-d15a-49be-b3a2-4ef4bacd3c0a" end) -[@@warning "-D"] + module Stringable = struct type t = Std_bytes.t diff --git a/lib/regular/regular_bytes.mli b/lib/regular/regular_bytes.mli index c1bc98823..0e18a26e1 100644 --- a/lib/regular/regular_bytes.mli +++ b/lib/regular/regular_bytes.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core type t = Bytes.t [@@deriving bin_io, compare, sexp] diff --git a/lib/regular/regular_cache.ml b/lib/regular/regular_cache.ml index e5dc7e5c8..3a742dddd 100644 --- a/lib/regular/regular_cache.ml +++ b/lib/regular/regular_cache.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_data_intf open Format @@ -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_cache.mli b/lib/regular/regular_cache.mli index b5a81cb42..3ac12e74a 100644 --- a/lib/regular/regular_cache.mli +++ b/lib/regular/regular_cache.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_data_intf open Format diff --git a/lib/regular/regular_data.ml b/lib/regular/regular_data.ml index a16db082a..05693d62a 100644 --- a/lib/regular/regular_data.ml +++ b/lib/regular/regular_data.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_data_types open Regular_data_intf @@ -117,7 +117,7 @@ module Class = struct {key = Type_equal.Id.create ~name sexp_of_opaque} let define key data = - registry := Registry.add_exn !registry key data + registry := Registry.add_exn !registry ~key ~data let refine cls ~f = registry := Registry.update !registry cls ~f:(function @@ -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 ~key:ver ~data:{cls=met; desc}))) let find_with_ver (table : 'a table) ?ver name : (string * 'a) option = diff --git a/lib/regular/regular_data.mli b/lib/regular/regular_data.mli index 4d6f362a4..1178987e0 100644 --- a/lib/regular/regular_data.mli +++ b/lib/regular/regular_data.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_data_types open Regular_data_intf diff --git a/lib/regular/regular_data_intf.ml b/lib/regular/regular_data_intf.ml index 4ac6cf68f..60fa3d695 100644 --- a/lib/regular/regular_data_intf.ml +++ b/lib/regular/regular_data_intf.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_data_types type bytes = Regular_bytes.t [@@deriving bin_io, compare, sexp] diff --git a/lib/regular/regular_data_read.ml b/lib/regular/regular_data_read.ml index 0519829aa..b31022321 100644 --- a/lib/regular/regular_data_read.ml +++ b/lib/regular/regular_data_read.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_data_types type bytes = Regular_bytes.t diff --git a/lib/regular/regular_data_read.mli b/lib/regular/regular_data_read.mli index bedc34d89..3a7328dc9 100644 --- a/lib/regular/regular_data_read.mli +++ b/lib/regular/regular_data_read.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_data_types type 'a t diff --git a/lib/regular/regular_data_types.ml b/lib/regular/regular_data_types.ml index d6686d1d4..f422c6c27 100644 --- a/lib/regular/regular_data_types.ml +++ b/lib/regular/regular_data_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core (** [copy buf obj pos] is a method to copy object [obj] into a buffer diff --git a/lib/regular/regular_data_write.ml b/lib/regular/regular_data_write.ml index fd1445c03..e7ea38020 100644 --- a/lib/regular/regular_data_write.ml +++ b/lib/regular/regular_data_write.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_data_types type bytes = Regular_bytes.t diff --git a/lib/regular/regular_data_write.mli b/lib/regular/regular_data_write.mli index 580ac91a4..7e1cbe957 100644 --- a/lib/regular/regular_data_write.mli +++ b/lib/regular/regular_data_write.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_data_types type 'a t diff --git a/lib/regular/regular_opaque.ml b/lib/regular/regular_opaque.ml index 5dcedd07e..a642e5c81 100644 --- a/lib/regular/regular_opaque.ml +++ b/lib/regular/regular_opaque.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_regular open Regular_data_types open Regular_data_intf diff --git a/lib/regular/regular_regular.ml b/lib/regular/regular_regular.ml index f3be27ead..34357d2af 100644 --- a/lib/regular/regular_regular.ml +++ b/lib/regular/regular_regular.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_data_types open Regular_data_intf diff --git a/lib/regular/regular_regular.mli b/lib/regular/regular_regular.mli index 744798673..7509304cc 100644 --- a/lib/regular/regular_regular.mli +++ b/lib/regular/regular_regular.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular_data_types open Regular_data_intf diff --git a/lib/regular/regular_seq.ml b/lib/regular/regular_seq.ml index 4baa168ad..156d32930 100644 --- a/lib/regular/regular_seq.ml +++ b/lib/regular/regular_seq.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Sequence @@ -22,7 +22,7 @@ let is_empty : 'a Sequence.t -> bool = length_is_bounded_by ~max:0 let filter s ~f = filteri s ~f:(fun _ x -> f x) -(* honestly stolen from newer core_kernel, to +(* honestly stolen from newer core, to get compatibility with older library versions *) let compare compare_a t1 t2 = with_return (fun r -> @@ -35,12 +35,13 @@ 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_with_uuid(struct module Binable = List type 'a t = 'a Sequence.t let to_binable = Sequence.to_list let of_binable = Sequence.of_list - end)[@@warning "-D"] + let caller_identity = Bin_shape.Uuid.of_string "57e090bd-189d-4bd1-a619-53e70d0baa16" + end) include Binable let compare_seq = compare diff --git a/lib/regular/regular_seq.mli b/lib/regular/regular_seq.mli index cd40649ad..e079a9cbf 100644 --- a/lib/regular/regular_seq.mli +++ b/lib/regular/regular_seq.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Format type 'a seq = 'a Sequence.t [@@deriving bin_io, compare, sexp] diff --git a/lib/text_tags/dune b/lib/text_tags/dune index 4323c2016..2d33a38b8 100644 --- a/lib/text_tags/dune +++ b/lib/text_tags/dune @@ -2,4 +2,4 @@ (name text_tags) (public_name text-tags) (wrapped false) - (libraries core_kernel core_kernel.caml_unix)) + (libraries core core_kernel.caml_unix)) diff --git a/lib/text_tags/text_tags.ml b/lib/text_tags/text_tags.ml index 3abc4a8db..6c58c9cab 100644 --- a/lib/text_tags/text_tags.ml +++ b/lib/text_tags/text_tags.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Format module Unix = Caml_unix @@ -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,23 +19,27 @@ 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 = function + | String_tag tag -> + (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 ()) + | _ -> expect_stag () + + let mark_close_stag = function + | String_tag tag -> + (match Sexp.of_string tag with + | List (Atom tag :: _) | Atom tag -> sprintf "" tag + | _ -> expect_tag ()) + | _ -> expect_stag () let print_open_tag fmt _ = pp_open_vbox fmt 1; pp_print_cut fmt () @@ -41,39 +48,42 @@ 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 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 = - filter_attrs tag |> + let filter_attrs = function + | String_tag tag -> + (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 ()) + + | _ -> expect_stag () + + let mark_open_stag stag : string = + filter_attrs stag |> Option.value_map ~default:"" ~f:(sprintf "begin(%s) ") - let mark_close_tag tag : string = - filter_attrs tag |> + let mark_close_stag stag : string = + filter_attrs stag |> Option.value_map ~default:"" ~f:(sprintf "end(%s)") let print_open_tag fmt tag : unit = @@ -91,13 +101,13 @@ 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_tag fmt; + print_close_stag = print_close_tag fmt; } - [@@warning "-D"] + end module Attr = struct @@ -136,22 +146,25 @@ module Attr = struct then pp_print_string ppf "\x1b[39;49m"; clean := true - let print_open_tag ppf tag : unit = - if need_to_print tag then - match ascii_color tag with - | Some color when colorify.contents -> - pp_print_string ppf color; - clean := false - | _ -> - pp_print_string ppf tag; - pp_print_newline ppf () + let print_open_stag ppf stag : unit = match stag with + | String_tag tag -> + if need_to_print tag then + (match ascii_color tag with + | Some color when colorify.contents -> + pp_print_string ppf color; + clean := false + | _ -> + 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 { @@ -160,7 +173,7 @@ module Attr = struct reset ppf; out.out_newline ()) } - [@@warning "-D"] + end module None_mode = struct @@ -183,16 +196,16 @@ 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"] + let () = register_mode "attr" Attr.install; diff --git a/lib/x86_cpu/dune b/lib/x86_cpu/dune index d9eefa79c..23a53ab1b 100644 --- a/lib/x86_cpu/dune +++ b/lib/x86_cpu/dune @@ -3,7 +3,7 @@ (public_name bap-x86) (wrapped false) (preprocess (pps ppx_bap)) - (libraries bap bap-c bap-demangle core_kernel)) + (libraries bap bap-c bap-demangle core)) (deprecated_library_name (old_public_name bap-x86-cpu) diff --git a/lib/x86_cpu/x86_asm_reg.ml b/lib/x86_cpu/x86_asm_reg.ml index 379a00eb9..eb4241211 100644 --- a/lib/x86_cpu/x86_asm_reg.ml +++ b/lib/x86_cpu/x86_asm_reg.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std include X86_asm_reg_types diff --git a/lib/x86_cpu/x86_asm_reg.mli b/lib/x86_cpu/x86_asm_reg.mli index f86ccb3a6..d5b42c6ae 100644 --- a/lib/x86_cpu/x86_asm_reg.mli +++ b/lib/x86_cpu/x86_asm_reg.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std include module type of X86_asm_reg_types diff --git a/lib/x86_cpu/x86_cpu.ml b/lib/x86_cpu/x86_cpu.ml index 3a56d9ff6..3750abba4 100644 --- a/lib/x86_cpu/x86_cpu.ml +++ b/lib/x86_cpu/x86_cpu.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open X86_env diff --git a/lib/x86_cpu/x86_env.ml b/lib/x86_cpu/x86_env.ml index 92d4c49b5..d91fdbc0f 100644 --- a/lib/x86_cpu/x86_env.ml +++ b/lib/x86_cpu/x86_env.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open X86_types @@ -160,7 +160,7 @@ module R32 = struct let nums = r (* Only 8 YMM/XMM registers in x86 32-bit mode *) - let ymms = Array.sub ymms 0 8 + let ymms = Array.sub ymms ~pos:0 ~len:8 end diff --git a/lib/x86_cpu/x86_target.ml b/lib/x86_cpu/x86_target.ml index a6cfdd36c..93b8318ae 100644 --- a/lib/x86_cpu/x86_target.ml +++ b/lib/x86_cpu/x86_target.ml @@ -1,5 +1,5 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Bap_demangle.Std open Bap.Std @@ -136,7 +136,7 @@ module M16 = struct vif; (* 19 *) vip; (* 20 *) id; (* 21 *) - ] @ List.init 8 (fun i -> res (i+22)) @ [ + ] @ List.init 8 ~f:(fun i -> res (i+22)) @ [ aes; (* 30 *) ai; (* 31 *) ] diff --git a/lib/x86_cpu/x86_types.ml b/lib/x86_cpu/x86_types.ml index d304bb6a2..105b16e35 100644 --- a/lib/x86_cpu/x86_types.ml +++ b/lib/x86_cpu/x86_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std module BV = Bitvector diff --git a/lib_test/bap/run_tests.ml b/lib_test/bap/run_tests.ml index 3302b9e12..0977f609b 100644 --- a/lib_test/bap/run_tests.ml +++ b/lib_test/bap/run_tests.ml @@ -1,9 +1,9 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_plugins.Std open OUnit2 -module Sys = Caml.Sys +module Sys = Stdlib.Sys let suite () = "BAP" >::: [ diff --git a/lib_test/bap_disasm/dune b/lib_test/bap_disasm/dune index fd7a7faa6..97abe4c53 100644 --- a/lib_test/bap_disasm/dune +++ b/lib_test/bap_disasm/dune @@ -2,4 +2,4 @@ (name test_disasm) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap core_kernel ounit2 str)) + (libraries bap core ounit2 str)) diff --git a/lib_test/bap_disasm/test_disasm.ml b/lib_test/bap_disasm/test_disasm.ml index 3313d026f..7ea20d9b5 100644 --- a/lib_test/bap_disasm/test_disasm.ml +++ b/lib_test/bap_disasm/test_disasm.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Result.Monad_infix open OUnit2 diff --git a/lib_test/bap_dwarf/dwarf_fbi_test.ml b/lib_test/bap_dwarf/dwarf_fbi_test.ml index 99b7c3ee6..8efa7819b 100644 --- a/lib_test/bap_dwarf/dwarf_fbi_test.ml +++ b/lib_test/bap_dwarf/dwarf_fbi_test.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Or_error open Bap_types.Std diff --git a/lib_test/bap_dwarf/run_tests.ml b/lib_test/bap_dwarf/run_tests.ml index 92a48b1fc..bdbf74ca3 100644 --- a/lib_test/bap_dwarf/run_tests.ml +++ b/lib_test/bap_dwarf/run_tests.ml @@ -1,8 +1,8 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 module Dwarf = Bap_dwarf.Std -module Sys = Caml.Sys +module Sys = Stdlib.Sys let suite = "DWARF" >::: [ diff --git a/lib_test/bap_dwarf/test_leb128.ml b/lib_test/bap_dwarf/test_leb128.ml index c93ebb1b0..413223325 100644 --- a/lib_test/bap_dwarf/test_leb128.ml +++ b/lib_test/bap_dwarf/test_leb128.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 module Leb128 = Dwarf_leb128 diff --git a/lib_test/bap_future/test_future.ml b/lib_test/bap_future/test_future.ml index b47c9f3b0..b8c2f2726 100644 --- a/lib_test/bap_future/test_future.ml +++ b/lib_test/bap_future/test_future.ml @@ -1,6 +1,6 @@ open OUnit2 -open Core_kernel[@@warning "-D"] +open Core open Bap_future.Std diff --git a/lib_test/bap_future/test_stream.ml b/lib_test/bap_future/test_stream.ml index 1d66face7..cd2c41ab2 100644 --- a/lib_test/bap_future/test_stream.ml +++ b/lib_test/bap_future/test_stream.ml @@ -1,6 +1,6 @@ open OUnit2 -open Core_kernel[@@warning "-D"] +open Core open Bap_future.Std diff --git a/lib_test/bap_image/dune b/lib_test/bap_image/dune index 7983bc67e..bcb6adadd 100644 --- a/lib_test/bap_image/dune +++ b/lib_test/bap_image/dune @@ -2,4 +2,4 @@ (name test_image) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap core_kernel ounit2)) + (libraries bap core ounit2)) diff --git a/lib_test/bap_image/test_image.ml b/lib_test/bap_image/test_image.ml index 513eee9bc..ec1b02b07 100644 --- a/lib_test/bap_image/test_image.ml +++ b/lib_test/bap_image/test_image.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 open Or_error open Word_size @@ -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 @@ -91,7 +91,7 @@ let () = List.iter ~f:(fun (name,backend) -> | `Ok -> () | `Duplicate -> failwith name) backends -[@@warning "-D"] + let print_list r = let sexp_of_addr_list = sexp_of_list sexp_of_addr in @@ -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/bap_image/test_memmap.ml b/lib_test/bap_image/test_memmap.ml index 9b6f5a7d4..06746b0fb 100644 --- a/lib_test/bap_image/test_memmap.ml +++ b/lib_test/bap_image/test_memmap.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 open Format open Bap.Std diff --git a/lib_test/bap_image/test_table.ml b/lib_test/bap_image/test_table.ml index 18bd2063e..c9f0548fe 100644 --- a/lib_test/bap_image/test_table.ml +++ b/lib_test/bap_image/test_table.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 open Or_error open Word_size diff --git a/lib_test/bap_project/dune b/lib_test/bap_project/dune index cb93c5909..9671f448e 100644 --- a/lib_test/bap_project/dune +++ b/lib_test/bap_project/dune @@ -2,4 +2,4 @@ (name test_project) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap core_kernel ounit2)) + (libraries bap core ounit2)) diff --git a/lib_test/bap_project/test_project.ml b/lib_test/bap_project/test_project.ml index 0cd9b57f0..0f539b8c0 100644 --- a/lib_test/bap_project/test_project.ml +++ b/lib_test/bap_project/test_project.ml @@ -1,6 +1,6 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Bap_future.Std open OUnit2 open Format diff --git a/lib_test/bap_sema/dune b/lib_test/bap_sema/dune index 5e36ad13b..3a9ae4aea 100644 --- a/lib_test/bap_sema/dune +++ b/lib_test/bap_sema/dune @@ -2,4 +2,4 @@ (name test_sema) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap core_kernel ounit2)) + (libraries bap core ounit2)) diff --git a/lib_test/bap_sema/test_ir.ml b/lib_test/bap_sema/test_ir.ml index 81bcc4062..7effa165c 100644 --- a/lib_test/bap_sema/test_ir.ml +++ b/lib_test/bap_sema/test_ir.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 diff --git a/lib_test/bap_traces/test_traces.ml b/lib_test/bap_traces/test_traces.ml index 82da62117..022651e25 100644 --- a/lib_test/bap_traces/test_traces.ml +++ b/lib_test/bap_traces/test_traces.ml @@ -1,5 +1,5 @@ open OUnit2 -open Core_kernel[@@warning "-D"] +open Core open Or_error open Bap.Std diff --git a/lib_test/bap_types/dune b/lib_test/bap_types/dune index be0a913da..da22be1e2 100644 --- a/lib_test/bap_types/dune +++ b/lib_test/bap_types/dune @@ -2,4 +2,4 @@ (name test_types) (preprocess (pps ppx_bap)) (wrapped false) - (libraries bap core_kernel ounit2)) + (libraries bap core ounit2)) diff --git a/lib_test/bap_types/test_bili.ml b/lib_test/bap_types/test_bili.ml index 2d374e7f0..6e0f01c68 100644 --- a/lib_test/bap_types/test_bili.ml +++ b/lib_test/bap_types/test_bili.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 open Bap.Std @@ -40,7 +40,7 @@ let assert_prg value prg ctxt = assert_equal ~ctxt ~printer value @@ let res = bili#eval prg >>= fun () -> bili#lookup r >>| Bil.Result.value in Monad.State.eval res (new Bili.context) -[@@warning "-D"] + let suite () = "Bili" >::: [ diff --git a/lib_test/bap_types/test_bitvector.ml b/lib_test/bap_types/test_bitvector.ml index 8bef69e16..5296c1cf1 100644 --- a/lib_test/bap_types/test_bitvector.ml +++ b/lib_test/bap_types/test_bitvector.ml @@ -1,5 +1,5 @@ open OUnit2 -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std diff --git a/lib_test/bap_types/test_bytes.ml b/lib_test/bap_types/test_bytes.ml index 4f9658b94..9f65593a9 100644 --- a/lib_test/bap_types/test_bytes.ml +++ b/lib_test/bap_types/test_bytes.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Regular.Std open OUnit2 diff --git a/lib_test/bap_types/test_graph.ml b/lib_test/bap_types/test_graph.ml index 6f37d78c0..5cd5c2b42 100644 --- a/lib_test/bap_types/test_graph.ml +++ b/lib_test/bap_types/test_graph.ml @@ -8,7 +8,7 @@ *) -open Core_kernel[@@warning "-D"] +open Core open Graphlib.Std open Bap.Std open OUnit2 @@ -79,7 +79,7 @@ module Test_algo(Gl : Graph_for_algo) = struct } let add_relation t ~parent ~child = { - children = Map.change t.children parent( function + children = Map.change t.children parent ~f:(function | None -> Some (Node.Set.singleton child) | Some cs when Set.mem cs child -> assert_failure "Child was already adopted" @@ -605,7 +605,7 @@ module Test_partition = struct "Trivial invariant" >:: trivial (P.trivial s); "Discrete invariant" >:: discrete (P.discrete s); "Union invariant" >:: union (P.union (P.discrete s) 1 2) 1 2; - "Refine invariant" >:: refine (P.refine (P.trivial s) equiv cmp) equiv + "Refine invariant" >:: refine (P.refine (P.trivial s) ~equiv ~cmp) equiv ] end diff --git a/lib_test/bap_types/test_optimizations.ml b/lib_test/bap_types/test_optimizations.ml index 911acedf1..cf1511873 100644 --- a/lib_test/bap_types/test_optimizations.ml +++ b/lib_test/bap_types/test_optimizations.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 open Bap.Std diff --git a/lib_test/bap_types/test_trie.ml b/lib_test/bap_types/test_trie.ml index 0736f97d3..206c27624 100644 --- a/lib_test/bap_types/test_trie.ml +++ b/lib_test/bap_types/test_trie.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 @@ -7,9 +7,9 @@ module T = Trie.String.Prefix;; let longest_match _ = let (=) = Option.equal (fun (a,b) (c,d) -> a = c && b = d) in let t = T.create () in - T.add t "" 0; - T.add t "a" 1; - T.add t "abcde" 3; + T.add t ~key:"" ~data:0; + T.add t ~key:"a" ~data:1; + T.add t ~key:"abcde" ~data:3; assert_bool "1." (T.longest_match t "" = Some (0,0)); assert_bool "1.a" (T.longest_match t "a" = Some (1,1)); @@ -20,7 +20,7 @@ let longest_match _ = assert_bool "1.abcdef" (T.longest_match t "abcdef" = Some (5,3)); assert_bool "1.nothing" (T.longest_match t "nothing" = Some (0,0)); - T.add t "abc" 2; + T.add t ~key:"abc" ~data:2; assert_bool "2." (T.longest_match t "" = Some (0,0)); assert_bool "2.a" (T.longest_match t "a" = Some (1,1)); @@ -56,9 +56,9 @@ let longest_match _ = let find _ = let (=) = Option.equal (fun a b -> a = b) in let t = T.create () in - T.add t "a" 1; - T.add t "abcde" 3; - T.add t "abc" 2; + T.add t ~key:"a" ~data:1; + T.add t ~key:"abcde" ~data:3; + T.add t ~key:"abc" ~data:2; T.remove t "abc"; T.remove t ""; diff --git a/lib_test/powerpc/powerpc_add_tests.ml b/lib_test/powerpc/powerpc_add_tests.ml index 698e804fd..39434b2c9 100644 --- a/lib_test/powerpc/powerpc_add_tests.ml +++ b/lib_test/powerpc/powerpc_add_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 diff --git a/lib_test/powerpc/powerpc_arith_tests.ml b/lib_test/powerpc/powerpc_arith_tests.ml index a81ad2a4d..b0610e361 100644 --- a/lib_test/powerpc/powerpc_arith_tests.ml +++ b/lib_test/powerpc/powerpc_arith_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 diff --git a/lib_test/powerpc/powerpc_branch_tests.ml b/lib_test/powerpc/powerpc_branch_tests.ml index e9c1b3666..acbe3f950 100644 --- a/lib_test/powerpc/powerpc_branch_tests.ml +++ b/lib_test/powerpc/powerpc_branch_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 diff --git a/lib_test/powerpc/powerpc_compare_tests.ml b/lib_test/powerpc/powerpc_compare_tests.ml index 189076d4a..93deb9d97 100644 --- a/lib_test/powerpc/powerpc_compare_tests.ml +++ b/lib_test/powerpc/powerpc_compare_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 diff --git a/lib_test/powerpc/powerpc_cr_tests.ml b/lib_test/powerpc/powerpc_cr_tests.ml index cbef15c2c..9954fc685 100644 --- a/lib_test/powerpc/powerpc_cr_tests.ml +++ b/lib_test/powerpc/powerpc_cr_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 diff --git a/lib_test/powerpc/powerpc_load_tests.ml b/lib_test/powerpc/powerpc_load_tests.ml index 4b544e830..b715c3c96 100644 --- a/lib_test/powerpc/powerpc_load_tests.ml +++ b/lib_test/powerpc/powerpc_load_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 diff --git a/lib_test/powerpc/powerpc_logical_tests.ml b/lib_test/powerpc/powerpc_logical_tests.ml index 7ea5f4320..6699f6ce8 100644 --- a/lib_test/powerpc/powerpc_logical_tests.ml +++ b/lib_test/powerpc/powerpc_logical_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 diff --git a/lib_test/powerpc/powerpc_move_tests.ml b/lib_test/powerpc/powerpc_move_tests.ml index b6cf12dc3..b9a8d419d 100644 --- a/lib_test/powerpc/powerpc_move_tests.ml +++ b/lib_test/powerpc/powerpc_move_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 @@ -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_rotate_tests.ml b/lib_test/powerpc/powerpc_rotate_tests.ml index 602a6dd8c..44470c1ab 100644 --- a/lib_test/powerpc/powerpc_rotate_tests.ml +++ b/lib_test/powerpc/powerpc_rotate_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 open Bap.Std diff --git a/lib_test/powerpc/powerpc_shift_tests.ml b/lib_test/powerpc/powerpc_shift_tests.ml index 05d3c3195..ed2109cad 100644 --- a/lib_test/powerpc/powerpc_shift_tests.ml +++ b/lib_test/powerpc/powerpc_shift_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 open Bap.Std diff --git a/lib_test/powerpc/powerpc_store_tests.ml b/lib_test/powerpc/powerpc_store_tests.ml index f583520e4..ad0f39653 100644 --- a/lib_test/powerpc/powerpc_store_tests.ml +++ b/lib_test/powerpc/powerpc_store_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 diff --git a/lib_test/powerpc/powerpc_tests_helpers.ml b/lib_test/powerpc/powerpc_tests_helpers.ml index 0c048672c..7d361bc52 100644 --- a/lib_test/powerpc/powerpc_tests_helpers.ml +++ b/lib_test/powerpc/powerpc_tests_helpers.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 @@ -19,12 +19,12 @@ 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 = Map.set regs name var in + let regs = Map.set regs ~key:name ~data:var in match alias with | None -> regs | Some a -> let name = make_name a i in - Map.set regs name var) range + Map.set regs ~key:name ~data:var) range let flag name = Var.create name (Type.imm 1) @@ -84,9 +84,9 @@ 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) + Map.set acc ~key:(Var.name var) ~data:var) let fields = [ "CR0", 0, (cr28, cr29, cr30, cr31); @@ -101,11 +101,11 @@ module Make(B : Bitwidth) = struct let cr_fields = List.fold fields ~init:String.Map.empty ~f:(fun fs (name, _, fd) -> - Map.set fs name fd) + Map.set fs ~key:name ~data:fd) let cri_fields = List.fold fields ~init:Int.Map.empty ~f:(fun fs (_, index, fd) -> - Map.set fs index fd) + Map.set fs ~key:index ~data:fd) (** fixed precision flags *) let so = flag "SO" (** summary overflow *) @@ -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/lib_test/powerpc/powerpc_tests_helpers.mli b/lib_test/powerpc/powerpc_tests_helpers.mli index c5f046225..52f135f4b 100644 --- a/lib_test/powerpc/powerpc_tests_helpers.mli +++ b/lib_test/powerpc/powerpc_tests_helpers.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 @@ -41,7 +41,7 @@ val check_gpr : ?addr:addr -> bil -> string -> var -> addr -> arch -> test_ctxt of [init_bil] and code, obtained from lifting [bytes]. [addr] is an instruction address, 0 by default. *) val eval : ?addr:addr -> bil -> string -> arch -> Bili.context -[@@warning "-D"] + (** [check_mem init bytes mem ~addr size expected ?endian arch ctxt] - tests if a word of [size] at [addr] in memory [mem] is equal to [expected]. @@ -51,7 +51,7 @@ val check_mem : bil -> string -> var -> addr:addr -> size:size -> addr -> ?endia (** [lookup_var context var] - returns a word, bound to [var] in [context] *) val lookup_var : Bili.context -> var -> word option -[@@warning "-D"] + (** [make_bytes ws] - return a string of bytes, that obtained from concatenaion of [ws] *) diff --git a/lib_test/powerpc/run_powerpc_tests.ml b/lib_test/powerpc/run_powerpc_tests.ml index 30c679164..83091c394 100644 --- a/lib_test/powerpc/run_powerpc_tests.ml +++ b/lib_test/powerpc/run_powerpc_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 open Bap_plugins.Std diff --git a/lib_test/stub_resolver/run_stub_resolver_tests.ml b/lib_test/stub_resolver/run_stub_resolver_tests.ml index 133d2e116..7e134dc21 100644 --- a/lib_test/stub_resolver/run_stub_resolver_tests.ml +++ b/lib_test/stub_resolver/run_stub_resolver_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 let suite = "Stub_resolver" >::: [ diff --git a/lib_test/stub_resolver/stub_resolver_tests.ml b/lib_test/stub_resolver/stub_resolver_tests.ml index bf2eeb3cd..159dcb64f 100644 --- a/lib_test/stub_resolver/stub_resolver_tests.ml +++ b/lib_test/stub_resolver/stub_resolver_tests.ml @@ -18,7 +18,7 @@ *) -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_knowledge open Bap.Std @@ -125,15 +125,15 @@ let run ?(skip=false) name symbols expected should_fail _ctxt = let syms = List.fold symbols ~init:(Map.empty (module String)) ~f:(fun syms (name,data) -> - Map.add_exn syms name data) in + Map.add_exn syms ~key:name ~data) in let prog = create_program syms in let expected = List.fold expected ~init:(Map.empty (module Tid)) ~f:(fun tids (stub, impl) -> Map.add_exn tids - (tid_for_name_exn prog stub) - (tid_for_name_exn prog impl)) in + ~key:(tid_for_name_exn prog stub) + ~data:(tid_for_name_exn prog impl)) in let pairs = Stub_resolver.(links@@run prog) in let equal = Map.equal Tid.equal in let equal = if should_fail then fun x y -> not (equal x y) else equal in diff --git a/lib_test/x86/run_x86_tests.ml b/lib_test/x86/run_x86_tests.ml index 8034c5af1..548020c5e 100644 --- a/lib_test/x86/run_x86_tests.ml +++ b/lib_test/x86/run_x86_tests.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open OUnit2 open Bap_plugins.Std diff --git a/lib_test/x86/test_pcmp.ml b/lib_test/x86/test_pcmp.ml index 31156d2d5..4162efa3d 100644 --- a/lib_test/x86/test_pcmp.ml +++ b/lib_test/x86/test_pcmp.ml @@ -55,7 +55,7 @@ *) -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 @@ -102,7 +102,7 @@ let test insn_name bytes x y ~expected _ctxt = insn_name (Word.to_string word) (Word.to_string expected); Word.equal word expected | _ -> false -[@@warning "-D"] + let test_eqb = let pcmpeqb = "\x66\x0f\x74\xc8" in (** pcmpeqb %xmm1, %xmm0 *) diff --git a/lib_test/x86/test_pshufb.ml b/lib_test/x86/test_pshufb.ml index 084790131..a61880210 100644 --- a/lib_test/x86/test_pshufb.ml +++ b/lib_test/x86/test_pshufb.ml @@ -56,7 +56,7 @@ *) -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open OUnit2 @@ -120,7 +120,7 @@ let test_rr (mask, expected) ctxt = match Bil.Result.value r with | Bil.Imm word -> Word.equal word expected | _ -> false -[@@warning "-D"] + class exn_visitor = object inherit [bool] Stmt.visitor diff --git a/monads.opam b/monads.opam index 8e3c1e227..9fe2ed436 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" + "jane_rope" "ppx_bap" {= version} "odoc" {with-doc} ] diff --git a/oasis/abi b/oasis/abi index 7c7f8d28e..4c097019c 100644 --- a/oasis/abi +++ b/oasis/abi @@ -7,7 +7,7 @@ Library bap_abi Path: lib/bap_abi FindlibName: bap-abi CompiledObject: best - BuildDepends: bap, core_kernel, ppx_bap + BuildDepends: bap, core, ppx_bap Modules: Bap_abi Library abi_plugin @@ -15,7 +15,7 @@ Library abi_plugin Path: plugins/abi FindlibName: bap-plugin-abi CompiledObject: best - BuildDepends: bap, bap-abi, core_kernel + BuildDepends: bap, bap-abi, core InternalModules: Abi_main XMETADescription: apply abi information to a project XMETAExtraLines: tags="abi, pass" \ No newline at end of file diff --git a/oasis/analyze b/oasis/analyze index 7fde96f32..5383c21c3 100644 --- a/oasis/analyze +++ b/oasis/analyze @@ -7,7 +7,7 @@ Library analyze_plugin Path: plugins/analyze FindlibName: bap-plugin-analyze CompiledObject: best - BuildDepends: core_kernel, monads, ppx_bap, linenoise, + BuildDepends: core, monads, ppx_bap, linenoise, bap-knowledge, bap-core-theory, bap-main, bap, bitvec InternalModules: Analyze_main, Analyze_core_commands diff --git a/oasis/api b/oasis/api index 631339d77..391281509 100644 --- a/oasis/api +++ b/oasis/api @@ -7,7 +7,7 @@ Library bap_api Path: lib/bap_api FindlibName: bap-api CompiledObject: best - BuildDepends: bap, core_kernel, ppx_bap + BuildDepends: bap, core, ppx_bap Modules: Bap_api @@ -16,7 +16,7 @@ Library api_plugin Path: plugins/api FindlibName: bap-plugin-api CompiledObject: best - BuildDepends: bap, bap-main, bap-api, fileutils, core_kernel, ppx_bap, regular + BuildDepends: bap, bap-main, bap-api, fileutils, core, ppx_bap, regular InternalModules: Api_main, Api_sites XMETADescription: add parameters to subroutines based on known API DataFiles: api/c/*.h ($datadir/bap/api/c) diff --git a/oasis/arm b/oasis/arm index e29af8a04..3cc9610bc 100644 --- a/oasis/arm +++ b/oasis/arm @@ -6,7 +6,7 @@ Library "bap-arm" XMETADescription: arm lifting Path: lib/arm Build$: flag(everything) || flag(arm) - BuildDepends: bap, core_kernel, ppx_bap, regular, + BuildDepends: bap, core, ppx_bap, regular, bap-core-theory, bap-knowledge, ogre, bitvec, bitvec-order, bap-primus, bap-traces FindlibName: bap-arm @@ -37,7 +37,7 @@ Library arm_plugin Path: plugins/arm FindlibName: bap-plugin-arm BuildDepends: bap, bap-core-theory, bap-abi, bap-arm, bap-c, - core_kernel, bap-main, bap-api, monads, ppx_bap + core, bap-main, bap-api, monads, ppx_bap InternalModules: Arm_main, Arm_gnueabi DataFiles: semantics/*.lisp ($datadir/bap/primus/semantics) XMETADescription: provide ARM lifter diff --git a/oasis/bap-std b/oasis/bap-std index 7834637b1..a5b9daa91 100644 --- a/oasis/bap-std +++ b/oasis/bap-std @@ -20,7 +20,7 @@ Library bap bap-relation, graphlib, regular, - core_kernel, + core, ppx_bap, monads, bitvec, @@ -28,13 +28,12 @@ Library bap bitvec-order, bitvec-sexp, ogre, - fileutils, - core_kernel.caml_unix + fileutils Modules: Bap InternalModules: Bap_project, Bap_self Library top - XMETADescription: Toplevel printers for bap-types and core_kernel + XMETADescription: Toplevel printers for bap-types and core Build$: flag(everything) || flag(bap_std) Path: lib/bap FindLibParent: bap @@ -64,7 +63,7 @@ Library types bap-knowledge, bap-core-theory, bap-main, - core_kernel, + core, ppx_bap InternalModules: Bap_addr, @@ -119,8 +118,8 @@ Library bap_image Build$: flag(everything) || flag(bap_std) FindlibParent: bap FindlibName: image - BuildDepends: bap.types, ogre, mmap, monads, core_kernel, regular, bitvec, - bap-core-theory, bap-knowledge, ppx_bap, core_kernel.caml_unix + BuildDepends: bap.types, ogre, mmap, monads, core, regular, bitvec, + bap-core-theory, bap-knowledge, ppx_bap InternalModules: Bap_fileutils, @@ -146,7 +145,7 @@ Library disasm graphlib, monads, ogre, - core_kernel, + core, regular, bap-core-theory, bap-knowledge, @@ -193,7 +192,7 @@ Library sema bap.types, bap.image, monads, - core_kernel, + core, ppx_bap, graphlib, regular, diff --git a/oasis/bare b/oasis/bare index 084bbd2fe..0a423a407 100644 --- a/oasis/bare +++ b/oasis/bare @@ -7,5 +7,5 @@ Library bare Path: lib/bare FindlibName: bare CompiledObject: best - BuildDepends: core_kernel, parsexp + BuildDepends: core, parsexp Modules: Bare diff --git a/oasis/beagle b/oasis/beagle index e70683be3..47cdb59cc 100644 --- a/oasis/beagle +++ b/oasis/beagle @@ -7,7 +7,7 @@ Library beagle_plugin Path: plugins/beagle FindlibName: bap-plugin-beagle BuildDepends: bap, bap-microx, bap-beagle-prey, bap-strings, - regular, monads, bap-future, core_kernel, ppx_bap, + regular, monads, bap-future, core, ppx_bap, bap-primus InternalModules: Beagle_main XMETADescription: microx powered obfuscated string solver @@ -18,5 +18,5 @@ Library beagle_prey Path: lib/beagle FindlibName: bap-beagle-prey Modules: Beagle_prey - BuildDepends: bap, bap-primus, core_kernel, ppx_bap, monads, regular + BuildDepends: bap, bap-primus, core, ppx_bap, monads, regular XMETADescription: beagle attributes diff --git a/oasis/bil b/oasis/bil index bc0925997..967ce2b15 100644 --- a/oasis/bil +++ b/oasis/bil @@ -7,7 +7,7 @@ Library bil_plugin Path: plugins/bil Build$: flag(everything) || flag(bil) FindlibName: bap-plugin-bil - BuildDepends: bap, bap-core-theory, bap-knowledge, core_kernel, + BuildDepends: bap, bap-core-theory, bap-knowledge, core, ppx_bap, bap-future, monads, bitvec, bitvec-order, ogre, bap-main XMETAExtraLines: tags="bil,analysis,semantics" InternalModules: Bil_main, Bil_lifter, Bil_semantics, Bil_ir, Bil_float diff --git a/oasis/build b/oasis/build index 44bf69561..9b8a60b33 100644 --- a/oasis/build +++ b/oasis/build @@ -16,4 +16,4 @@ Executable "bapbuild" MainIs: bapbuild.ml Install: true CompiledObject: best - BuildDepends: core_kernel, ocamlbuild, bap-build, compiler-libs, ppx_bap + BuildDepends: core, ocamlbuild, bap-build, compiler-libs, ppx_bap diff --git a/oasis/bundle b/oasis/bundle index d7f9d71ef..00ed00c4d 100644 --- a/oasis/bundle +++ b/oasis/bundle @@ -6,7 +6,7 @@ Library bundle Build$: flag(everything) || flag(bundle) Path: lib/bap_bundle FindlibName: bap-bundle - BuildDepends: uri, camlzip, unix, core_kernel, core_kernel.caml_unix, ppx_bap + BuildDepends: uri, camlzip, unix, core, ppx_bap Modules: Bap_bundle InternalModules: Bap_bundle_config @@ -16,4 +16,4 @@ Executable "bapbundle" MainIs: bapbundle.ml Install: true CompiledObject: best - BuildDepends: core_kernel, bap-bundle, fileutils, uri + BuildDepends: core, bap-bundle, fileutils, uri diff --git a/oasis/byteweight b/oasis/byteweight index f7c1b255d..cd836efcc 100644 --- a/oasis/byteweight +++ b/oasis/byteweight @@ -9,14 +9,14 @@ Library bap_byteweight CompiledObject: best Modules: Bap_byteweight, Bap_byteweight_signatures BuildDepends: bap, bap-main, bap-core-theory, bap-knowledge, - core_kernel, uri, camlzip, ppx_bap + core, uri, camlzip, ppx_bap Library byteweight_plugin Path: plugins/byteweight FindlibName: bap-plugin-byteweight Build$: flag(everything) || flag(byteweight) CompiledObject: best - BuildDepends: bap, bap-byteweight, core_kernel, ppx_bap, + BuildDepends: bap, bap-byteweight, core, ppx_bap, bitvec, bitvec-order, bap-knowledge, bap-core-theory, bap-main InternalModules: Byteweight_main diff --git a/oasis/c b/oasis/c index 747ef5eeb..227a0d632 100644 --- a/oasis/c +++ b/oasis/c @@ -8,7 +8,7 @@ Library bap_c Path: lib/bap_c FindlibName: bap-c CompiledObject: best - BuildDepends: bap, bap-abi, bap-api, core_kernel, ppx_bap, monads, regular, + BuildDepends: bap, bap-abi, bap-api, core, ppx_bap, monads, regular, bap-core-theory, bap-knowledge Modules: Bap_c, Bap_c_abi, diff --git a/oasis/cache b/oasis/cache index 403b56df4..e86d329a1 100644 --- a/oasis/cache +++ b/oasis/cache @@ -7,7 +7,7 @@ Library cache_plugin Path: plugins/cache FindlibName: bap-plugin-cache BuildDepends: bap, bap-main, regular, ppx_bap, mmap, fileutils, uuidm, - core_kernel, core_kernel.caml_unix + core InternalModules: Bap_cache, Bap_cache_gc, Bap_cache_main, Bap_cache_types, Bap_cache_utils XMETADescription: provide caching services - XMETAExtraLines: tags="cache" \ No newline at end of file + XMETAExtraLines: tags="cache" diff --git a/oasis/callgraph-collator b/oasis/callgraph-collator index 5683e20df..f4e3c3d21 100644 --- a/oasis/callgraph-collator +++ b/oasis/callgraph-collator @@ -5,7 +5,7 @@ Flag callgraph_collator Library callgraph_collator_plugin Build$: flag(everything) || flag(callgraph_collator) Path: plugins/callgraph_collator - BuildDepends: bap-main, bap, core_kernel, graphlib, ppx_bap, re.pcre + BuildDepends: bap-main, bap, core, graphlib, ppx_bap, re.pcre FindlibName: bap-plugin-callgraph_collator CompiledObject: best InternalModules: Callgraph_collator_main diff --git a/oasis/callsites b/oasis/callsites index a43935942..182744d46 100644 --- a/oasis/callsites +++ b/oasis/callsites @@ -7,7 +7,7 @@ Library callsites_plugin Path: plugins/callsites FindlibName: bap-plugin-callsites CompiledObject: best - BuildDepends: bap, core_kernel + BuildDepends: bap, core Modules: Callsites_main XMETADescription: annotate callsites with subroutine's arguments XMETAExtraLines: tags="pass" \ No newline at end of file diff --git a/oasis/constant-tracker b/oasis/constant-tracker index 379d48c22..8eb24a194 100644 --- a/oasis/constant-tracker +++ b/oasis/constant-tracker @@ -6,7 +6,7 @@ Flag constant_tracker Library constant_tracker_plugin Build$: flag(everything) || flag(constant_tracker) Path: plugins/constant_tracker - BuildDepends: bap-primus, bap, core_kernel + BuildDepends: bap-primus, bap, core FindlibName: bap-plugin-constant_tracker CompiledObject: best InternalModules: Constant_tracker_main diff --git a/oasis/core-theory b/oasis/core-theory index 19f7830b8..8e96ec94a 100644 --- a/oasis/core-theory +++ b/oasis/core-theory @@ -7,7 +7,7 @@ Library bap_core_theory Path: lib/bap_core_theory FindlibName: bap-core-theory CompiledObject: best - BuildDepends: bap-knowledge, core_kernel, core_kernel.caml_unix, + BuildDepends: bap-knowledge, core, bitvec, bitvec-order, bitvec-sexp, bitvec-binprot, ppx_bap Modules: Bap_core_theory InternalModules: @@ -30,7 +30,7 @@ Library core_theory_plugin Path: plugins/core_theory FindlibName: bap-plugin-core_theory BuildDepends: bap-knowledge, bap-core-theory, bap-main, - bitvec, core_kernel, monads, ppx_bap + bitvec, core, monads, ppx_bap InternalModules: Core_theory_main XMETADescription: provides core theory rules XMETAExtraLines: tags="core-theory, semantics" diff --git a/oasis/cxxfilt b/oasis/cxxfilt index bce0fb42b..c06df7dfa 100644 --- a/oasis/cxxfilt +++ b/oasis/cxxfilt @@ -7,7 +7,7 @@ Library "cxxfilt_plugin" Build$: flag(everything) || flag(cxxfilt) FindlibName: bap-plugin-cxxfilt CompiledObject: best - BuildDepends: core_kernel, bap-demangle, bap, core_kernel.caml_unix + BuildDepends: core, bap-demangle, bap InternalModules: Cxxfilt_main, Cxxfilt_config XMETADescription: provide c++filt based demangler XMETAExtraLines: tags="c++, c++filt, demangler" diff --git a/oasis/demangle b/oasis/demangle index 3136191b6..b2b56053b 100644 --- a/oasis/demangle +++ b/oasis/demangle @@ -7,7 +7,7 @@ Library "bap-demangle" Build$: flag(everything) || flag(demangle) FindlibName: bap-demangle CompiledObject: best - BuildDepends: core_kernel, bap-core-theory, bap-knowledge + BuildDepends: core, bap-core-theory, bap-knowledge Modules: Bap_demangle Library "demangle_plugin" @@ -15,7 +15,7 @@ Library "demangle_plugin" Build$: flag(everything) || flag(demangle) FindlibName: bap-plugin-demangle CompiledObject: best - BuildDepends: core_kernel, bap-demangle, bap-main, bap-core-theory, bap-knowledge + BuildDepends: core, bap-demangle, bap-main, bap-core-theory, bap-knowledge InternalModules: Demangle_main XMETADescription: demangle subroutine names XMETAExtraLines: tags="demangler" diff --git a/oasis/dependencies b/oasis/dependencies index 6e53909ab..f7fb72e7c 100644 --- a/oasis/dependencies +++ b/oasis/dependencies @@ -8,6 +8,6 @@ Library dependencies_plugin Path: plugins/dependencies FindlibName: bap-plugin-dependencies CompiledObject: best - BuildDepends: bap, core_kernel, bap-main, ogre, regular, ppx_bap + BuildDepends: bap, core, bap-main, ogre, regular, ppx_bap InternalModules: Dependencies_main XMETAExtraLines: tags="command, dependencies" diff --git a/oasis/disassemble b/oasis/disassemble index 2a513ed3f..c5566b57d 100644 --- a/oasis/disassemble +++ b/oasis/disassemble @@ -8,7 +8,7 @@ Library disassemble_plugin Path: plugins/disassemble FindlibName: bap-plugin-disassemble CompiledObject: best - BuildDepends: bap, bap-knowledge, bap-core-theory, bap-relation, core_kernel, + BuildDepends: bap, bap-knowledge, bap-core-theory, bap-relation, core, ogre, regular, monads, bap-plugins, bap-bundle, bap-main, ppx_bap, bitvec, bitvec-sexp, bitvec-order, bitvec-binprot InternalModules: Disassemble_main, Disassemble_main_rules diff --git a/oasis/dump-symbols b/oasis/dump-symbols index 4b20e59a9..b13ad35e5 100644 --- a/oasis/dump-symbols +++ b/oasis/dump-symbols @@ -7,7 +7,7 @@ Library dump_symbols_plugin Path: plugins/dump_symbols FindlibName: bap-plugin-dump_symbols CompiledObject: best - BuildDepends: bap, core_kernel, ppx_bap, graphlib, regular + BuildDepends: bap, core, ppx_bap, graphlib, regular InternalModules: Dump_symbols_main XMETADescription: dump symbol information as a list of blocks XMETAExtraLines: tags="printer" \ No newline at end of file diff --git a/oasis/dwarf b/oasis/dwarf index 9bd834b04..a85394861 100644 --- a/oasis/dwarf +++ b/oasis/dwarf @@ -7,7 +7,7 @@ Library dwarf Path: lib/bap_dwarf FindlibName: bap-dwarf Build$: flag(everything) || flag(dwarf) - BuildDepends: bap, core_kernel, core_kernel.binary_packing, ppx_bap, regular + BuildDepends: bap, core, core.binary_packing, ppx_bap, regular Modules: Bap_dwarf InternalModules: @@ -21,7 +21,7 @@ Library dwarf_test Path: lib_test/bap_dwarf Build$: flag(tests) && (flag(everything) || flag(dwarf)) CompiledObject: best - BuildDepends: bap-dwarf, oUnit, core_kernel + BuildDepends: bap-dwarf, oUnit, core Install: false Modules: Test_leb128 diff --git a/oasis/elementary b/oasis/elementary index 66c73edfa..c4cec9a6d 100644 --- a/oasis/elementary +++ b/oasis/elementary @@ -7,5 +7,5 @@ Library bap_elementary Path: lib/bap_elementary FindlibName: bap-elementary CompiledObject: best - BuildDepends: bap, bap-knowledge, bap-core-theory, core_kernel, bitvec + BuildDepends: bap, bap-knowledge, bap-core-theory, core, bitvec Modules: Bap_elementary diff --git a/oasis/elf-loader b/oasis/elf-loader index b1bf032e7..73700cfd1 100644 --- a/oasis/elf-loader +++ b/oasis/elf-loader @@ -7,7 +7,7 @@ Library elf Path: lib/bap_elf Build$: flag(everything) || flag(elf_loader) FindlibName: bap-elf - BuildDepends: bitstring, ppx_bitstring, regular, core_kernel, ppx_bap + BuildDepends: bitstring, ppx_bitstring, regular, core, ppx_bap Modules: Bap_elf InternalModules: Elf_parse, @@ -22,7 +22,7 @@ Library elf_loader_plugin Build$: flag(everything) || flag(elf_loader) FindlibName: bap-plugin-elf_loader CompiledObject: best - BuildDepends: bap, bap-elf, bap-dwarf, core_kernel, regular, ppx_bap + BuildDepends: bap, bap-elf, bap-dwarf, core, regular, ppx_bap InternalModules: Elf_loader_main XMETADescription: read ELF and DWARF formats in a pure OCaml XMETAExtraLines: tags="legacy, loader, elf, dwarf" \ No newline at end of file diff --git a/oasis/emit-ida-script b/oasis/emit-ida-script index ff7059b12..67c5c4811 100644 --- a/oasis/emit-ida-script +++ b/oasis/emit-ida-script @@ -6,7 +6,7 @@ Library emit_ida_script_plugin Build$: flag(everything) || flag(emit_ida_script) Path: plugins/emit_ida_script FindlibName: bap-plugin-emit_ida_script - BuildDepends: bap, core_kernel, ppx_bap, regular + BuildDepends: bap, core, ppx_bap, regular Modules: Emit_ida_script_main XMETADescription: extract a IDA python script from bap XMETAExtraLines: tags="ida, python" \ No newline at end of file diff --git a/oasis/flatten b/oasis/flatten index 50745c2ae..382e092d1 100644 --- a/oasis/flatten +++ b/oasis/flatten @@ -8,6 +8,6 @@ Library flatten_plugin Path: plugins/flatten FindlibName: bap-plugin-flatten CompiledObject: best - BuildDepends: bap, core_kernel + BuildDepends: bap, core InternalModules: Flatten_main XMETAExtraLines: tags="pass,analysis,flatten,tac,3ac,unroll" diff --git a/oasis/frontc-parser b/oasis/frontc-parser index 873ae7f50..b0451418c 100644 --- a/oasis/frontc-parser +++ b/oasis/frontc-parser @@ -8,6 +8,6 @@ Library frontc_parser_plugin Path: plugins/frontc_parser FindlibName: bap-plugin-frontc_parser CompiledObject: best - BuildDepends: bap, bap-c, FrontC, core_kernel, ppx_bap, core_kernel.caml_unix + BuildDepends: bap, bap-c, FrontC, core, ppx_bap InternalModules: Frontc_parser_main XMETAExtraLines: tags="api,c,parser" diff --git a/oasis/frontend b/oasis/frontend index 9f3c6552a..bd8bf5501 100644 --- a/oasis/frontend +++ b/oasis/frontend @@ -9,4 +9,4 @@ Executable "bap" NativeOpt: -thread CompiledObject: best BuildDepends: bap-main, bap, bap-core-theory, bap-knowledge, - core_kernel, ppx_bap, findlib.dynload, regular + core, ppx_bap, findlib.dynload, regular diff --git a/oasis/future b/oasis/future index 655df80e1..755acef8d 100644 --- a/oasis/future +++ b/oasis/future @@ -8,7 +8,7 @@ Library bap_future FindlibName: bap-future CompiledObject: best Build$: flag(everything) || flag(future) - BuildDepends: core_kernel, monads + BuildDepends: core, monads Modules: Bap_future Library future_test @@ -23,7 +23,7 @@ Executable run_future_tests Path: lib_test/bap_future Build$: (flag(everything) || flag(future)) && flag(tests) CompiledObject: best - BuildDepends: bap-future, oUnit, core_kernel + BuildDepends: bap-future, oUnit, core Install: false MainIs: run_future_tests.ml diff --git a/oasis/ghidra b/oasis/ghidra index 9cbfa2f49..d0aee7b6e 100644 --- a/oasis/ghidra +++ b/oasis/ghidra @@ -5,7 +5,7 @@ Flag ghidra Library bap_ghidra Path: lib/bap_ghidra Build$: flag(everything) || flag(ghidra) - BuildDepends: bap, core_kernel, ppx_bap, mmap + BuildDepends: bap, core, ppx_bap, mmap FindlibName: bap-ghidra Modules: Bap_ghidra CCOpt: -fPIC @@ -20,6 +20,6 @@ Library ghidra_plugin Build$: flag(everything) || flag(ghidra) FindlibName: bap-plugin-ghidra InternalModules: Ghidra_main - BuildDepends: bap, bap-ghidra, bap-main, core_kernel + BuildDepends: bap, bap-ghidra, bap-main, core DataFiles: semantics/*.lisp ($datadir/bap/primus/semantics) XMETAExtraLines: tags="disassembler, ghidra, p-code, lifter, semantics" diff --git a/oasis/glibc-runtime b/oasis/glibc-runtime index 2bf05a7e7..bd74909b4 100644 --- a/oasis/glibc-runtime +++ b/oasis/glibc-runtime @@ -7,7 +7,7 @@ Library glibc_runtime_plugin Path: plugins/glibc_runtime FindlibName: bap-plugin-glibc_runtime CompiledObject: best - BuildDepends: core_kernel, bap-main, bap, bap-abi, bap-c, ogre, bap-core-theory, bap-knowledge + BuildDepends: core, bap-main, bap, bap-abi, bap-c, ogre, bap-core-theory, bap-knowledge InternalModules: Glibc_runtime_main XMETADescription: detects main and libc_start_main functions XMETAExtraLines: tags="abi, pass" diff --git a/oasis/graphlib b/oasis/graphlib index 7b86ef537..78af3a51e 100644 --- a/oasis/graphlib +++ b/oasis/graphlib @@ -7,8 +7,8 @@ Library graphlib FindlibName: graphlib Build$: flag(everything) || flag(graphlib) CompiledObject: best - BuildDepends: core_kernel, regular, ocamlgraph, ppx_bap, - core_kernel.pairing_heap + BuildDepends: core, regular, ocamlgraph, ppx_bap, + core.pairing_heap Modules: Graphlib InternalModules: Graphlib_graph, diff --git a/oasis/ida b/oasis/ida index 1b58e43af..bd3d6bc85 100644 --- a/oasis/ida +++ b/oasis/ida @@ -10,7 +10,7 @@ Library bap_ida CompiledObject: best Build$: flag(everything) || flag(ida) Modules: Bap_ida - BuildDepends: fileutils, re.posix, core_kernel, ppx_bap + BuildDepends: fileutils, re.posix, core, ppx_bap XMETADescription: make calls into IDA Library bap_ida_plugin @@ -18,9 +18,8 @@ Library bap_ida_plugin Path: plugins/ida FindlibName: bap-plugin-ida CompiledObject: best - BuildDepends: bap, bap-ida, core_kernel, ppx_bap, fileutils, - re.posix, bap-knowledge, graphlib, regular, bap-future, mmap, - core_kernel.caml_unix + BuildDepends: bap, bap-ida, core, ppx_bap, fileutils, + re.posix, bap-knowledge, graphlib, regular, bap-future, mmap Modules: Ida_main InternalModules: Bap_ida_config, Bap_ida_service, Bap_ida_info XMETADescription: use ida to provide rooter, symbolizer and reconstructor diff --git a/oasis/knowledge b/oasis/knowledge index ca4072446..58d773e53 100644 --- a/oasis/knowledge +++ b/oasis/knowledge @@ -7,5 +7,5 @@ Library knowledge Path: lib/knowledge FindlibName: bap-knowledge CompiledObject: best - BuildDepends: core_kernel, core_kernel.caml_unix, monads, ppx_bap + BuildDepends: core, monads, ppx_bap Modules: Bap_knowledge diff --git a/oasis/llvm b/oasis/llvm index 1703b9c36..bdf7f90fe 100644 --- a/oasis/llvm +++ b/oasis/llvm @@ -10,7 +10,7 @@ Flag llvm_static Library bap_llvm Path: lib/bap_llvm Build$: flag(everything) || flag(llvm) - BuildDepends: bap, bap-core-theory, bap-knowledge, bitvec, ogre, monads, core_kernel, ppx_bap, mmap, core_kernel.caml_unix + BuildDepends: bap, bap-core-theory, bap-knowledge, bitvec, ogre, monads, core, ppx_bap, mmap FindlibName: bap-llvm Modules: Bap_llvm, Bap_llvm_loader @@ -47,5 +47,5 @@ Library llvm_plugin Build$: flag(everything) || flag(llvm) FindlibName: bap-plugin-llvm InternalModules: Llvm_main - BuildDepends: bap, bap-llvm, bap-main, core_kernel + BuildDepends: bap, bap-llvm, bap-main, core XMETAExtraLines: tags="disassembler, llvm, loader, elf, macho, coff" diff --git a/oasis/main b/oasis/main index e55238523..4d49c60d0 100644 --- a/oasis/main +++ b/oasis/main @@ -8,7 +8,7 @@ Library bap_main FindLibName: bap-main CompiledObject: best BuildDepends: stdlib-shims, base, stdio, cmdliner, bap-future, - bap-bundle, bap-plugins, bap-recipe, core_kernel, - fileutils, core_kernel.caml_unix + bap-bundle, bap-plugins, bap-recipe, core, + fileutils Modules: Bap_main, Bap_main_config, Bap_main_event InternalModules: Bap_main_log diff --git a/oasis/map-terms b/oasis/map-terms index 1ba9a8887..3446dabb6 100644 --- a/oasis/map-terms +++ b/oasis/map-terms @@ -6,7 +6,7 @@ Library "bap-bml" XMETADescription: BAP Mapping Language Path: lib/bap_bml Build$: flag(everything) || flag(map_terms) - BuildDepends: bap, core_kernel, ppx_bap + BuildDepends: bap, core, ppx_bap FindlibName: bap-bml Modules: Bap_bml @@ -14,7 +14,7 @@ Library map_terms_plugin Build$: flag(everything) || flag(map_terms) Path: plugins/map_terms FindlibName: bap-plugin-map_terms - BuildDepends: bap, bap-bml, core_kernel, ppx_bap, regular, bap-main + BuildDepends: bap, bap-bml, core, ppx_bap, regular, bap-main InternalModules: Map_terms_main, Map_terms_features XMETADescription: map terms using BML DSL XMETAExtraLines: tags="pass" diff --git a/oasis/mc b/oasis/mc index e1f3ce4d5..93c0a25ef 100644 --- a/oasis/mc +++ b/oasis/mc @@ -8,7 +8,7 @@ Library mc_plugin Build$: flag(everything) || flag(mc) CompiledObject: best Modules: Mc_main - BuildDepends: core_kernel, bap-main, bap, regular, bap-plugins, + BuildDepends: core, bap-main, bap, regular, bap-plugins, bap-core-theory, bap-knowledge, ppx_bap, bitvec, ogre XMETAExtraLines: tags="command, disassemble" diff --git a/oasis/microx b/oasis/microx index 0d9e0b566..29a73dd33 100644 --- a/oasis/microx +++ b/oasis/microx @@ -6,5 +6,5 @@ Library microx Build$: flag(everything) || flag(microx) Path: lib/microx FindlibName: bap-microx - BuildDepends: bap, monads, core_kernel, ppx_bap + BuildDepends: bap, monads, core, ppx_bap Modules: Microx, Microx_concretizer, Microx_conqueror diff --git a/oasis/mips b/oasis/mips index 339932a0c..b250b0d48 100644 --- a/oasis/mips +++ b/oasis/mips @@ -6,7 +6,7 @@ Library "bap-mips" Build$: flag(everything) || flag(mips) XMETADescription: common definitions for MIPS targets Path: lib/bap_mips - BuildDepends: core_kernel, ppx_bap, + BuildDepends: core, ppx_bap, ogre, bap-knowledge, bap-core-theory, bap FindlibName: bap-mips Modules: Bap_mips_target @@ -16,7 +16,7 @@ Library mips_plugin Path: plugins/mips FindlibName: bap-plugin-mips Build$: flag(everything) || flag (mips) - BuildDepends: bap, bap-mips, bap-abi, bap-c, bap-core-theory, core_kernel, + BuildDepends: bap, bap-mips, bap-abi, bap-c, bap-core-theory, core, ppx_bap, regular, zarith, bap-knowledge, bap-main, bap-api InternalModules: Mips, diff --git a/oasis/monads b/oasis/monads index 2ae442c9f..c2a7d6544 100644 --- a/oasis/monads +++ b/oasis/monads @@ -7,7 +7,7 @@ Library monads Path: lib/monads FindlibName: monads CompiledObject: best - BuildDepends: core_kernel, ppx_bap, core_kernel.rope + BuildDepends: core, ppx_bap Modules: Monads InternalModules: Monads_monad, Monads_monoid, diff --git a/oasis/objdump b/oasis/objdump index f91436fbc..882d0230d 100644 --- a/oasis/objdump +++ b/oasis/objdump @@ -8,10 +8,9 @@ Library objdump_plugin FindlibName: bap-plugin-objdump CompiledObject: best BuildDepends: re.pcre, bap-core-theory, - core_kernel, bap-knowledge, + core, bap-knowledge, bitvec, bitvec-order, bitvec-sexp, - bap-main, bap-relation, - core_kernel.caml_unix + bap-main, bap-relation InternalModules: Objdump_main, Objdump_config XMETADescription: use objdump to provide a symbolizer XMETAExtraLines: tags="objdump, symbolizer" diff --git a/oasis/ogre b/oasis/ogre index e8a1aae1f..75766913f 100644 --- a/oasis/ogre +++ b/oasis/ogre @@ -9,4 +9,4 @@ Library ogre Path: lib/ogre FindlibName: ogre Modules: Ogre - BuildDepends: core_kernel, monads, ppx_bap + BuildDepends: core, monads, ppx_bap diff --git a/oasis/optimization b/oasis/optimization index cb141c738..2395db246 100644 --- a/oasis/optimization +++ b/oasis/optimization @@ -8,6 +8,6 @@ Library optimization_plugin Path: plugins/optimization FindlibName: bap-plugin-optimization CompiledObject: best - BuildDepends: bap, core_kernel, graphlib, ppx_bap, regular + BuildDepends: bap, core, graphlib, ppx_bap, regular InternalModules: Optimization_main, Optimization_data XMETAExtraLines: tags="pass,analysis,optimization" diff --git a/oasis/patterns b/oasis/patterns index 746b6cd8a..05fdf2011 100644 --- a/oasis/patterns +++ b/oasis/patterns @@ -7,7 +7,7 @@ Library patterns_plugin Path: plugins/patterns FindlibName: bap-plugin-patterns CompiledObject: best - BuildDepends: core_kernel, ppx_bap, bap-knowledge, bap-core-theory, bap-main, bap, + BuildDepends: core, ppx_bap, bap-knowledge, bap-core-theory, bap-main, bap, bitvec, bitvec-order, bitvec-binprot, bitvec-sexp, bap-relation, zarith, xmlm, uri, bap-primus, fileutils diff --git a/oasis/phoenix b/oasis/phoenix index 5a6598c8d..b1a4c6926 100644 --- a/oasis/phoenix +++ b/oasis/phoenix @@ -6,8 +6,8 @@ Library phoenix_plugin Build$: flag(everything) || flag(phoenix) Path: plugins/phoenix FindlibName: bap-plugin-phoenix - BuildDepends: bap, text-tags, ocamlgraph, ezjsonm, core_kernel, graphlib, - regular, ppx_bap, core_kernel.caml_unix + BuildDepends: bap, text-tags, ocamlgraph, ezjsonm, core, graphlib, + regular, ppx_bap InternalModules: Phoenix_main, Phoenix_dot, Phoenix_helpers, diff --git a/oasis/plugins b/oasis/plugins index 85ec6091f..65ee212dc 100644 --- a/oasis/plugins +++ b/oasis/plugins @@ -13,5 +13,5 @@ Library bap_plugins Bap_common, Bap_plugins_loader_backend, Bap_plugins_package - BuildDepends: core_kernel, dynlink, fileutils, findlib, bap-bundle, bap-future, + BuildDepends: core, dynlink, fileutils, findlib, bap-bundle, bap-future, uri, ppx_bap diff --git a/oasis/powerpc b/oasis/powerpc index 264e0a680..786d89dab 100644 --- a/oasis/powerpc +++ b/oasis/powerpc @@ -6,7 +6,7 @@ Library "bap-powerpc" Build$: flag(everything) || flag(powerpc) XMETADescription: common definitions for PowerPC targets Path: lib/bap_powerpc - BuildDepends: core_kernel, ppx_bap, + BuildDepends: core, ppx_bap, ogre, bap-knowledge, bap-core-theory, bap FindlibName: bap-powerpc Modules: Bap_powerpc_target @@ -15,7 +15,7 @@ Library powerpc_plugin XMETADescription: provide PowerPC lifter Path: plugins/powerpc Build$: flag(everything) || flag(powerpc) - BuildDepends: bap, bap-abi, bap-c, zarith, monads, core_kernel, + BuildDepends: bap, bap-abi, bap-c, zarith, monads, core, ppx_bap, regular, bap-api, bap-powerpc, bap-core-theory FindlibName: bap-plugin-powerpc InternalModules: Powerpc, @@ -47,7 +47,7 @@ Library powerpc_test Path: lib_test/powerpc Build$: flag(tests) && (flag(everything) || flag(powerpc)) CompiledObject: best - BuildDepends: bap, oUnit, core_kernel, ppx_bap + BuildDepends: bap, oUnit, core, ppx_bap Install: false Modules: Powerpc_add_tests, Powerpc_arith_tests, diff --git a/oasis/primus b/oasis/primus index c5463faa9..63aaf7e53 100644 --- a/oasis/primus +++ b/oasis/primus @@ -9,7 +9,7 @@ Library bap_primus FindlibName: bap-primus CompiledObject: best BuildDepends: bap, bap-abi, bap-c, uuidm, bap-future, parsexp, bap-strings, - core_kernel, regular, monads, graphlib, bap-knowledge, + core, regular, monads, graphlib, bap-knowledge, bap-core-theory, zarith, bitvec, zarith, ppx_bap, bitvec-binprot Modules: Bap_primus diff --git a/oasis/primus-dictionary b/oasis/primus-dictionary index ee2f3672a..657d22d71 100644 --- a/oasis/primus-dictionary +++ b/oasis/primus-dictionary @@ -5,7 +5,7 @@ Flag primus_dictionary Library primus_dictionary_library_plugin Build$: flag(everything) || flag(primus_dictionary) Path: plugins/primus_dictionary - BuildDepends: bap-primus, bap, core_kernel, bap-core-theory + BuildDepends: bap-primus, bap, core, bap-core-theory FindlibName: bap-plugin-primus_dictionary CompiledObject: best InternalModules: Primus_dictionary_main diff --git a/oasis/primus-exploring b/oasis/primus-exploring index ccf1d6056..881c77bb6 100644 --- a/oasis/primus-exploring +++ b/oasis/primus-exploring @@ -7,7 +7,7 @@ Library primus_exploring_scheduler_plugin Build$: flag(everything) || flag(primus_exploring) FindlibName: bap-plugin-primus_exploring CompiledObject: best - BuildDepends: bap, bap-primus, core_kernel, monads, bap-future + BuildDepends: bap, bap-primus, core, monads, bap-future XMETADescription: evaluates all machines, prioritizing the least visited Modules: Primus_exploring_main XMETAExtraLines: tags="primus, scheduler" \ No newline at end of file diff --git a/oasis/primus-greedy b/oasis/primus-greedy index e260f1952..43340d7d0 100644 --- a/oasis/primus-greedy +++ b/oasis/primus-greedy @@ -7,7 +7,7 @@ Library primus_greedy_scheduler_plugin Build$: flag(everything) || flag(primus_greedy) FindlibName: bap-plugin-primus_greedy CompiledObject: best - BuildDepends: bap, bap-primus, core_kernel, monads + BuildDepends: bap, bap-primus, core, monads XMETADescription: evaluates all machines in the DFS order Modules: Primus_greedy_main XMETAExtraLines: tags="primus, scheduler" diff --git a/oasis/primus-limit b/oasis/primus-limit index d4a9b8639..cf43834fe 100644 --- a/oasis/primus-limit +++ b/oasis/primus-limit @@ -7,7 +7,7 @@ Library primus_limit Build$: flag(everything) || flag(primus_limit) FindlibName: bap-plugin-primus_limit CompiledObject: best - BuildDepends: bap, bap-primus, bap, core_kernel, monads, bap-future, regular + BuildDepends: bap, bap-primus, bap, core, monads, bap-future, regular XMETADescription: ensures termination by limiting Primus machines Modules: Primus_limit_main XMETAExtraLines: tags="primus" diff --git a/oasis/primus-lisp b/oasis/primus-lisp index 9caa9d9a0..3ae6109c2 100644 --- a/oasis/primus-lisp +++ b/oasis/primus-lisp @@ -6,7 +6,7 @@ Flag primus_lisp Library primus_lisp_library_plugin Build$: flag(everything) || flag(primus_lisp) Path: plugins/primus_lisp - BuildDepends: bap-primus, core_kernel, bap, ppx_bap, monads, regular, + BuildDepends: bap-primus, core, bap, ppx_bap, monads, regular, bap-knowledge, bap-core-theory, bitvec, bap-main FindlibName: bap-plugin-primus_lisp CompiledObject: best diff --git a/oasis/primus-loader b/oasis/primus-loader index 1a05b51e0..011077bea 100644 --- a/oasis/primus-loader +++ b/oasis/primus-loader @@ -7,7 +7,7 @@ Library primus_loader_plugin Build$: flag(everything) || flag(primus_loader) FindlibName: bap-plugin-primus_loader CompiledObject: best - BuildDepends: bap, bap-core-theory, bap-primus, core_kernel, ogre, ppx_bap + BuildDepends: bap, bap-core-theory, bap-primus, core, ogre, ppx_bap XMETADescription: generic program loader for Primus Modules: Primus_loader_main InternalModules: Primus_loader_basic diff --git a/oasis/primus-machine b/oasis/primus-machine index 77c2b988b..4b015e368 100644 --- a/oasis/primus-machine +++ b/oasis/primus-machine @@ -9,5 +9,5 @@ Library bap_primus_machine Path: lib/bap_primus_machine FindlibName: bap-primus-machine CompiledObject: best - BuildDepends: bap-knowledge, core_kernel, monads, ppx_bap + BuildDepends: bap-knowledge, core, monads, ppx_bap Modules: Bap_primus_machine diff --git a/oasis/primus-powerpc b/oasis/primus-powerpc index c4fcd0a70..b19e05364 100644 --- a/oasis/primus-powerpc +++ b/oasis/primus-powerpc @@ -7,7 +7,7 @@ Library primus_powerpc_plugin Build$: flag(everything) || flag(primus_powerpc) FindlibName: bap-plugin-primus_powerpc CompiledObject: best - BuildDepends: bap, bap-primus, core_kernel + BuildDepends: bap, bap-primus, core XMETADescription: powerpc support package Modules: Primus_powerpc_main XMETAExtraLines: tags="primus, powerpc" diff --git a/oasis/primus-print b/oasis/primus-print index cf690d3eb..93c445b77 100644 --- a/oasis/primus-print +++ b/oasis/primus-print @@ -7,7 +7,7 @@ Library primus_print_plugin Build$: flag(everything) || flag(primus_print) FindlibName: bap-plugin-primus_print CompiledObject: best - BuildDepends: bap-primus, bare, bap, bap-knowledge, bap-core-theory, core_kernel, ppx_bap, bap-future, monads + BuildDepends: bap-primus, bare, bap, bap-knowledge, bap-core-theory, core, ppx_bap, bap-future, monads XMETADescription: prints Primus states and observations Modules: Primus_print_main XMETAExtraLines: tags="primus, printer" \ No newline at end of file diff --git a/oasis/primus-promiscuous b/oasis/primus-promiscuous index e79f8df8e..72d4b4879 100644 --- a/oasis/primus-promiscuous +++ b/oasis/primus-promiscuous @@ -7,7 +7,7 @@ Library primus_promiscuous_plugin Build$: flag(everything) || flag(primus_promiscuous) FindlibName: bap-plugin-primus_promiscuous CompiledObject: best - BuildDepends: bap, bap-primus, core_kernel, monads + BuildDepends: bap, bap-primus, core, monads XMETADescription: enables the promiscuous mode of execution Modules: Primus_promiscuous_main XMETAExtraLines: tags="primus, fuzz" \ No newline at end of file diff --git a/oasis/primus-propagate-taint b/oasis/primus-propagate-taint index f9782d704..e80717294 100644 --- a/oasis/primus-propagate-taint +++ b/oasis/primus-propagate-taint @@ -8,7 +8,7 @@ Library primus_propagate_taint_plugin Build$: flag(everything) || flag(primus_propagate_taint) FindlibName: bap-plugin-primus_propagate_taint CompiledObject: best - BuildDepends: bap-primus, bap-taint, core_kernel, bap, monads, ppx_bap + BuildDepends: bap-primus, bap-taint, core, bap, monads, ppx_bap XMETADescription: a compatibility layer between different taint analysis frameworks InternalModules: Primus_propagate_taint_main XMETAExtraLines: tags="dataflow, pass, taint, primus" diff --git a/oasis/primus-random b/oasis/primus-random index 77f47669d..fe88f4599 100644 --- a/oasis/primus-random +++ b/oasis/primus-random @@ -5,7 +5,7 @@ Flag primus_random Library primus_random_library_plugin Build$: flag(everything) || flag(primus_random) Path: plugins/primus_random - BuildDepends: bap-primus, bap, core_kernel, ppx_bap, bap-main, + BuildDepends: bap-primus, bap, core, ppx_bap, bap-main, bitvec, bitvec-sexp, zarith, bap-core-theory FindlibName: bap-plugin-primus_random CompiledObject: best diff --git a/oasis/primus-region b/oasis/primus-region index 8a440bcf2..ec1096422 100644 --- a/oasis/primus-region +++ b/oasis/primus-region @@ -5,7 +5,7 @@ Flag primus_region Library primus_region_library_plugin Build$: flag(everything) || flag(primus_region) Path: plugins/primus_region - BuildDepends: bap-core-theory, bap-primus, bap, core_kernel, ppx_bap, monads + BuildDepends: bap-core-theory, bap-primus, bap, core, ppx_bap, monads FindlibName: bap-plugin-primus_region CompiledObject: best InternalModules: Primus_region_main diff --git a/oasis/primus-round-robin b/oasis/primus-round-robin index 7f2e1bee7..492dffb78 100644 --- a/oasis/primus-round-robin +++ b/oasis/primus-round-robin @@ -8,7 +8,7 @@ Library primus_round_robin_scheduler_plugin Build$: flag(everything) || flag(primus_round_robin) FindlibName: bap-plugin-primus_round_robin CompiledObject: best - BuildDepends: bap, bap-primus, core_kernel, monads, bap-future + BuildDepends: bap, bap-primus, core, monads, bap-future XMETADescription: evaluates all machines in the BFS order Modules: Primus_round_robin_main XMETAExtraLines: tags="primus, scheduler" \ No newline at end of file diff --git a/oasis/primus-symbolic-executor b/oasis/primus-symbolic-executor index 50d9fb642..4541e28c9 100644 --- a/oasis/primus-symbolic-executor +++ b/oasis/primus-symbolic-executor @@ -6,7 +6,7 @@ Flag primus_symbolic_executor Library primus_symbolic_executor_plugin Build$: flag(everything) || flag(primus_symbolic_executor) Path: plugins/primus_symbolic_executor - BuildDepends: bap-primus, bap, core_kernel, bitvec, ppx_bap, + BuildDepends: bap-primus, bap, core, bitvec, ppx_bap, zarith, z3, regular, bap-main, monads, bap-primus-track-visited, bap-core-theory FindlibName: bap-plugin-primus_symbolic_executor diff --git a/oasis/primus-systems b/oasis/primus-systems index d645bfe46..7a1b701ad 100644 --- a/oasis/primus-systems +++ b/oasis/primus-systems @@ -6,7 +6,7 @@ Flag primus_systems Library primus_systems_plugin Build$: flag(everything) || flag(primus_systems) Path: plugins/primus_systems - BuildDepends: bap-primus, bap-main, core_kernel, bap-knowledge + BuildDepends: bap-primus, bap-main, core, bap-knowledge FindlibName: bap-plugin-primus_systems CompiledObject: best InternalModules: Primus_systems_main diff --git a/oasis/primus-taint b/oasis/primus-taint index 1d077a71b..1cec1687a 100644 --- a/oasis/primus-taint +++ b/oasis/primus-taint @@ -8,7 +8,7 @@ Library primus_taint_plugin Build$: flag(everything) || flag(primus_taint) FindlibName: bap-plugin-primus_taint CompiledObject: best - BuildDepends: bap-primus, bap-taint, bap, core_kernel, regular, monads + BuildDepends: bap-primus, bap-taint, bap, core, regular, monads XMETADescription: a taint analysis control interface DataFiles: lisp/*.lisp ($datadir/bap/primus/site-lisp) InternalModules: Primus_taint_main, Primus_taint_policies diff --git a/oasis/primus-test b/oasis/primus-test index 291e8e58d..2669bf988 100644 --- a/oasis/primus-test +++ b/oasis/primus-test @@ -6,7 +6,7 @@ Flag primus_test Library primus_test_library_plugin Build$: flag(everything) || flag(primus_test) Path: plugins/primus_test - BuildDepends: bap-primus, bap, core_kernel, monads, regular, bitvec, bitvec-order, zarith + BuildDepends: bap-primus, bap, core, monads, regular, bitvec, bitvec-order, zarith FindlibName: bap-plugin-primus_test CompiledObject: best InternalModules: Primus_test_main diff --git a/oasis/primus-track-visited b/oasis/primus-track-visited index e71d2d36d..f86e8f9d7 100644 --- a/oasis/primus-track-visited +++ b/oasis/primus-track-visited @@ -7,7 +7,7 @@ Library bap_primus_track_visited Build$: flag(everything) || flag(primus_track_visited) FindlibName: bap-primus-track-visited CompiledObject: best - BuildDepends: bap-primus, bap, core_kernel, ppx_bap + BuildDepends: bap-primus, bap, core, ppx_bap XMETADescription: tracks basic blocks visited by Primus Modules: Bap_primus_track_visited XMETAExtraLines: tags="primus" \ No newline at end of file diff --git a/oasis/primus-wandering b/oasis/primus-wandering index 115552fec..aa3e8642f 100644 --- a/oasis/primus-wandering +++ b/oasis/primus-wandering @@ -8,7 +8,7 @@ Library primus_wandering_scheduler_plugin Build$: flag(everything) || flag(primus_wandering) FindlibName: bap-plugin-primus_wandering CompiledObject: best - BuildDepends: bap, bap-primus, core_kernel, monads, bap-future + BuildDepends: bap, bap-primus, core, monads, bap-future XMETADescription: evaluates all machines while Modules: Primus_wandering_main XMETAExtraLines: tags="primus, scheduler" \ No newline at end of file diff --git a/oasis/primus-x86 b/oasis/primus-x86 index 87eb31723..179e90465 100644 --- a/oasis/primus-x86 +++ b/oasis/primus-x86 @@ -7,7 +7,7 @@ Library primus_x86_plugin Build$: flag(everything) || flag(primus_x86) FindlibName: bap-plugin-primus_x86 CompiledObject: best - BuildDepends: bap, bap-core-theory, bap-primus, core_kernel, bap-x86-cpu, regular + BuildDepends: bap, bap-core-theory, bap-primus, core, bap-x86-cpu, regular XMETADescription: x86 support package Modules: Primus_x86_main InternalModules: Primus_x86_loader diff --git a/oasis/print b/oasis/print index 41146686e..b6961b953 100644 --- a/oasis/print +++ b/oasis/print @@ -8,9 +8,9 @@ Library print_plugin Build$: flag(everything) || flag(print) Path: plugins/print FindlibName: bap-plugin-print - BuildDepends: bap, text-tags, bap-demangle, core_kernel, + BuildDepends: bap, text-tags, bap-demangle, core, bap-core-theory, regular, graphlib, re.pcre, - ogre, bap-knowledge, core_kernel.caml_unix + ogre, bap-knowledge InternalModules: Print_main XMETADescription: print project in various formats - XMETAExtraLines: tags="printer" \ No newline at end of file + XMETAExtraLines: tags="printer" diff --git a/oasis/propagate-taint b/oasis/propagate-taint index ed0575a30..a2ff7f585 100644 --- a/oasis/propagate-taint +++ b/oasis/propagate-taint @@ -6,7 +6,7 @@ Library propagate_taint_plugin Build$: flag(everything) || flag(propagate_taint) Path: plugins/propagate_taint FindlibName: bap-plugin-propagate_taint - BuildDepends: bap, bap-core-theory, bap-microx, core_kernel, ppx_bap, monads, regular, graphlib + BuildDepends: bap, bap-core-theory, bap-microx, core, ppx_bap, monads, regular, graphlib InternalModules: Propagate_taint_main, Propagator XMETADescription: propagate taints through a program XMETAExtraLines: tags="dataflow, pass, taint" \ No newline at end of file diff --git a/oasis/radare2 b/oasis/radare2 index 75ef95ef8..330a7250c 100644 --- a/oasis/radare2 +++ b/oasis/radare2 @@ -8,9 +8,8 @@ Library radare2_plugin FindlibName: bap-plugin-radare2 CompiledObject: best BuildDepends: bap, re.pcre, regular, bap-core-theory, - bap-future, core_kernel, bap-knowledge, - zarith, bitvec, yojson, bap-relation, bap-arm, - core_kernel.caml_unix + bap-future, core, bap-knowledge, + zarith, bitvec, yojson, bap-relation, bap-arm InternalModules: Radare2_main XMETADescription: use radare2 to provide a symbolizer XMETAExtraLines: tags="symbolizer, radare2" diff --git a/oasis/raw b/oasis/raw index 62e81ef22..59defd536 100644 --- a/oasis/raw +++ b/oasis/raw @@ -7,5 +7,5 @@ Library bap_raw_plugin Path: plugins/raw FindlibName: bap-plugin-raw CompiledObject: best - BuildDepends: bap, core_kernel, ppx_bap, bap-main, bitvec, ogre, core_kernel.caml_unix + BuildDepends: bap, core, ppx_bap, bap-main, bitvec, ogre Modules: Raw_main diff --git a/oasis/read-symbols b/oasis/read-symbols index 0c381a312..e553fc859 100644 --- a/oasis/read-symbols +++ b/oasis/read-symbols @@ -6,7 +6,7 @@ Library read_symbols_plugin Build$: flag(everything) || flag(read_symbols) Path: plugins/read_symbols FindlibName: bap-plugin-read_symbols - BuildDepends: bap-main, core_kernel, bap-core-theory, bap-knowledge, + BuildDepends: bap-main, core, bap-core-theory, bap-knowledge, bitvec, bap-relation Modules: Read_symbols_main XMETADescription: read symbol information from file diff --git a/oasis/regular b/oasis/regular index 221f30ce0..44692013d 100644 --- a/oasis/regular +++ b/oasis/regular @@ -7,7 +7,7 @@ Library regular Path: lib/regular FindlibName: regular CompiledObject: best - BuildDepends: core_kernel, ppx_bap + BuildDepends: core, ppx_bap Modules: Regular InternalModules: Regular_bytes, diff --git a/oasis/relocatable b/oasis/relocatable index 96c3b3b97..655012962 100644 --- a/oasis/relocatable +++ b/oasis/relocatable @@ -8,7 +8,7 @@ Library relocatable_plugin Build$: flag(everything) || flag(relocatable) FindlibName: bap-plugin-relocatable InternalModules: Rel_symbolizer - BuildDepends: bap, ogre, bap-knowledge, core_kernel, monads, + BuildDepends: bap, ogre, bap-knowledge, core, monads, bitvec, bitvec-order, bitvec-sexp, bap-core-theory, ppx_bap, bap-main, bap-arm, bap-powerpc, bap-x86-cpu XMETAExtraLines: tags="brancher, loader, ogre" \ No newline at end of file diff --git a/oasis/report b/oasis/report index 89fe3dd18..87a380568 100644 --- a/oasis/report +++ b/oasis/report @@ -7,7 +7,7 @@ Library report_plugin Path: plugins/report FindlibName: bap-plugin-report CompiledObject: best - BuildDepends: bap, core_kernel, bap-future, core_kernel.caml_unix + BuildDepends: bap, core, bap-future InternalModules: Report_main XMETADescription: reports program status XMETAExtraLines: tags="report, visualization" diff --git a/oasis/riscv b/oasis/riscv index a50449e5b..825228ae3 100644 --- a/oasis/riscv +++ b/oasis/riscv @@ -6,7 +6,7 @@ Library "bap-riscv" Build$: flag(everything) || flag(riscv) XMETADescription: common definitions for Riscv targets Path: lib/bap_riscv - BuildDepends: core_kernel, bap-knowledge, bap-core-theory + BuildDepends: core, bap-knowledge, bap-core-theory FindlibName: bap-riscv Modules: Bap_riscv_target @@ -14,7 +14,7 @@ Library riscv_plugin XMETADescription: provide Riscv target Path: plugins/riscv Build$: flag(everything) || flag(riscv) - BuildDepends: core_kernel, ppx_bap, ogre, + BuildDepends: core, ppx_bap, ogre, bap-core-theory, bap-knowledge, bap-main, bap, bap-riscv, bap-c, bap-abi, bap-api, monads diff --git a/oasis/run b/oasis/run index 1bf1d0cdf..3d8eff985 100644 --- a/oasis/run +++ b/oasis/run @@ -7,7 +7,7 @@ Library run_plugin Path: plugins/run FindlibName: bap-plugin-run CompiledObject: best - BuildDepends: bap, bap-primus, core_kernel, graphlib, monads, regular, + BuildDepends: bap, bap-primus, core, graphlib, monads, regular, bap-knowledge, bap-core-theory InternalModules: Run_main XMETADescription: a pass that will run a program diff --git a/oasis/specification b/oasis/specification index 53e684db5..f02e68486 100644 --- a/oasis/specification +++ b/oasis/specification @@ -8,6 +8,6 @@ Library specification_plugin Path: plugins/specification FindlibName: bap-plugin-specification CompiledObject: best - BuildDepends: bap, core_kernel, bap-main, ogre, regular + BuildDepends: bap, core, bap-main, ogre, regular InternalModules: Specification_main XMETAExtraLines: tags="command, specification" diff --git a/oasis/strings b/oasis/strings index df38cbecf..150e2820e 100644 --- a/oasis/strings +++ b/oasis/strings @@ -6,7 +6,7 @@ Library strings_plugin Build$: flag(everything) || flag(strings) Path: plugins/strings FindlibName: bap-plugin-strings - BuildDepends: bap, bap-strings, bap-beagle-prey, core_kernel, regular + BuildDepends: bap, bap-strings, bap-beagle-prey, core, regular InternalModules: Strings_main XMETAExtraLines: tags="pass, strings" XMETADescription: find strings of characters diff --git a/oasis/strings-library b/oasis/strings-library index c192588be..ea99982cf 100644 --- a/oasis/strings-library +++ b/oasis/strings-library @@ -7,7 +7,7 @@ Library bap_strings Build$: flag(everything) || flag(strings_library) Path: lib/bap_strings FindlibName: bap-strings - BuildDepends: core_kernel,ppx_bap + BuildDepends: core,ppx_bap Modules: Bap_strings, Bap_strings_detector, Bap_strings_index, diff --git a/oasis/stub-resolver b/oasis/stub-resolver index d095440e5..7e7d80a0c 100644 --- a/oasis/stub-resolver +++ b/oasis/stub-resolver @@ -5,7 +5,7 @@ Flag stub_resolver Library bap-plugin-stub_resolver Build$: flag(everything) || flag(stub_resolver) Path: plugins/stub_resolver/ - BuildDepends: bap, bap-abi, bap-knowledge, bap-core-theory, core_kernel, + BuildDepends: bap, bap-abi, bap-knowledge, bap-core-theory, core, bitvec, bitvec-order, bitvec-sexp, bap-main, ppx_bap, ogre, graphlib, regular FindlibName: bap-plugin-stub_resolver @@ -23,7 +23,7 @@ Library stub_resolver_tests FindlibName: tests Build$: flag(tests) && (flag(everything) || flag(stub_resolver)) CompiledObject: best - BuildDepends: bap, oUnit, core_kernel, ppx_bap, bap-plugin-stub_resolver + BuildDepends: bap, oUnit, core, ppx_bap, bap-plugin-stub_resolver Install: false Modules: Stub_resolver_tests diff --git a/oasis/systemz b/oasis/systemz index f68d4fdc5..56ceb4198 100644 --- a/oasis/systemz +++ b/oasis/systemz @@ -6,7 +6,7 @@ Library "bap-systemz" Build$: flag(everything) || flag(systemz) XMETADescription: common definitions for Systemz targets Path: lib/bap_systemz - BuildDepends: core_kernel, bap-knowledge, bap-core-theory + BuildDepends: core, bap-knowledge, bap-core-theory FindlibName: bap-systemz Modules: Bap_systemz_target @@ -14,7 +14,7 @@ Library systemz_plugin XMETADescription: provide Systemz lifter Path: plugins/systemz Build$: flag(everything) || flag(systemz) - BuildDepends: core_kernel, ppx_bap, ogre, + BuildDepends: core, ppx_bap, ogre, bap-core-theory, bap-knowledge, bap-main, bap, bap-systemz FindlibName: bap-plugin-systemz diff --git a/oasis/taint b/oasis/taint index 321061d46..b9ba09414 100644 --- a/oasis/taint +++ b/oasis/taint @@ -7,14 +7,14 @@ Library taint Path: lib/bap_taint FindlibName: bap-taint CompiledObject: best - BuildDepends: core_kernel, bap, bap-primus, monads, ppx_bap, bap-strings, regular + BuildDepends: core, bap, bap-primus, monads, ppx_bap, bap-strings, regular Modules: Bap_taint Library taint_plugin Build$: flag(everything) || flag(taint) Path: plugins/taint FindlibName: bap-plugin-taint - BuildDepends: bap, core_kernel, ppx_bap, regular + BuildDepends: bap, core, ppx_bap, regular InternalModules: Taint_main XMETADescription: taint specified terms XMETAExtraLines: tags="dataflow, pass, taint" diff --git a/oasis/tests b/oasis/tests index 966d9a115..5dda6b25f 100644 --- a/oasis/tests +++ b/oasis/tests @@ -3,7 +3,7 @@ Library types_test Build$: (flag(everything) || flag(bap_std)) && flag(tests) Install: false CompiledObject: best - BuildDepends: bap, oUnit, core_kernel, regular, graphlib, ocamlgraph, bap-future, ppx_bap + BuildDepends: bap, oUnit, core, regular, graphlib, ocamlgraph, bap-future, ppx_bap Modules: Test_bitvector, Test_bili, Test_bytes, @@ -15,7 +15,7 @@ Library image_test Path: lib_test/bap_image Build$: (flag(everything) || flag(bap_std)) && flag(tests) CompiledObject: best - BuildDepends: bap, oUnit, core_kernel, bap-future + BuildDepends: bap, oUnit, core, bap-future Install: false Modules: Test_image, Test_memmap, @@ -25,7 +25,7 @@ Library project_test Path: lib_test/bap_project Build$: (flag(everything) || flag(bap_std)) && flag(tests) CompiledObject: best - BuildDepends: bap, oUnit, core_kernel, bap-core-theory, bap-future, bap-knowledge + BuildDepends: bap, oUnit, core, bap-core-theory, bap-future, bap-knowledge Install: false Modules: Test_project @@ -33,7 +33,7 @@ Library disasm_test Path: lib_test/bap_disasm Build$: (flag(everything) || flag(bap_std)) && flag(tests) CompiledObject: best - BuildDepends: bap, oUnit, str, core_kernel, regular, ppx_bap + BuildDepends: bap, oUnit, str, core, regular, ppx_bap Install: false Modules: Test_disasm @@ -41,7 +41,7 @@ Library sema_test Path: lib_test/bap_sema Build$: (flag(everything) || flag(bap_std)) && flag(tests) CompiledObject: best - BuildDepends: bap, oUnit, core_kernel + BuildDepends: bap, oUnit, core Install: false Modules: Test_ir @@ -56,7 +56,7 @@ Executable run_tests sema_test, types_test, project_test, - core_kernel, + core, bap-plugins, bap-main, findlib.dynload diff --git a/oasis/text-tags b/oasis/text-tags index 4cf182f17..626bb4a06 100644 --- a/oasis/text-tags +++ b/oasis/text-tags @@ -7,5 +7,5 @@ Library "text-tags" Build$: flag(everything) || flag(text_tags) FindlibName: text-tags CompiledObject: best - BuildDepends: core_kernel, core_kernel.caml_unix + BuildDepends: core Modules: Text_tags diff --git a/oasis/thumb b/oasis/thumb index e29092cfe..405425bea 100644 --- a/oasis/thumb +++ b/oasis/thumb @@ -6,7 +6,7 @@ Library thumb_plugin XMETADescription: provide Thumb lifter Path: plugins/thumb Build$: flag(everything) || flag(thumb) - BuildDepends: core_kernel, ppx_bap, ogre, + BuildDepends: core, ppx_bap, ogre, bap-core-theory, bap-knowledge, bap-main, bap, bap-arm, bitvec FindlibName: bap-plugin-thumb diff --git a/oasis/trace b/oasis/trace index d720355ba..77dbc6fd4 100644 --- a/oasis/trace +++ b/oasis/trace @@ -8,7 +8,7 @@ Library trace_plugin FindlibName: bap-plugin-trace CompiledObject: best Modules: Trace_main - BuildDepends: bap, bap-traces, core_kernel, ppx_bap, bap-plugins, - bap-future, uri, regular, core_kernel.caml_unix + BuildDepends: bap, bap-traces, core, ppx_bap, bap-plugins, + bap-future, uri, regular XMETADescription: manage execution traces - XMETAExtraLines: tags="dynamic, pass, printer, trace" \ No newline at end of file + XMETAExtraLines: tags="dynamic, pass, printer, trace" diff --git a/oasis/traces b/oasis/traces index 06772b05c..504265876 100644 --- a/oasis/traces +++ b/oasis/traces @@ -18,7 +18,7 @@ Library traces Bap_trace_std, Bap_trace_traces, Bap_trace - BuildDepends: bap, core_kernel, bap-core-theory, bap-knowledge, uri, uuidm, regular, ppx_bap, core_kernel.caml_unix + BuildDepends: bap, core, bap-core-theory, bap-knowledge, uri, uuidm, regular, ppx_bap Library traces_test Path: lib_test/bap_traces @@ -26,7 +26,7 @@ Library traces_test Install: false CompiledObject: best Modules: Test_traces - BuildDepends: bap, bap-traces, oUnit, core_kernel, uri, ppx_bap + BuildDepends: bap, bap-traces, oUnit, core, uri, ppx_bap Executable run_traces_tests diff --git a/oasis/trivial-condition-form b/oasis/trivial-condition-form index 3d3b6dd83..47865cfae 100644 --- a/oasis/trivial-condition-form +++ b/oasis/trivial-condition-form @@ -7,7 +7,7 @@ Library trivial_condition_form_plugin Path: plugins/trivial_condition_form FindlibName: bap-plugin-trivial_condition_form CompiledObject: best - BuildDepends: bap, core_kernel + BuildDepends: bap, core Modules: Trivial_condition_form_main XMETADescription: eliminates complex conditionals in branches XMETAExtraLines: tags="pass" \ No newline at end of file diff --git a/oasis/warn-unused b/oasis/warn-unused index d9c0818bb..b8ca9c967 100644 --- a/oasis/warn-unused +++ b/oasis/warn-unused @@ -6,7 +6,7 @@ Library warn_unused_plugin Build$: flag(everything) || flag(warn_unused) Path: plugins/warn_unused FindlibName: bap-plugin-warn_unused - BuildDepends: bap, core_kernel + BuildDepends: bap, core InternalModules: Warn_unused_main XMETADescription: warn about unused results of certain functions XMETAExtraLines: tags="analysis, checker, pass, security" \ No newline at end of file diff --git a/oasis/x86 b/oasis/x86 index be4f8556d..254ef26bc 100644 --- a/oasis/x86 +++ b/oasis/x86 @@ -7,7 +7,7 @@ Library "bap-x86-cpu" XMETADescription: provide x86 lifter Path: lib/x86_cpu FindlibName: bap-x86-cpu - BuildDepends: bap, core_kernel, ppx_bap, bap-c, bap-demangle, + BuildDepends: bap, core, ppx_bap, bap-c, bap-demangle, bap-core-theory, ogre, bap-knowledge Modules: X86_cpu, X86_env, @@ -23,7 +23,7 @@ Library x86_plugin XMETADescription: provide x86 lifter Path: plugins/x86 FindlibName: bap-plugin-x86 - BuildDepends: bap, bap-abi, bap-c, bap-x86-cpu, bap-llvm, core_kernel, + BuildDepends: bap, bap-abi, bap-c, bap-x86-cpu, bap-llvm, core, ppx_bap, bap-main, bap-future, bap-api, ogre, bap-primus, zarith, bap-core-theory, bap-knowledge, bitvec, str Modules: X86_backend, X86_prefix @@ -82,7 +82,7 @@ Library x86_test Path: lib_test/x86 Build$: flag(tests) && (flag(everything) || flag(x86)) CompiledObject: best - BuildDepends: bap, oUnit, bap-x86-cpu, core_kernel + BuildDepends: bap, oUnit, bap-x86-cpu, core Install: false Modules: Test_pshufb, Test_pcmp diff --git a/ogre.opam b/ogre.opam index 2153250da..1b4709c7a 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" "bap-common" {= version} "monads" {= version} "odoc" {with-doc} diff --git a/plugins/analyze/analyze_core_commands.ml b/plugins/analyze/analyze_core_commands.ml index 81027a92a..f4dddd9b2 100644 --- a/plugins/analyze/analyze_core_commands.ml +++ b/plugins/analyze/analyze_core_commands.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_main open Bap_knowledge open Bap_core_theory diff --git a/plugins/analyze/analyze_main.ml b/plugins/analyze/analyze_main.ml index 2361f0385..ef138c448 100644 --- a/plugins/analyze/analyze_main.ml +++ b/plugins/analyze/analyze_main.ml @@ -46,11 +46,11 @@ $(b,:) instead of $(b,-) or $(b,--), e.g., |} -open Core_kernel[@@warning "-D"] +open Core open Bap_main open Bap_knowledge open Bap.Std -module Sys = Caml.Sys +module Sys = Stdlib.Sys include Loggers() @@ -77,7 +77,7 @@ let collect_commands () = List.fold ~init:(Map.empty (module Knowledge.Name)) ~f:(fun hints info -> let name = Project.Analysis.name info in - Map.add_exn hints name info) + Map.add_exn hints ~key:name ~data:info) let initial_ctxt ~history directives path = { @@ -89,7 +89,7 @@ let initial_ctxt ~history directives path = { directives = List.fold directives ~init:String.Map.empty ~f:(fun dirs (name,_,desc) -> - Map.add_exn dirs name desc) + Map.add_exn dirs ~key:name ~data:desc) } let fail problem = Error (Fail problem) @@ -344,7 +344,7 @@ let () = Analyze_core_commands.register (); if Sys.file_exists base then Toplevel.set @@ Knowledge.load base; - let ctxt = in_package (initial_ctxt history directives base) "bap" in + let ctxt = in_package (initial_ctxt ~history directives base) "bap" in match commands,script with | [], None -> load_history history; diff --git a/plugins/analyze/dune b/plugins/analyze/dune index ff0a9447c..170a3a4f3 100644 --- a/plugins/analyze/dune +++ b/plugins/analyze/dune @@ -8,7 +8,7 @@ bap-knowledge bap-main bitvec - core_kernel + core linenoise monads)) diff --git a/plugins/api/api_main.ml b/plugins/api/api_main.ml index c8dfec761..8ea0c46f8 100644 --- a/plugins/api/api_main.ml +++ b/plugins/api/api_main.ml @@ -1,7 +1,7 @@ -open Core_kernel[@@warning "-D"] +open Core 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 @@ -355,7 +355,12 @@ module Cmdline = struct let doc = "Add a list of a paths where to store/search apis" in Config.(param (list dir) "path" ~doc ~default:[]) - let create a b c d e = Api_options.Fields.create a b c d e + let create api_to_add api_to_rem list_paths show_apis api_paths = Api_options.Fields.create + ~api_to_add + ~api_to_rem + ~list_paths + ~show_apis + ~api_paths let dispatch_flags o = let open Api_options in diff --git a/plugins/api/dune b/plugins/api/dune index 1b0abd0c4..a41defb14 100644 --- a/plugins/api/dune +++ b/plugins/api/dune @@ -5,7 +5,7 @@ (libraries bap bap-api - core_kernel + core fileutils regular)) diff --git a/plugins/arm/arm_gnueabi.ml b/plugins/arm/arm_gnueabi.ml index 4e02803a3..32a5018ff 100644 --- a/plugins/arm/arm_gnueabi.ml +++ b/plugins/arm/arm_gnueabi.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_c.Std open Bap_core_theory diff --git a/plugins/arm/arm_main.ml b/plugins/arm/arm_main.ml index ded9a0312..01ca08152 100644 --- a/plugins/arm/arm_main.ml +++ b/plugins/arm/arm_main.ml @@ -5,7 +5,7 @@ The target support package that enables support for the ARM family of architectures. " -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_main open Extension.Syntax diff --git a/plugins/arm/dune b/plugins/arm/dune index 2f437b71d..c91cd092c 100644 --- a/plugins/arm/dune +++ b/plugins/arm/dune @@ -10,7 +10,7 @@ bap-c bap-core-theory bap-main - core_kernel + core monads)) (plugin diff --git a/plugins/beagle/beagle_main.ml b/plugins/beagle/beagle_main.ml index 5d38179dc..038451a30 100644 --- a/plugins/beagle/beagle_main.ml +++ b/plugins/beagle/beagle_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Regular.Std open Monads.Std diff --git a/plugins/beagle/dune b/plugins/beagle/dune index da3b4395a..f49ec28fd 100644 --- a/plugins/beagle/dune +++ b/plugins/beagle/dune @@ -9,7 +9,7 @@ bap-microx bap-primus bap-strings - core_kernel + core monads regular)) diff --git a/plugins/bil/bil_float.ml b/plugins/bil/bil_float.ml index e3524b3ff..9c80b624e 100644 --- a/plugins/bil/bil_float.ml +++ b/plugins/bil/bil_float.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_knowledge @@ -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_ir.ml b/plugins/bil/bil_ir.ml index 74a9a0187..d10b414aa 100644 --- a/plugins/bil/bil_ir.ml +++ b/plugins/bil/bil_ir.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Format @@ -80,7 +80,7 @@ module BIR = struct let build_graph = List.fold ~init:Tid.Map.empty ~f:(fun blks blk -> - Map.add_exn blks blk.name blk) + Map.add_exn blks ~key:blk.name ~data:blk) let single_dst = function | [] | _ :: _ :: _ -> None diff --git a/plugins/bil/bil_lifter.ml b/plugins/bil/bil_lifter.ml index 8b43b2468..c2b726c70 100644 --- a/plugins/bil/bil_lifter.ml +++ b/plugins/bil/bil_lifter.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_knowledge open Bap_core_theory @@ -12,7 +12,6 @@ include Self() let package = "bap" module Optimizer = Theory.Parser.Make(Theory.Pass.Desugar(Bil_semantics.Core)) -[@@inlined] let provide_bir () = KB.Rule.(declare ~package "reify-ir" |> @@ -52,7 +51,7 @@ module Relocations = struct let external_symbols = Fact.collect Ogre.Query.(select (from external_reference)) >>| fun s -> - Seq.fold s ~f:(fun addrs (addr, name) -> Map.set addrs addr name) + Seq.fold s ~f:(fun addrs (addr, name) -> Map.set addrs ~key:addr ~data:name) ~init:(Map.empty (module Int64)) end @@ -71,7 +70,7 @@ module Relocations = struct inherit [addr Var.Map.t * Addr.Set.t] Stmt.visitor method! enter_move var exp (vars,refs) = match exp with - | Bil.Int const -> Map.set vars var const,refs + | Bil.Int const -> Map.set vars ~key:var ~data:const, refs | _ -> vars,refs method! enter_load ~mem:_ ~addr _ _ (vars,refs) = let const = match addr with diff --git a/plugins/bil/bil_main.ml b/plugins/bil/bil_main.ml index db6ca4d30..4396e8176 100644 --- a/plugins/bil/bil_main.ml +++ b/plugins/bil/bil_main.ml @@ -38,7 +38,7 @@ argument. |} open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_main.Extension diff --git a/plugins/bil/bil_semantics.ml b/plugins/bil/bil_semantics.ml index 2b0a89dab..21a4ef084 100644 --- a/plugins/bil/bil_semantics.ml +++ b/plugins/bil/bil_semantics.ml @@ -1,10 +1,8 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_knowledge open Bap_core_theory -[@@@warning "-40"] - let exp = Exp.slot let stmt = Bil.slot @@ -60,7 +58,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) @@ -147,7 +145,7 @@ module Basic : Theory.Basic = struct else let ones = Word.ones (size xs) in let mask = Bil.(lnot (int ones lsr y)) in - Bil.(ite b ((x lsr y) lor mask) (x lsr y)) + Bil.(ite ~if_:b ~then_:((x lsr y) lor mask) ~else_:(x lsr y)) let shiftl b x y = b >>-> fun _s b -> @@ -162,7 +160,7 @@ module Basic : Theory.Basic = struct let lhs = Bil.(x lsl y) in let yes = Bil.(lhs lor mask) in let nay = Bil.(x lsl y) in - Bil.(ite b yes nay) + Bil.(ite ~if_:b ~then_:yes ~else_:nay) let app_bop lift op x y = lift (Bil.binop op) x y let arshift x y = app_bop sop Bil.arshift x y @@ -179,11 +177,11 @@ module Basic : Theory.Basic = struct then exp s cnd else if Word.is_zero w && Word.is_one w' then exp s (Bil.lnot cnd) - else exp s (Bil.ite cnd yes nay) + else exp s (Bil.ite ~if_:cnd ~then_:yes ~else_:nay) | _ -> - exp s (Bil.ite cnd yes nay) + exp s (Bil.ite ~if_:cnd ~then_:yes ~else_: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 -> @@ -265,7 +263,7 @@ module Basic : Theory.Basic = struct let vals = Theory.Mem.vals sort in match Size.of_int_opt (size vals) with | Some sz -> - exp vals Bil.(load mem key BigEndian sz) + exp vals Bil.(load ~mem ~addr:key BigEndian sz) | None -> unk vals let store m k d = @@ -284,7 +282,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 -> @@ -336,8 +334,8 @@ module Basic : Theory.Basic = struct key >>= fun key -> mem >>-> fun _ mem -> let dir = bool_exp cnd and key = bitv_exp key in - let bel = vec rs @@ Bil.load mem key BigEndian sz - and lel = vec rs @@ Bil.load mem key LittleEndian sz in + let bel = vec rs @@ Bil.load ~mem ~addr:key BigEndian sz + and lel = vec rs @@ Bil.load ~mem ~addr:key LittleEndian sz in match dir with | Int dir -> if Word.(dir = b1) then bel else lel | _ -> ite !!cnd bel lel @@ -350,8 +348,8 @@ module Basic : Theory.Basic = struct cnd >>| value >>= fun dir -> key >>| value >>= fun key -> mem >>-> fun sort mem -> - let bes = exp sort @@ Bil.store mem key e BigEndian sz - and les = exp sort @@ Bil.store mem key e LittleEndian sz in + let bes = exp sort @@ Bil.store ~mem ~addr:key e BigEndian sz + and les = exp sort @@ Bil.store ~mem ~addr:key e LittleEndian sz in match dir with | Int dir -> if Word.(dir = b1) then bes else les | _ -> ite (bit dir) bes les diff --git a/plugins/bil/dune b/plugins/bil/dune index 1928e64da..8b3bdd987 100644 --- a/plugins/bil/dune +++ b/plugins/bil/dune @@ -10,7 +10,7 @@ bap-main bitvec bitvec-order - core_kernel + core monads ogre)) diff --git a/plugins/byteweight/byteweight_main.ml b/plugins/byteweight/byteweight_main.ml index 100e31e63..0bfebaa37 100644 --- a/plugins/byteweight/byteweight_main.ml +++ b/plugins/byteweight/byteweight_main.ml @@ -41,11 +41,11 @@ Security 14). 2014. $(b,bap-byteweight)(1), $(b,bap-plugin-ida)(1), $(b,bap-plugin-read-symbols)(1) |} -open Core_kernel[@@warning "-D"] +open Core 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/byteweight/dune b/plugins/byteweight/dune index 902e22377..4b1f361ab 100644 --- a/plugins/byteweight/dune +++ b/plugins/byteweight/dune @@ -10,7 +10,7 @@ bap-main bitvec bitvec-order - core_kernel)) + core)) (plugin (name byteweight) diff --git a/plugins/cache/bap_cache.ml b/plugins/cache/bap_cache.ml index 15bb5057a..148d1a72e 100644 --- a/plugins/cache/bap_cache.ml +++ b/plugins/cache/bap_cache.ml @@ -1,13 +1,13 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std 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" @@ -141,7 +141,7 @@ module Upgrade = struct let get_version path = let file = Filename.basename path in - match String.chop_prefix file "index." with + match String.chop_prefix file ~prefix:"index." with | None -> Ok 1 | Some v -> try Ok (int_of_string v) diff --git a/plugins/cache/bap_cache_gc.ml b/plugins/cache/bap_cache_gc.ml index 22dc97bd2..62cd935c3 100644 --- a/plugins/cache/bap_cache_gc.ml +++ b/plugins/cache/bap_cache_gc.ml @@ -73,14 +73,14 @@ select as many files as we need to remove requested size. *) -open Core_kernel[@@warning "-D"] +open Core 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 +110,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 ~key:prev ~data:i, f_i) let select entries total_size size_to_free = let cdf = cdf entries in @@ -118,7 +118,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..321113eb9 100644 --- a/plugins/cache/bap_cache_main.ml +++ b/plugins/cache/bap_cache_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Format @@ -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 @@ -148,7 +148,7 @@ let add_description ?arg name descr = | None -> name | Some arg -> sprintf "%s=%s" name arg in let name = "--" ^ name in - opts := Map.add_exn !opts name descr + opts := Map.add_exn !opts ~key:name ~data:descr let flag doc name = add_description name doc; diff --git a/plugins/cache/bap_cache_types.ml b/plugins/cache/bap_cache_types.ml index 1ecc4b6a8..1d837ced7 100644 --- a/plugins/cache/bap_cache_types.ml +++ b/plugins/cache/bap_cache_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std type config = { diff --git a/plugins/cache/bap_cache_utils.ml b/plugins/cache/bap_cache_utils.ml index 49be733fe..808da91aa 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 Core 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/cache/bap_cache_utils.mli b/plugins/cache/bap_cache_utils.mli index 134c21700..ceee71f38 100644 --- a/plugins/cache/bap_cache_utils.mli +++ b/plugins/cache/bap_cache_utils.mli @@ -1,5 +1,5 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std val binable_from_file : diff --git a/plugins/cache/dune b/plugins/cache/dune index 73acf4057..598e958b5 100644 --- a/plugins/cache/dune +++ b/plugins/cache/dune @@ -5,8 +5,7 @@ (libraries bap bap-main - core_kernel - core_kernel.caml_unix + core fileutils mmap regular diff --git a/plugins/callgraph_collator/callgraph_collator_main.ml b/plugins/callgraph_collator/callgraph_collator_main.ml index 80655de1b..357acb137 100644 --- a/plugins/callgraph_collator/callgraph_collator_main.ml +++ b/plugins/callgraph_collator/callgraph_collator_main.ml @@ -18,7 +18,7 @@ and means that in the base there is no call from src to dst. |} -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Graphlib.Std open Format diff --git a/plugins/callgraph_collator/dune b/plugins/callgraph_collator/dune index e78730ace..8acb22f75 100644 --- a/plugins/callgraph_collator/dune +++ b/plugins/callgraph_collator/dune @@ -2,7 +2,7 @@ (name bap_callgraph_collator_plugin) (public_name bap-callgraph-collator.plugin) (preprocess (pps ppx_bap)) - (libraries bap bap-main core_kernel graphlib re.pcre)) + (libraries bap bap-main core graphlib re.pcre)) (plugin (name callgraph-collator) diff --git a/plugins/callsites/callsites_main.ml b/plugins/callsites/callsites_main.ml index 0a37f0bfa..62cd6583b 100644 --- a/plugins/callsites/callsites_main.ml +++ b/plugins/callsites/callsites_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std include Self() open Option.Monad_infix diff --git a/plugins/callsites/dune b/plugins/callsites/dune index 41eb963ca..4befb7460 100644 --- a/plugins/callsites/dune +++ b/plugins/callsites/dune @@ -1,7 +1,7 @@ (library (name bap_callsites_plugin) (public_name bap-callsites.plugin) - (libraries bap core_kernel)) + (libraries bap core)) (plugin (name callsites) diff --git a/plugins/constant_tracker/constant_tracker_main.ml b/plugins/constant_tracker/constant_tracker_main.ml index 4ad9bf7b7..2cdf90ada 100644 --- a/plugins/constant_tracker/constant_tracker_main.ml +++ b/plugins/constant_tracker/constant_tracker_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus.Std diff --git a/plugins/constant_tracker/dune b/plugins/constant_tracker/dune index e93209e55..640421ed3 100644 --- a/plugins/constant_tracker/dune +++ b/plugins/constant_tracker/dune @@ -2,7 +2,7 @@ (name bap_constant_tracker_plugin) (public_name bap-constant-tracker.plugin) (preprocess (pps ppx_bap)) - (libraries bap bap-primus core_kernel)) + (libraries bap bap-primus core)) (plugin (name constant-tracker) diff --git a/plugins/core_theory/core_theory_main.ml b/plugins/core_theory/core_theory_main.ml index 96d13f5f7..058e1388a 100644 --- a/plugins/core_theory/core_theory_main.ml +++ b/plugins/core_theory/core_theory_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_main open KB.Syntax diff --git a/plugins/core_theory/dune b/plugins/core_theory/dune index 8be63032c..8b28169bf 100644 --- a/plugins/core_theory/dune +++ b/plugins/core_theory/dune @@ -3,7 +3,7 @@ (public_name bap-core-theory.plugin) (preprocess (pps ppx_bap)) (libraries bap-core-theory bap-knowledge bap-main - bitvec core_kernel monads)) + bitvec core monads)) (plugin (name core-theory) diff --git a/plugins/cxxfilt/cxxfilt_main.ml b/plugins/cxxfilt/cxxfilt_main.ml index 30b40bd2a..2c72a8bf9 100644 --- a/plugins/cxxfilt/cxxfilt_main.ml +++ b/plugins/cxxfilt/cxxfilt_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_demangle.Std open Cxxfilt_config diff --git a/plugins/cxxfilt/dune b/plugins/cxxfilt/dune index d5bd50932..83d2c9f95 100644 --- a/plugins/cxxfilt/dune +++ b/plugins/cxxfilt/dune @@ -1,7 +1,7 @@ (library (name bap_cxxfilt_plugin) (public_name bap-cxxfilt.plugin) - (libraries bap bap-demangle core_kernel core_kernel.caml_unix)) + (libraries bap bap-demangle core)) (plugin (name cxxfilt) diff --git a/plugins/demangle/demangle_main.ml b/plugins/demangle/demangle_main.ml index 7e8d3ad2c..ee5c495ed 100644 --- a/plugins/demangle/demangle_main.ml +++ b/plugins/demangle/demangle_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_main open Bap_demangle.Std diff --git a/plugins/demangle/dune b/plugins/demangle/dune index 63a96b875..ba666524b 100644 --- a/plugins/demangle/dune +++ b/plugins/demangle/dune @@ -6,7 +6,7 @@ bap-demangle bap-knowledge bap-main - core_kernel)) + core)) (plugin (name demangle) diff --git a/plugins/dependencies/dependencies_main.ml b/plugins/dependencies/dependencies_main.ml index cd7a69d8f..6f6a2fb7f 100644 --- a/plugins/dependencies/dependencies_main.ml +++ b/plugins/dependencies/dependencies_main.ml @@ -54,11 +54,11 @@ bap dependency /bin/ls --root=/mnt/image --ldconfig='cat ld.so.cache' ``` " -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Regular.Std open Bap_main -module Sys = Caml.Sys +module Sys = Stdlib.Sys include Loggers() @@ -90,7 +90,7 @@ end = struct match parse_line s with | None -> cache | Some path -> - Map.set cache (Filename.basename path) path) + Map.set cache ~key:(Filename.basename path) ~data:path) ~init:String.Map.empty) ~finally:(fun () -> match UnixLabels.close_process_in ldconfig with @@ -311,7 +311,7 @@ module State = struct else let unit = load name in let state = { - state with units = Map.add_exn state.units name unit + state with units = Map.add_exn state.units ~key:name ~data:unit } in load_deps state unit and load_deps state unit = diff --git a/plugins/dependencies/dune b/plugins/dependencies/dune index 649a31af3..f8dc7337f 100644 --- a/plugins/dependencies/dune +++ b/plugins/dependencies/dune @@ -2,7 +2,7 @@ (name bap_dependencies_plugin) (public_name bap-dependencies.plugin) (preprocess (pps ppx_bap)) - (libraries bap bap-main core_kernel ogre regular)) + (libraries bap bap-main core ogre regular)) (plugin (name dependencies) diff --git a/plugins/disassemble/disassemble_main.ml b/plugins/disassemble/disassemble_main.ml index 1e02a9ecd..9c5e069fd 100644 --- a/plugins/disassemble/disassemble_main.ml +++ b/plugins/disassemble/disassemble_main.ml @@ -44,7 +44,7 @@ let man = {| with the following contents: ``` - open Core_kernel[@@warning "-D"] + open Core open Bap_main open Bap.Std @@ -83,7 +83,7 @@ let man = {| |} open Bap_knowledge -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_core_theory open Regular.Std @@ -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/disassemble/disassemble_main_rules.ml b/plugins/disassemble/disassemble_main_rules.ml index 4babce8b9..e623f0953 100644 --- a/plugins/disassemble/disassemble_main_rules.ml +++ b/plugins/disassemble/disassemble_main_rules.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_main @@ -168,7 +168,7 @@ module Symbols = struct else add_alias tab addr name, rel) |> fun (table,rel) -> Bap_relation.matching rel table ~saturated:(fun k v t -> { - t with names = Map.add_exn t.names k v + t with names = Map.add_exn t.names ~key:k ~data:v }) ~unmatched:(fun reason t -> match reason with | Non_injective_fwd (addrs,name) -> diff --git a/plugins/disassemble/dune b/plugins/disassemble/dune index c73118f0e..b8709e543 100644 --- a/plugins/disassemble/dune +++ b/plugins/disassemble/dune @@ -12,7 +12,7 @@ bitvec-binprot bitvec-order bitvec-sexp - core_kernel + core monads ogre regular)) diff --git a/plugins/dump_symbols/dump_symbols_main.ml b/plugins/dump_symbols/dump_symbols_main.ml index 59a1ba355..8da1711ae 100644 --- a/plugins/dump_symbols/dump_symbols_main.ml +++ b/plugins/dump_symbols/dump_symbols_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Graphlib.Std open Bap.Std include Self() diff --git a/plugins/dump_symbols/dune b/plugins/dump_symbols/dune index 4eca3cb34..f54272a0a 100644 --- a/plugins/dump_symbols/dune +++ b/plugins/dump_symbols/dune @@ -2,7 +2,7 @@ (name bap_dump_symbols_plugin) (public_name bap-dump-symbols.plugin) (preprocess (pps ppx_bap)) - (libraries bap core_kernel graphlib regular)) + (libraries bap core graphlib regular)) (plugin (name dump-symbols) diff --git a/plugins/elf_loader/dune b/plugins/elf_loader/dune index e786f9406..6df2b8ef2 100644 --- a/plugins/elf_loader/dune +++ b/plugins/elf_loader/dune @@ -2,7 +2,7 @@ (name bap_elf_loader_plugin) (public_name bap-elf.plugin) (preprocess (pps ppx_bap)) - (libraries bap bap-elf bap-dwarf core_kernel regular)) + (libraries bap bap-elf bap-dwarf core regular)) (plugin (name elf-loader) diff --git a/plugins/elf_loader/elf_loader_main.ml b/plugins/elf_loader/elf_loader_main.ml index 0135535f3..cab801d8a 100644 --- a/plugins/elf_loader/elf_loader_main.ml +++ b/plugins/elf_loader/elf_loader_main.ml @@ -1,11 +1,11 @@ -open Core_kernel[@@warning "-D"] +open Core open Or_error open Bap.Std open Bap_elf.Std open Bap_dwarf.Std open Backend -[@@warning "-D"] + open Elf @@ -148,7 +148,7 @@ let img_of_elf data elf : Img.t Or_error.t = | EM_MIPS, LittleEndian, `r64 -> Ok `mips64el | _ -> errorf "can't load file, unsupported platform" in let segments,errors = - Seq.filter_mapi elf.e_segments (create_segment addr) |> + Seq.filter_mapi elf.e_segments ~f:(create_segment addr) |> Seq.to_list |> List.partition_map ~f:(function | Ok s -> First s @@ -157,7 +157,7 @@ let img_of_elf data elf : Img.t Or_error.t = match create_symtab data endian elf with | Ok syms -> syms,errors | Error err -> - [], Error.tag err "failed to read symbols" :: errors in + [], Error.tag err ~tag:"failed to read symbols" :: errors in arch >>= fun arch -> let sections = Seq.filter_map elf.e_sections ~f:(fun s -> match Elf.section_name data elf s with @@ -194,4 +194,3 @@ let () = | `Ok -> () | `Duplicate -> eprintf "Elf_backend: name «%s» is already used\n" name -[@@warning "-D"] diff --git a/plugins/emit_ida_script/dune b/plugins/emit_ida_script/dune index 49aa6991e..051599a9a 100644 --- a/plugins/emit_ida_script/dune +++ b/plugins/emit_ida_script/dune @@ -2,7 +2,7 @@ (name bap_emit_ida_script_plugin) (public_name bap-ida-plugin.plugin) (preprocess (pps ppx_bap)) - (libraries bap core_kernel regular)) + (libraries bap core regular)) (plugin (name emit-ida-script) diff --git a/plugins/emit_ida_script/emit_ida_script_main.ml b/plugins/emit_ida_script/emit_ida_script_main.ml index 5ce3a35f3..5d248208d 100644 --- a/plugins/emit_ida_script/emit_ida_script_main.ml +++ b/plugins/emit_ida_script/emit_ida_script_main.ml @@ -1,9 +1,9 @@ -open Core_kernel[@@warning "-D"] +open Core 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/frontc_parser/dune b/plugins/frontc_parser/dune index 8e8926587..d5e4830d7 100644 --- a/plugins/frontc_parser/dune +++ b/plugins/frontc_parser/dune @@ -2,7 +2,7 @@ (name bap_frontc_parser_plugin) (public_name bap-frontc.plugin) (preprocess (pps ppx_bap)) - (libraries bap bap-c FrontC core_kernel core_kernel.caml_unix)) + (libraries bap bap-c FrontC core)) (plugin (name frontc-parser) diff --git a/plugins/frontc_parser/frontc_parser_main.ml b/plugins/frontc_parser/frontc_parser_main.ml index 8820f69be..8ec9b54b4 100644 --- a/plugins/frontc_parser/frontc_parser_main.ml +++ b/plugins/frontc_parser/frontc_parser_main.ml @@ -1,4 +1,4 @@ -open! Core_kernel[@@warning "-D"] +open! Core open Bap.Std open Bap_c.Std include Self() diff --git a/plugins/ghidra/dune b/plugins/ghidra/dune index e4b6356d3..90303c019 100644 --- a/plugins/ghidra/dune +++ b/plugins/ghidra/dune @@ -2,7 +2,7 @@ (optional) (name bap_ghidra_plugin) (public_name bap-ghidra.plugin) - (libraries bap bap-ghidra bap-main core_kernel)) + (libraries bap bap-ghidra bap-main core)) (plugin (optional) diff --git a/plugins/ghidra/ghidra_main.ml b/plugins/ghidra/ghidra_main.ml index 154ec55ec..a8506ee55 100644 --- a/plugins/ghidra/ghidra_main.ml +++ b/plugins/ghidra/ghidra_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_main let default_paths = diff --git a/plugins/glibc_runtime/dune b/plugins/glibc_runtime/dune index 0a17b8fe2..bc964b137 100644 --- a/plugins/glibc_runtime/dune +++ b/plugins/glibc_runtime/dune @@ -1,7 +1,7 @@ (library (name bap_glibc_runtime_plugin) (public_name bap-glibc-runtime.plugin) - (libraries bap bap-abi bap-c bap-core-theory bap-main core_kernel ogre)) + (libraries bap bap-abi bap-c bap-core-theory bap-main core ogre)) (plugin (name glibc-runtime) diff --git a/plugins/glibc_runtime/glibc_runtime_main.ml b/plugins/glibc_runtime/glibc_runtime_main.ml index e1b95a18e..6d377bb90 100644 --- a/plugins/glibc_runtime/glibc_runtime_main.ml +++ b/plugins/glibc_runtime/glibc_runtime_main.ml @@ -3,7 +3,7 @@ Enables ad-hoc support for glibc runtime code. In particular it detects the locations of $(b,main) and $(b,__libc_start_main) functions (and adds the latter if it is absent). " -open Core_kernel[@@warning "-D"] +open Core open Bap_main open Bap.Std open Bap_c.Std @@ -59,7 +59,7 @@ let insert_call prog start entry jmp = let sub = Sub.create ~tid ~name () in let prog = Term.append sub_t prog sub in let entry = Term.remove jmp_t entry (Term.tid jmp) in - let call = Call.create (Direct (Term.tid sub)) () in + let call = Call.create ~target:(Direct (Term.tid sub)) () in let jmp = Jmp.create_call call in let entry = Term.prepend jmp_t entry jmp in let start = Term.update blk_t start entry in diff --git a/plugins/ida/bap_ida_info.ml b/plugins/ida/bap_ida_info.ml index 0768e156d..dbffc8547 100644 --- a/plugins/ida/bap_ida_info.ml +++ b/plugins/ida/bap_ida_info.ml @@ -1,8 +1,8 @@ -open Core_kernel[@@warning "-D"] +open Core 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_info.mli b/plugins/ida/bap_ida_info.mli index c5c6f7704..f0bb51067 100644 --- a/plugins/ida/bap_ida_info.mli +++ b/plugins/ida/bap_ida_info.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core type mode = [ `m32 | `m64 ] diff --git a/plugins/ida/bap_ida_service.ml b/plugins/ida/bap_ida_service.ml index ea771b2fa..6b206edc0 100644 --- a/plugins/ida/bap_ida_service.ml +++ b/plugins/ida/bap_ida_service.ml @@ -1,13 +1,13 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_ida.Std 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 @@ -159,14 +159,14 @@ let close (self:ida) = 64-bit libraries. *) let find_curses () = - let x86_64 = Re_posix.re ".*x86.64.*" |> Re.compile in - let curses = Re_posix.re ".*lib.curses\\.so.*" |> Re.compile in + let x86_64 = Re.Posix.re ".*x86.64.*" |> Re.compile in + let curses = Re.Posix.re ".*lib.curses\\.so.*" |> Re.compile in pread "ldconfig -p" |> List.filter ~f:(Fn.non (Re.execp x86_64)) |> List.filter ~f:(Re.execp curses) |> List.filter_map ~f:(fun s -> match String.split ~on:'>' s with | [_;path] -> Some (String.strip path) | _ -> None) |> List.filter ~f:Sys.file_exists |> List.hd -[@@warning "-D"] + let register ida_info mode : unit = let curses = if Info.require_ncurses ida_info then find_curses () diff --git a/plugins/ida/dune b/plugins/ida/dune index 10d45eb95..5ddbd86ef 100644 --- a/plugins/ida/dune +++ b/plugins/ida/dune @@ -7,8 +7,7 @@ bap-future bap-ida bap-knowledge - core_kernel - core_kernel.caml_unix + core fileutils graphlib mmap diff --git a/plugins/ida/ida_main.ml b/plugins/ida/ida_main.ml index 598db1c50..c1d1adc67 100644 --- a/plugins/ida/ida_main.ml +++ b/plugins/ida/ida_main.ml @@ -1,5 +1,5 @@ open Bap_knowledge -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap_future.Std open Bap.Std @@ -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 " @@ -121,7 +121,7 @@ let mapfile path : Bigstring.t = fd Bigarray.char Bigarray.c_layout false [|size|] in Unix.close fd; Bigarray.array1_of_genarray data -[@@warning "-D"] + let loader path = let id = Data.Cache.digest ~namespace:"ida-loader" "%s" @@ -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/llvm/dune b/plugins/llvm/dune index 08b56bcca..1a9917a49 100644 --- a/plugins/llvm/dune +++ b/plugins/llvm/dune @@ -1,7 +1,7 @@ (library (name llvm_plugin) (public_name bap-llvm.plugin) - (libraries bap bap-llvm bap-main core_kernel)) + (libraries bap bap-llvm bap-main core)) (plugin (name llvm) diff --git a/plugins/llvm/llvm_main.ml b/plugins/llvm/llvm_main.ml index a1ad63b93..0566c4c81 100644 --- a/plugins/llvm/llvm_main.ml +++ b/plugins/llvm/llvm_main.ml @@ -5,7 +5,7 @@ let provides = [ "llvm" ] -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_llvm.Std open Bap_main diff --git a/plugins/map_terms/dune b/plugins/map_terms/dune index 0a73fdcf8..aac9f09ab 100644 --- a/plugins/map_terms/dune +++ b/plugins/map_terms/dune @@ -2,7 +2,7 @@ (name bap_map_terms_plugin) (public_name bap-term-mapper.plugin) (preprocess (pps ppx_bap)) - (libraries bap bap-bml bap-main core_kernel regular)) + (libraries bap bap-bml bap-main core regular)) (plugin (name map-terms) diff --git a/plugins/map_terms/map_terms_features.ml b/plugins/map_terms/map_terms_features.ml index fc1d1663d..98c6eca9b 100644 --- a/plugins/map_terms/map_terms_features.ml +++ b/plugins/map_terms/map_terms_features.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_bml diff --git a/plugins/map_terms/map_terms_main.ml b/plugins/map_terms/map_terms_main.ml index 72c501bda..4a2606ac3 100644 --- a/plugins/map_terms/map_terms_main.ml +++ b/plugins/map_terms/map_terms_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Bap_bml diff --git a/plugins/mc/dune b/plugins/mc/dune index 7490145c7..782542371 100644 --- a/plugins/mc/dune +++ b/plugins/mc/dune @@ -8,7 +8,7 @@ bap-knowledge bap-main bitvec - core_kernel + core ogre regular)) diff --git a/plugins/mc/mc_main.ml b/plugins/mc/mc_main.ml index 84f2b1018..245aa628f 100644 --- a/plugins/mc/mc_main.ml +++ b/plugins/mc/mc_main.ml @@ -74,7 +74,7 @@ raw code (i.e., no meta information), then use the $(b,raw) loader. ``` |} -open Core_kernel[@@warning "-D"] +open Core open Format open Regular.Std open Bap.Std diff --git a/plugins/mips/dune b/plugins/mips/dune index 7138da290..944865b6a 100644 --- a/plugins/mips/dune +++ b/plugins/mips/dune @@ -11,7 +11,7 @@ bap-knowledge bap-main bap-mips - core_kernel + core regular zarith)) diff --git a/plugins/mips/mips.ml b/plugins/mips/mips.ml index f0eba4da5..b9f040db3 100644 --- a/plugins/mips/mips.ml +++ b/plugins/mips/mips.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_core_theory @@ -42,8 +42,8 @@ module Std = struct let delayed_opcodes = Hashtbl.create (module String) let register ?delay name lifter = - Option.iter delay ~f:(fun d -> Hashtbl.add_exn delayed_opcodes name d); - Hashtbl.add_exn lifters name lifter + Option.iter delay ~f:(fun d -> Hashtbl.add_exn delayed_opcodes ~key:name ~data:d); + Hashtbl.add_exn lifters ~key:name ~data:lifter let (>>) = register @@ -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_abi.ml b/plugins/mips/mips_abi.ml index 44ad24f0c..147a6db64 100644 --- a/plugins/mips/mips_abi.ml +++ b/plugins/mips/mips_abi.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_c.Std diff --git a/plugins/mips/mips_cpu.ml b/plugins/mips/mips_cpu.ml index eb4c81e45..ac79e4e46 100644 --- a/plugins/mips/mips_cpu.ml +++ b/plugins/mips/mips_cpu.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Mips_rtl @@ -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_dsl.ml b/plugins/mips/mips_dsl.ml index 46dcc3295..5881e3861 100644 --- a/plugins/mips/mips_dsl.ml +++ b/plugins/mips/mips_dsl.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Regular.Std open Mips_rtl diff --git a/plugins/mips/mips_dsl.mli b/plugins/mips/mips_dsl.mli index 188a8943b..2a947da4e 100644 --- a/plugins/mips/mips_dsl.mli +++ b/plugins/mips/mips_dsl.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Mips_rtl diff --git a/plugins/mips/mips_main.ml b/plugins/mips/mips_main.ml index b16774627..71e3b633b 100644 --- a/plugins/mips/mips_main.ml +++ b/plugins/mips/mips_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Mips.Std diff --git a/plugins/mips/mips_model.ml b/plugins/mips/mips_model.ml index d4530252a..337869b69 100644 --- a/plugins/mips/mips_model.ml +++ b/plugins/mips/mips_model.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Mips_rtl @@ -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 ~key:(Var.name var) ~data: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 ~key:name ~data: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 ~key:name ~data: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 ~key:i ~data:(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) @@ -140,10 +140,10 @@ module Make_MIPS(S: Spec) : MIPS = struct let names = if gpr_bitwidth = 64 then (name ^ "_64") :: names else names in - List.fold names ~init ~f:(fun regs name -> Map.set regs name reg)) + List.fold names ~init ~f:(fun regs name -> Map.set regs ~key:name ~data:reg)) let gpri = List.foldi ~init:Int.Map.empty ~f:(fun n regs (reg,_) -> - Map.set regs n reg) gprs + Map.set regs ~key:n ~data:reg) gprs let hi = make_reg (Type.imm gpr_bitwidth) "HI" let lo = make_reg (Type.imm gpr_bitwidth) "LO" @@ -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_model.mli b/plugins/mips/mips_model.mli index e57e2ca24..521288a9d 100644 --- a/plugins/mips/mips_model.mli +++ b/plugins/mips/mips_model.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Mips_rtl diff --git a/plugins/mips/mips_rtl.ml b/plugins/mips/mips_rtl.ml index dbe667bad..90ea16f1d 100644 --- a/plugins/mips/mips_rtl.ml +++ b/plugins/mips/mips_rtl.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Mips_utils @@ -48,10 +48,10 @@ let rec bil_exp = function List.fold vars ~init:(Bil.var v) ~f:(fun e v -> Bil.(e ^ var v)) | Word w -> Bil.int w | Load (mem, addr, endian, size) -> - Bil.(load (var mem) (bil_exp addr) endian size) + Bil.(load ~mem:(var mem) ~addr:(bil_exp addr) endian size) | Concat (x, y) -> Bil.(bil_exp x ^ bil_exp y) | Binop (op, x, y) -> Bil.binop op (bil_exp x) (bil_exp y) - | Extract (hi, lo, x) -> Bil.extract hi lo (bil_exp x) + | Extract (hi, lo, x) -> Bil.extract ~hi ~lo (bil_exp x) | Cast (_,1,x) -> Bil.(cast low 1 (bil_exp x)) | Cast (Signed, width, x) -> Bil.(cast signed width (bil_exp x)) | Cast (Unsigned, width, x) -> Bil.(cast unsigned width (bil_exp x)) @@ -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) } @@ -243,7 +243,7 @@ module Translate = struct let store mem addr data endian size = let addr = bil_exp addr.body in let data = bil_exp data.body in - Bil.[mem := store (var mem) addr data endian size] + Bil.[mem := store ~mem:(var mem) ~addr data endian size] let if_ probe then_ else_ = let probe = bil_exp (Exp.body probe) in @@ -265,11 +265,11 @@ module Translate = struct let width_right = lo_var in let left = if width_left = 0 then None - else Some (Bil.extract (width - 1) (hi_var + 1) var) in + else Some (Bil.extract ~hi:(width - 1) ~lo:(hi_var + 1) var) in let middle = bil_exp (Exp.body rhs) in let right = if width_right = 0 then None - else Some (Bil.extract (lo_var - 1) 0 var) in + else Some (Bil.extract ~hi:(lo_var - 1) ~lo:0 var) in match left,right with | None, None -> Bil.[v := middle] | Some left, None -> Bil.[v := left ^ middle] diff --git a/plugins/mips/mips_rtl.mli b/plugins/mips/mips_rtl.mli index 0c0b43c91..4c7451ace 100644 --- a/plugins/mips/mips_rtl.mli +++ b/plugins/mips/mips_rtl.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std type t [@@deriving bin_io, compare, sexp] diff --git a/plugins/mips/mips_types.ml b/plugins/mips/mips_types.ml index d88e51f3e..d0590efde 100644 --- a/plugins/mips/mips_types.ml +++ b/plugins/mips/mips_types.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Mips_rtl diff --git a/plugins/mips/mips_utils.ml b/plugins/mips/mips_utils.ml index 563e5f41a..57cc33e71 100644 --- a/plugins/mips/mips_utils.ml +++ b/plugins/mips/mips_utils.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std let mips_fail format = diff --git a/plugins/objdump/dune b/plugins/objdump/dune index fdbfa69c8..006a5c243 100644 --- a/plugins/objdump/dune +++ b/plugins/objdump/dune @@ -9,8 +9,7 @@ bitvec bitvec-order bitvec-sexp - core_kernel - core_kernel.caml_unix + core re.pcre)) (plugin diff --git a/plugins/objdump/objdump_main.ml b/plugins/objdump/objdump_main.ml index 61d574163..0a8ad316f 100644 --- a/plugins/objdump/objdump_main.ml +++ b/plugins/objdump/objdump_main.ml @@ -26,7 +26,7 @@ $(b,bap-plugin-ida)(1) open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Objdump_config open Bap_main @@ -46,7 +46,7 @@ let demangler = Extension.Configuration.parameter let objdump_cmds demangler= - String.Set.stable_dedup_list objdumps|> + List.stable_dedup ~compare: String.compare objdumps|> List.map ~f:(fun cmd -> sprintf "%s %s %s" cmd default_objdump_opts @@ match demangler with @@ -172,7 +172,7 @@ end = struct if Bap_relation.is_empty info then warning "failed to obtain symbols"; let t = of_info info in - Hashtbl.set files path t; + Hashtbl.set files ~key:path ~data:t; t let to_real size = function diff --git a/plugins/optimization/dune b/plugins/optimization/dune index 37bc3c98e..3cd7c246e 100644 --- a/plugins/optimization/dune +++ b/plugins/optimization/dune @@ -2,7 +2,7 @@ (name bap_optimization_plugin) (public_name bap-optimization.plugin) (preprocess (pps ppx_bap)) - (libraries bap core_kernel graphlib regular)) + (libraries bap core graphlib regular)) (plugin (name optimization) diff --git a/plugins/optimization/optimization_data.ml b/plugins/optimization/optimization_data.ml index 15c07407e..d066af981 100644 --- a/plugins/optimization/optimization_data.ml +++ b/plugins/optimization/optimization_data.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Regular.Std open Graphlib.Std @@ -31,11 +31,11 @@ let updates_of_sub sub = let fold t cls init ~f = Seq.fold (Term.enum cls t) ~init ~f in let update_rhs updates d = let rhs = drop_index (Def.rhs d) in - Map.set updates (Term.tid d) (Rhs rhs) in + Map.set updates ~key:(Term.tid d) ~data:(Rhs rhs) in let update_jmp updates j = let j = Jmp.map_exp ~f:drop_index j in let data = Jmp {cond = Jmp.cond j; kind = Jmp.kind j} in - Map.set updates (Term.tid j) data in + Map.set updates ~key:(Term.tid j) ~data in let add_if add updates t = if is_updated t then add updates t else updates in fold sub blk_t Tid.Map.empty ~f:(fun updates b -> diff --git a/plugins/optimization/optimization_data.mli b/plugins/optimization/optimization_data.mli index 911247217..bf04c7014 100644 --- a/plugins/optimization/optimization_data.mli +++ b/plugins/optimization/optimization_data.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Regular.Std diff --git a/plugins/optimization/optimization_main.ml b/plugins/optimization/optimization_main.ml index 314534750..5c4c8b953 100644 --- a/plugins/optimization/optimization_main.ml +++ b/plugins/optimization/optimization_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Regular.Std open Format @@ -130,8 +130,8 @@ let process_sub free can_touch sub = let dead = Set.union dead dead' in if Set.is_empty dead' then s, dead else loop dead (clean can_touch dead' s) in - let sub', dead = loop Tid.Set.empty (Sub.ssa sub) in - O.create dead sub' + let sub', deads = loop Tid.Set.empty (Sub.ssa sub) in + O.create ~deads sub' let digest_of_sub sub level = let add addrs t = match Term.get_attr t address with diff --git a/plugins/patterns/dune b/plugins/patterns/dune index 0297cfddd..7cf03506d 100644 --- a/plugins/patterns/dune +++ b/plugins/patterns/dune @@ -13,7 +13,7 @@ bitvec-binprot bitvec-order bitvec-sexp - core_kernel + core fileutils uri xmlm diff --git a/plugins/patterns/patterns_main.ml b/plugins/patterns/patterns_main.ml index 8406ad09c..ddd9626a3 100644 --- a/plugins/patterns/patterns_main.ml +++ b/plugins/patterns/patterns_main.ml @@ -108,12 +108,12 @@ let doc = " " -open Core_kernel[@@warning "-D"] +open Core 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, @@ -1253,7 +1253,7 @@ end = struct names = Bap_relation.fold names ~init:(Map.empty (module Addr)) ~f:(fun addr name names -> - Map.add_exn names addr name) + Map.add_exn names ~key:addr ~data:name) } diff --git a/plugins/phoenix/dune b/plugins/phoenix/dune index e457e92a5..020365e17 100644 --- a/plugins/phoenix/dune +++ b/plugins/phoenix/dune @@ -4,8 +4,7 @@ (preprocess (pps ppx_bap)) (libraries bap - core_kernel - core_kernel.caml_unix + core ezjsonm graphlib ocamlgraph diff --git a/plugins/phoenix/phoenix_dot.ml b/plugins/phoenix/phoenix_dot.ml index bae297eb4..2a651747b 100644 --- a/plugins/phoenix/phoenix_dot.ml +++ b/plugins/phoenix/phoenix_dot.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Graphlib.Std open Phoenix_options diff --git a/plugins/phoenix/phoenix_dot.mli b/plugins/phoenix/phoenix_dot.mli index 57bd16d2a..8f9c02d7f 100644 --- a/plugins/phoenix/phoenix_dot.mli +++ b/plugins/phoenix/phoenix_dot.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std module Make(Env : sig diff --git a/plugins/phoenix/phoenix_helpers.ml b/plugins/phoenix/phoenix_helpers.ml index 00793fd07..62137bc96 100644 --- a/plugins/phoenix/phoenix_helpers.ml +++ b/plugins/phoenix/phoenix_helpers.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Phoenix_options diff --git a/plugins/phoenix/phoenix_helpers.mli b/plugins/phoenix/phoenix_helpers.mli index 315509f7a..f269985b0 100644 --- a/plugins/phoenix/phoenix_helpers.mli +++ b/plugins/phoenix/phoenix_helpers.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std (** [bil_of_block blk] *) diff --git a/plugins/phoenix/phoenix_main.ml b/plugins/phoenix/phoenix_main.ml index 25d545d95..98e28fa4d 100644 --- a/plugins/phoenix/phoenix_main.ml +++ b/plugins/phoenix/phoenix_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Format @@ -66,8 +66,15 @@ let no_optimizations : bool Config.param = Config.(flag "no-optimizations" ~doc) let create - a b c d e f g = Phoenix_options.Fields.create - a b c d e f g + output_folder cfg_format no_resolve keep_alive no_inline keep_consts no_optimizations = Phoenix_options.Fields.create + ~output_folder + ~cfg_format + ~no_resolve + ~keep_alive + ~no_inline + ~keep_consts + ~no_optimizations + let man = [ `S "DESCRIPTION"; diff --git a/plugins/phoenix/phoenix_options.ml b/plugins/phoenix/phoenix_options.ml index 53ebf9039..a208a1444 100644 --- a/plugins/phoenix/phoenix_options.ml +++ b/plugins/phoenix/phoenix_options.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std type label_format = [ `with_asm | `with_bil | `with_name ] diff --git a/plugins/phoenix/phoenix_output.ml b/plugins/phoenix/phoenix_output.ml index c1a6bf493..84f98f1de 100644 --- a/plugins/phoenix/phoenix_output.ml +++ b/plugins/phoenix/phoenix_output.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Graphlib.Std open Bap.Std open Phoenix_options diff --git a/plugins/phoenix/phoenix_output.mli b/plugins/phoenix/phoenix_output.mli index 355cecc5b..367a06b48 100644 --- a/plugins/phoenix/phoenix_output.mli +++ b/plugins/phoenix/phoenix_output.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std diff --git a/plugins/phoenix/phoenix_printing.ml b/plugins/phoenix/phoenix_printing.ml index 61c40d10a..a34e367da 100644 --- a/plugins/phoenix/phoenix_printing.ml +++ b/plugins/phoenix/phoenix_printing.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Graphlib.Std open Bap.Std open Format diff --git a/plugins/phoenix/phoenix_printing.mli b/plugins/phoenix/phoenix_printing.mli index a7ad4c9ba..bb4678e0a 100644 --- a/plugins/phoenix/phoenix_printing.mli +++ b/plugins/phoenix/phoenix_printing.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std type 'a pp = Format.formatter -> 'a -> unit diff --git a/plugins/phoenix/phoenix_root.ml b/plugins/phoenix/phoenix_root.ml index 02142002b..85037a66f 100644 --- a/plugins/phoenix/phoenix_root.ml +++ b/plugins/phoenix/phoenix_root.ml @@ -1,6 +1,6 @@ -open Core_kernel[@@warning "-D"] +open Core -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 index e697573ac..ec8d1750f 100644 --- a/plugins/piqi_printers/piqi_printers_main.ml +++ b/plugins/piqi_printers/piqi_printers_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std include Self() diff --git a/plugins/powerpc/dune b/plugins/powerpc/dune index 16bfea7e3..49d7499df 100644 --- a/plugins/powerpc/dune +++ b/plugins/powerpc/dune @@ -9,7 +9,7 @@ bap-c bap-core-theory bap-powerpc - core_kernel + core monads regular zarith)) diff --git a/plugins/powerpc/powerpc.ml b/plugins/powerpc/powerpc.ml index af8ed1662..2b0ac7ae3 100644 --- a/plugins/powerpc/powerpc.ml +++ b/plugins/powerpc/powerpc.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Powerpc_types diff --git a/plugins/powerpc/powerpc.mli b/plugins/powerpc/powerpc.mli index 9ac219d38..86703f783 100644 --- a/plugins/powerpc/powerpc.mli +++ b/plugins/powerpc/powerpc.mli @@ -330,7 +330,7 @@ doubleword. *) -open Core_kernel[@@warning "-D"] +open Core open Bap.Std module Std : sig diff --git a/plugins/powerpc/powerpc_abi.ml b/plugins/powerpc/powerpc_abi.ml index 9757858c7..32fd87fc4 100644 --- a/plugins/powerpc/powerpc_abi.ml +++ b/plugins/powerpc/powerpc_abi.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_c.Std diff --git a/plugins/powerpc/powerpc_cpu.ml b/plugins/powerpc/powerpc_cpu.ml index c0ac77d04..2cd36fc5d 100644 --- a/plugins/powerpc/powerpc_cpu.ml +++ b/plugins/powerpc/powerpc_cpu.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Powerpc_rtl open Powerpc_dsl diff --git a/plugins/powerpc/powerpc_dsl.ml b/plugins/powerpc/powerpc_dsl.ml index c1664d590..f5febcffc 100644 --- a/plugins/powerpc/powerpc_dsl.ml +++ b/plugins/powerpc/powerpc_dsl.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Regular.Std diff --git a/plugins/powerpc/powerpc_dsl.mli b/plugins/powerpc/powerpc_dsl.mli index f83c29ede..86c99386d 100644 --- a/plugins/powerpc/powerpc_dsl.mli +++ b/plugins/powerpc/powerpc_dsl.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Powerpc_rtl diff --git a/plugins/powerpc/powerpc_main.ml b/plugins/powerpc/powerpc_main.ml index 2f8c55939..ac707cf02 100644 --- a/plugins/powerpc/powerpc_main.ml +++ b/plugins/powerpc/powerpc_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Powerpc.Std diff --git a/plugins/powerpc/powerpc_model.ml b/plugins/powerpc/powerpc_model.ml index 26bd12c2a..e318beb36 100644 --- a/plugins/powerpc/powerpc_model.ml +++ b/plugins/powerpc/powerpc_model.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Powerpc_rtl @@ -62,17 +62,17 @@ 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 = Map.set regs name var in + let regs = Map.set regs ~key:name ~data:var in match alias with | None -> regs | Some a -> let name = make_name a i in - Map.set regs name var) range + Map.set regs ~key:name ~data:var) range let make_regs_i typ prefix range = List.fold ~init:Int.Map.empty ~f:(fun regs i -> - Map.set regs i (make_var_i typ prefix i)) range + Map.set regs ~key:i ~data:(make_var_i typ prefix i)) range let flag name = Var.create name (Type.imm 1) @@ -156,9 +156,9 @@ 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) + Map.set acc ~key:(Var.name var) ~data:var) let fields = [ "CR0", 0, (cr28, cr29, cr30, cr31); @@ -173,11 +173,11 @@ module Vars (B : Bitwidth) = struct let cr_fields = List.fold fields ~init:String.Map.empty ~f:(fun fs (name, _, fd) -> - Map.set fs name fd) + Map.set fs ~key:name ~data:fd) let cri_fields = List.fold fields ~init:Int.Map.empty ~f:(fun fs (_, index, fd) -> - Map.set fs index fd) + Map.set fs ~key:index ~data:fd) (** fixed precision flags *) let so = flag "SO" (** summary overflow *) @@ -211,9 +211,9 @@ 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)) + Map.set acc ~key:(Var.name var) ~data:(Exp.of_var var)) let so = Exp.of_var so let ca = Exp.of_var ca @@ -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_model.mli b/plugins/powerpc/powerpc_model.mli index 286bebf1d..489a4edb9 100644 --- a/plugins/powerpc/powerpc_model.mli +++ b/plugins/powerpc/powerpc_model.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Powerpc_rtl diff --git a/plugins/powerpc/powerpc_rtl.ml b/plugins/powerpc/powerpc_rtl.ml index cafa6645b..0d3684335 100644 --- a/plugins/powerpc/powerpc_rtl.ml +++ b/plugins/powerpc/powerpc_rtl.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Powerpc_utils @@ -49,10 +49,10 @@ let rec bil_exp = function List.fold vars ~init:(Bil.var v) ~f:(fun e v -> Bil.(e ^ var v)) | Word w -> Bil.int w | Load (mem, addr, endian, size) -> - Bil.(load (var mem) (bil_exp addr) endian size) + Bil.(load ~mem:(var mem) ~addr:(bil_exp addr) endian size) | Concat (x, y) -> Bil.(bil_exp x ^ bil_exp y) | Binop (op, x, y) -> Bil.binop op (bil_exp x) (bil_exp y) - | Extract (hi, lo, x) -> Bil.extract hi lo (bil_exp x) + | Extract (hi, lo, x) -> Bil.extract ~hi ~lo (bil_exp x) | Cast (_, 1, x) -> Bil.(cast low 1 (bil_exp x)) | Cast (Signed, width, x) -> Bil.(cast signed width (bil_exp x)) | Cast (Unsigned, width, x) -> Bil.(cast unsigned width (bil_exp x)) @@ -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) } @@ -263,7 +263,7 @@ module Translate = struct let store mem addr data endian size = let addr = bil_exp addr.body in let data = bil_exp data.body in - Bil.[mem := store (var mem) addr data endian size] + Bil.[mem := store ~mem:(var mem) ~addr data endian size] let if_ probe then_ else_ = let probe = bil_exp (Exp.body probe) in @@ -285,11 +285,11 @@ module Translate = struct let width_right = lo_var in let left = if width_left = 0 then None - else Some (Bil.extract (width - 1) (hi_var + 1) var) in + else Some (Bil.extract ~hi:(width - 1) ~lo:(hi_var + 1) var) in let middle = bil_exp (Exp.body rhs) in let right = if width_right = 0 then None - else Some (Bil.extract (lo_var - 1) 0 var) in + else Some (Bil.extract ~hi:(lo_var - 1) ~lo:0 var) in match left,right with | None, None -> Bil.[v := middle] | Some left, None -> Bil.[v := left ^ middle] diff --git a/plugins/powerpc/powerpc_rtl.mli b/plugins/powerpc/powerpc_rtl.mli index 8f1787240..d1efceac0 100644 --- a/plugins/powerpc/powerpc_rtl.mli +++ b/plugins/powerpc/powerpc_rtl.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std type t [@@deriving bin_io, compare, sexp] diff --git a/plugins/powerpc/powerpc_utils.ml b/plugins/powerpc/powerpc_utils.ml index f64ec4f2d..3fa29ff14 100644 --- a/plugins/powerpc/powerpc_utils.ml +++ b/plugins/powerpc/powerpc_utils.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std let ppc_fail format = diff --git a/plugins/primus_approximation/approximation.ml b/plugins/primus_approximation/approximation.ml index aa93c74cf..ccf0057b6 100644 --- a/plugins/primus_approximation/approximation.ml +++ b/plugins/primus_approximation/approximation.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_primus.Std open Bap.Std open Monads.Std diff --git a/plugins/primus_dictionary/dune b/plugins/primus_dictionary/dune index 9009f4c84..07527a27c 100644 --- a/plugins/primus_dictionary/dune +++ b/plugins/primus_dictionary/dune @@ -1,7 +1,7 @@ (library (name bap_primus_dictionary_plugin) (public_name bap-primus-dictionary.plugin) - (libraries bap bap-primus bap-core-theory core_kernel)) + (libraries bap bap-primus bap-core-theory core)) (plugin (name primus-dictionary) diff --git a/plugins/primus_dictionary/primus_dictionary_main.ml b/plugins/primus_dictionary/primus_dictionary_main.ml index b026e0017..e1892ad59 100644 --- a/plugins/primus_dictionary/primus_dictionary_main.ml +++ b/plugins/primus_dictionary/primus_dictionary_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_primus.Std @@ -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_exploring/dune b/plugins/primus_exploring/dune index 2e9b46be1..f3c96e238 100644 --- a/plugins/primus_exploring/dune +++ b/plugins/primus_exploring/dune @@ -1,7 +1,7 @@ (library (name bap_primus_exploring_plugin) (public_name bap-primus-exploring-scheduler.plugin) - (libraries bap bap-primus monads core_kernel)) + (libraries bap bap-primus monads core)) (plugin (name primus-exploring) diff --git a/plugins/primus_exploring/primus_exploring_main.ml b/plugins/primus_exploring/primus_exploring_main.ml index 4496cae98..8eb59d724 100644 --- a/plugins/primus_exploring/primus_exploring_main.ml +++ b/plugins/primus_exploring/primus_exploring_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std open Bap_primus.Std diff --git a/plugins/primus_greedy/dune b/plugins/primus_greedy/dune index 2354aa418..f21c2098a 100644 --- a/plugins/primus_greedy/dune +++ b/plugins/primus_greedy/dune @@ -1,7 +1,7 @@ (library (name bap_primus_greedy_plugin) (public_name bap-primus-greedy-scheduler.plugin) - (libraries bap bap-primus monads core_kernel)) + (libraries bap bap-primus monads core)) (plugin (name primus-greedy) diff --git a/plugins/primus_greedy/primus_greedy_main.ml b/plugins/primus_greedy/primus_greedy_main.ml index f4521d4e8..0e8e24339 100644 --- a/plugins/primus_greedy/primus_greedy_main.ml +++ b/plugins/primus_greedy/primus_greedy_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus.Std open Monads.Std diff --git a/plugins/primus_limit/dune b/plugins/primus_limit/dune index 1afdb00a2..9d657c08a 100644 --- a/plugins/primus_limit/dune +++ b/plugins/primus_limit/dune @@ -1,7 +1,7 @@ (library (name bap_primus_limit_plugin) (public_name bap-primus-limit.plugin) - (libraries bap bap-primus bap-future monads core_kernel regular)) + (libraries bap bap-primus bap-future monads core regular)) (plugin (name primus-limit) diff --git a/plugins/primus_limit/primus_limit_main.ml b/plugins/primus_limit/primus_limit_main.ml index 2f7625542..37a598afe 100644 --- a/plugins/primus_limit/primus_limit_main.ml +++ b/plugins/primus_limit/primus_limit_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std open Bap_primus.Std diff --git a/plugins/primus_lisp/dune b/plugins/primus_lisp/dune index ef018da06..3ef50f53b 100644 --- a/plugins/primus_lisp/dune +++ b/plugins/primus_lisp/dune @@ -10,7 +10,7 @@ bap-main bap-primus bitvec - core_kernel + core monads regular)) diff --git a/plugins/primus_lisp/primus_lisp_documentation.ml b/plugins/primus_lisp/primus_lisp_documentation.ml index 090d80a5a..7a03ea30b 100644 --- a/plugins/primus_lisp/primus_lisp_documentation.ml +++ b/plugins/primus_lisp/primus_lisp_documentation.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_main open Bap.Std @@ -34,7 +34,7 @@ let build_library index = Map.update cats cat ~f:(function | None -> (name %: desc) | Some elts -> - Map.set elts name desc)))) + Map.set elts ~key:name ~data:desc)))) let pp_source ppf desc = Format.fprintf ppf "\ diff --git a/plugins/primus_lisp/primus_lisp_ieee754.ml b/plugins/primus_lisp/primus_lisp_ieee754.ml index b07bf4475..89a88c5d9 100644 --- a/plugins/primus_lisp/primus_lisp_ieee754.ml +++ b/plugins/primus_lisp/primus_lisp_ieee754.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus.Std @@ -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_io.ml b/plugins/primus_lisp/primus_lisp_io.ml index 0f20aeb64..e7c102929 100644 --- a/plugins/primus_lisp/primus_lisp_io.ml +++ b/plugins/primus_lisp/primus_lisp_io.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_primus.Std diff --git a/plugins/primus_lisp/primus_lisp_main.ml b/plugins/primus_lisp/primus_lisp_main.ml index 10c29b372..52ba1e8b4 100644 --- a/plugins/primus_lisp/primus_lisp_main.ml +++ b/plugins/primus_lisp/primus_lisp_main.ml @@ -1,10 +1,10 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory 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_lisp/primus_lisp_primitives.ml b/plugins/primus_lisp/primus_lisp_primitives.ml index c067dec13..06bbbf571 100644 --- a/plugins/primus_lisp/primus_lisp_primitives.ml +++ b/plugins/primus_lisp/primus_lisp_primitives.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_primus.Std @@ -11,7 +11,7 @@ let registers = Primus.Machine.State.declare Insn.ops insn |> Array.fold ~init:regs ~f:(fun regs -> function | Op.Reg r -> - Map.set regs (Reg.code r) (Reg.name r) + Map.set regs ~key:(Reg.code r) ~data:(Reg.name r) | _ -> regs)) module Closure(Machine : Primus.Machine.S) = struct @@ -136,7 +136,7 @@ module Closure(Machine : Primus.Machine.S) = struct let gen = match rest with | [] -> Ok None | [x] -> make_static_generator width (Value.to_word x) - | [min; max] -> make_uniform_generator width min max + | [min; max] -> make_uniform_generator ~width ~min ~max | _ -> Or_error.errorf "bad generator" in if Result.is_error gen then failf "memory-allocate: bad generator specification" () diff --git a/plugins/primus_lisp/primus_lisp_run.ml b/plugins/primus_lisp/primus_lisp_run.ml index fce56586a..965487da5 100644 --- a/plugins/primus_lisp/primus_lisp_run.ml +++ b/plugins/primus_lisp/primus_lisp_run.ml @@ -1,6 +1,6 @@ let doc = "Runs the Primus lisp program." -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap_main open Extension.Syntax diff --git a/plugins/primus_lisp/primus_lisp_semantic_primitives.ml b/plugins/primus_lisp/primus_lisp_semantic_primitives.ml index ee4b2e9bc..25af41b4c 100644 --- a/plugins/primus_lisp/primus_lisp_semantic_primitives.ml +++ b/plugins/primus_lisp/primus_lisp_semantic_primitives.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_primus.Std open KB.Syntax diff --git a/plugins/primus_lisp/primus_lisp_show.ml b/plugins/primus_lisp/primus_lisp_show.ml index ab707e1d9..d5c31ea6c 100644 --- a/plugins/primus_lisp/primus_lisp_show.ml +++ b/plugins/primus_lisp/primus_lisp_show.ml @@ -36,7 +36,7 @@ bap show foo --primus-lisp-load=demo -tarmv5+le -obap:bil " -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_main open Bap.Std diff --git a/plugins/primus_loader/dune b/plugins/primus_loader/dune index 8bdbe588d..e35abe37f 100644 --- a/plugins/primus_loader/dune +++ b/plugins/primus_loader/dune @@ -2,7 +2,7 @@ (name bap_primus_loader_plugin) (public_name bap-primus-loader.plugin) (preprocess (pps ppx_bap)) - (libraries bap bap-core-theory bap-primus monads core_kernel ogre)) + (libraries bap bap-core-theory bap-primus monads core ogre)) (plugin (name primus-loader) diff --git a/plugins/primus_loader/primus_loader_basic.ml b/plugins/primus_loader/primus_loader_basic.ml index 2ceec6631..da59d22de 100644 --- a/plugins/primus_loader/primus_loader_basic.ml +++ b/plugins/primus_loader/primus_loader_basic.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_primus.Std @@ -69,7 +69,6 @@ module Make(Param : Param)(Machine : Primus.Machine.S) = struct let rec is set = function | Backend.Or (p1,p2) -> is set p1 || is set p2 | bit -> [%compare.equal : Backend.perm] bit set - [@@warning "-D"] let segmentations = let open Image.Scheme in diff --git a/plugins/primus_loader/primus_loader_main.ml b/plugins/primus_loader/primus_loader_main.ml index f65755f65..a19b426a7 100644 --- a/plugins/primus_loader/primus_loader_main.ml +++ b/plugins/primus_loader/primus_loader_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus.Std include Self() diff --git a/plugins/primus_powerpc/dune b/plugins/primus_powerpc/dune index 62b6393e8..04bb34290 100644 --- a/plugins/primus_powerpc/dune +++ b/plugins/primus_powerpc/dune @@ -1,7 +1,7 @@ (library (name bap_primus_powerpc_plugin) (public_name bap-primus-powerpc.plugin) - (libraries bap bap-primus core_kernel)) + (libraries bap bap-primus core)) (plugin (name primus-powerpc) diff --git a/plugins/primus_powerpc/primus_powerpc_main.ml b/plugins/primus_powerpc/primus_powerpc_main.ml index 5c60bbc85..f8e2ac127 100644 --- a/plugins/primus_powerpc/primus_powerpc_main.ml +++ b/plugins/primus_powerpc/primus_powerpc_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus.Std diff --git a/plugins/primus_print/dune b/plugins/primus_print/dune index d0c29a1d4..757a0e210 100644 --- a/plugins/primus_print/dune +++ b/plugins/primus_print/dune @@ -9,7 +9,7 @@ bap-knowledge bap-primus bare - core_kernel + core monads)) (plugin diff --git a/plugins/primus_print/primus_print_main.ml b/plugins/primus_print/primus_print_main.ml index 0fc003c8f..1698acc29 100644 --- a/plugins/primus_print/primus_print_main.ml +++ b/plugins/primus_print/primus_print_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_primus.Std diff --git a/plugins/primus_promiscuous/dune b/plugins/primus_promiscuous/dune index 298a1d2df..fb023edc5 100644 --- a/plugins/primus_promiscuous/dune +++ b/plugins/primus_promiscuous/dune @@ -1,7 +1,7 @@ (library (name bap_primus_promiscuous_plugin) (public_name bap-primus-promiscuous.plugin) - (libraries bap bap-primus core_kernel monads)) + (libraries bap bap-primus core monads)) (plugin (name primus-promiscuous) diff --git a/plugins/primus_promiscuous/primus_promiscuous_main.ml b/plugins/primus_promiscuous/primus_promiscuous_main.ml index e1779347c..be7bfc36f 100644 --- a/plugins/primus_promiscuous/primus_promiscuous_main.ml +++ b/plugins/primus_promiscuous/primus_promiscuous_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std open Bap_primus.Std diff --git a/plugins/primus_propagate_taint/dune b/plugins/primus_propagate_taint/dune index 5dd55ed62..a4baa110c 100644 --- a/plugins/primus_propagate_taint/dune +++ b/plugins/primus_propagate_taint/dune @@ -10,7 +10,7 @@ bap-microx bap-primus bap-taint - core_kernel + core graphlib monads regular)) diff --git a/plugins/primus_propagate_taint/primus_propagate_taint_main.ml b/plugins/primus_propagate_taint/primus_propagate_taint_main.ml index 0ed15f0d2..bafcd8bce 100644 --- a/plugins/primus_propagate_taint/primus_propagate_taint_main.ml +++ b/plugins/primus_propagate_taint/primus_propagate_taint_main.ml @@ -1,8 +1,8 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std open Bap_primus.Std -module Legacy_taint = Taint [@@warning "-D"] +module Legacy_taint = Taint open Bap_taint.Std include Self() diff --git a/plugins/primus_random/dune b/plugins/primus_random/dune index f72d7314c..a08a30fc0 100644 --- a/plugins/primus_random/dune +++ b/plugins/primus_random/dune @@ -8,7 +8,7 @@ bap-primus bitvec bitvec-sexp - core_kernel + core zarith bap-core-theory)) diff --git a/plugins/primus_random/primus_random_main.ml b/plugins/primus_random/primus_random_main.ml index 9303020f6..d49c9e514 100644 --- a/plugins/primus_random/primus_random_main.ml +++ b/plugins/primus_random/primus_random_main.ml @@ -179,7 +179,7 @@ when the $(b,--primus-promiscuous-mode) is enabled. |} -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap_main open Bap.Std @@ -417,7 +417,7 @@ let main ctxt = let var = Arg.lhs arg in match Generator.for_var ~seed ~width var generators with | None -> {args} - | Some gen -> {args = Map.set args var gen})) in + | Some gen -> {args = Map.set args ~key:var ~data:gen})) in let module RandomizeEnvironment(Machine : Primus.Machine.S) = struct open Machine.Syntax diff --git a/plugins/primus_region/dune b/plugins/primus_region/dune index 271e3a466..9e40f1800 100644 --- a/plugins/primus_region/dune +++ b/plugins/primus_region/dune @@ -2,7 +2,7 @@ (name bap_primus_region_plugin) (public_name bap-primus-region.plugin) (preprocess (pps ppx_bap)) - (libraries bap bap-core-theory bap-primus monads core_kernel)) + (libraries bap bap-core-theory bap-primus monads core)) (plugin (name primus-region) diff --git a/plugins/primus_region/primus_region_main.ml b/plugins/primus_region/primus_region_main.ml index 74f94f3e7..93676a00a 100644 --- a/plugins/primus_region/primus_region_main.ml +++ b/plugins/primus_region/primus_region_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_primus.Std diff --git a/plugins/primus_round_robin/dune b/plugins/primus_round_robin/dune index d9f44846a..b041b1920 100644 --- a/plugins/primus_round_robin/dune +++ b/plugins/primus_round_robin/dune @@ -2,7 +2,7 @@ (name bap_primus_round_robin_plugin) (public_name bap-primus-round-robin-scheduler.plugin) (preprocess (pps ppx_bap)) - (libraries bap bap-future bap-primus monads core_kernel)) + (libraries bap bap-future bap-primus monads core)) (plugin (name primus-round-robin) diff --git a/plugins/primus_round_robin/primus_round_robin_main.ml b/plugins/primus_round_robin/primus_round_robin_main.ml index 5076ef8c2..5c9ea51ad 100644 --- a/plugins/primus_round_robin/primus_round_robin_main.ml +++ b/plugins/primus_round_robin/primus_round_robin_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std open Bap_primus.Std diff --git a/plugins/primus_symbolic_executor/dune b/plugins/primus_symbolic_executor/dune index 8af43eb4b..354d48913 100644 --- a/plugins/primus_symbolic_executor/dune +++ b/plugins/primus_symbolic_executor/dune @@ -9,7 +9,7 @@ bap-primus bap-primus-track-visited bitvec - core_kernel + core monads regular z3 diff --git a/plugins/primus_symbolic_executor/primus_symbolic_executor_main.ml b/plugins/primus_symbolic_executor/primus_symbolic_executor_main.ml index 3596259a4..ca465b2b2 100644 --- a/plugins/primus_symbolic_executor/primus_symbolic_executor_main.ml +++ b/plugins/primus_symbolic_executor/primus_symbolic_executor_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_primus.Std @@ -463,7 +463,7 @@ end = struct | Some x -> Machine.Local.put executor { s with - values = Map.add_exn s.values (id r) (f x) + values = Map.add_exn s.values ~key:(id r) ~data:(f x) } let lift2 x y r f = @@ -475,7 +475,7 @@ end = struct and y = to_formula y fy in Machine.Local.put executor { s with - values = Map.add_exn s.values (id r) (f x y) + values = Map.add_exn s.values ~key:(id r) ~data:(f x y) } let lift3 x y z r f = @@ -488,7 +488,7 @@ end = struct and z = to_formula z fz in Machine.Local.put executor { s with - values = Map.add_exn s.values (id r) (f x y z) + values = Map.add_exn s.values ~key:(id r) ~data:(f x y z) } let on_binop ((op,x,y),z) = lift2 x y z @@ SMT.binop op @@ -504,7 +504,7 @@ end = struct let x = SMT.var (Input.to_symbol origin) size in Machine.Local.update executor ~f:(fun s -> { inputs = Set.add s.inputs origin; - values = Map.set s.values id x; + values = Map.set s.values ~key:id ~data:x; }) let on_memory_input (p,x) = @@ -669,8 +669,8 @@ let forker ctxt : Primus.component = is_visited visited dst let append xs x = match Map.max_elt xs with - | None -> Map.add_exn xs 0 x - | Some (k,_) -> Map.add_exn xs (k+1) x + | None -> Map.add_exn xs ~key:0 ~data:x + | Some (k,_) -> Map.add_exn xs ~key:(k+1) ~data:x let push_task task s = { s with tasks = append s.tasks task; diff --git a/plugins/primus_systems/dune b/plugins/primus_systems/dune index cce1845ce..bd9df820c 100644 --- a/plugins/primus_systems/dune +++ b/plugins/primus_systems/dune @@ -1,7 +1,7 @@ (library (name bap_primus_systems_plugin) (public_name bap-primus-systems.plugin) - (libraries bap-knowledge bap-main bap-primus core_kernel)) + (libraries bap-knowledge bap-main bap-primus core)) (plugin (name primus-systems) diff --git a/plugins/primus_systems/primus_systems_main.ml b/plugins/primus_systems/primus_systems_main.ml index 0a155e6c6..17adebe27 100644 --- a/plugins/primus_systems/primus_systems_main.ml +++ b/plugins/primus_systems/primus_systems_main.ml @@ -41,11 +41,11 @@ corresponding command help pages for more information. ``` |} open Bap_knowledge -open Core_kernel[@@warning "-D"] +open Core open Bap_main open Bap_primus.Std open Format -module Sys = Caml.Sys +module Sys = Stdlib.Sys let command what = sprintf " @@ -101,7 +101,7 @@ let make_info_command list name = let name = sprintf "primus-%ss" name in Extension.Command.(declare ~doc name (args $ names)) @@ fun names _ctxt -> let detailed = match names with [_] -> true | _ -> false in - let names = List.map names Knowledge.Name.read |> + let names = List.map names ~f:Knowledge.Name.read |> Set.of_list (module Knowledge.Name) in let selected info = Set.is_empty names || Set.mem names (Primus.Info.name info) in diff --git a/plugins/primus_taint/dune b/plugins/primus_taint/dune index 2a3a5f92d..f51818c61 100644 --- a/plugins/primus_taint/dune +++ b/plugins/primus_taint/dune @@ -1,7 +1,7 @@ (library (name bap_primus_taint_plugin) (public_name bap-primus-taint.plugin) - (libraries bap bap-primus bap-taint core_kernel regular monads)) + (libraries bap bap-primus bap-taint core regular monads)) (plugin (name primus-taint) diff --git a/plugins/primus_taint/primus_taint_main.ml b/plugins/primus_taint/primus_taint_main.ml index 7058db06b..7d5c07a49 100644 --- a/plugins/primus_taint/primus_taint_main.ml +++ b/plugins/primus_taint/primus_taint_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Bap_primus.Std diff --git a/plugins/primus_taint/primus_taint_policies.ml b/plugins/primus_taint/primus_taint_policies.ml index 1b8bc6dfd..6dfdc4f8c 100644 --- a/plugins/primus_taint/primus_taint_policies.ml +++ b/plugins/primus_taint/primus_taint_policies.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_primus.Std open Bap_taint.Std open Format diff --git a/plugins/primus_test/dune b/plugins/primus_test/dune index 718f2ea69..4acfd34fc 100644 --- a/plugins/primus_test/dune +++ b/plugins/primus_test/dune @@ -6,7 +6,7 @@ bap-primus bitvec bitvec-order - core_kernel + core monads regular zarith)) diff --git a/plugins/primus_test/primus_test_main.ml b/plugins/primus_test/primus_test_main.ml index 88e571682..d73bb6573 100644 --- a/plugins/primus_test/primus_test_main.ml +++ b/plugins/primus_test/primus_test_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_primus.Std open Monads.Std @@ -178,7 +178,7 @@ module Location = struct let set_cls name id cls s = { s with incidents = Map.update s.incidents name ~f:(function | None -> Primus.Value.Map.singleton id cls - | Some classes -> Map.set classes id cls) + | Some classes -> Map.set classes ~key:id ~data:cls) } @@ -284,7 +284,7 @@ module Incident = struct !!report_new_instance (name,id,locations) >>= fun () -> !!report_new_representative (name,id,locations) >>= fun () -> Machine.Global.update Location.state - (Location.set_cls name id cls)) + ~f:(Location.set_cls name id cls)) ~new_instance:(fun id -> !!report_new_instance (name,id,locations)) ~new_class:(fun cls -> @@ -292,7 +292,7 @@ module Incident = struct !!report_new_class (name,id,locations) >>= fun () -> !!report_new_instance (name,id,locations) >>= fun () -> Machine.Global.update Location.state - (Location.set_cls name id cls)) + ~f:(Location.set_cls name id cls)) >>= fun () -> Value.b1 diff --git a/plugins/primus_wandering/dune b/plugins/primus_wandering/dune index 1eea19f8d..6f0bb2df4 100644 --- a/plugins/primus_wandering/dune +++ b/plugins/primus_wandering/dune @@ -1,7 +1,7 @@ (library (name bap_primus_wandering_plugin) (public_name bap-primus-wandering-scheduler.plugin) - (libraries bap bap-future bap-primus core_kernel monads)) + (libraries bap bap-future bap-primus core monads)) (plugin (name primus-wandering) diff --git a/plugins/primus_wandering/primus_wandering_main.ml b/plugins/primus_wandering/primus_wandering_main.ml index d8a7a0be3..40217651d 100644 --- a/plugins/primus_wandering/primus_wandering_main.ml +++ b/plugins/primus_wandering/primus_wandering_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Monads.Std open Bap_future.Std diff --git a/plugins/primus_x86/primus_x86_loader.ml b/plugins/primus_x86/primus_x86_loader.ml index c0a7fdc09..f4701ad7b 100644 --- a/plugins/primus_x86/primus_x86_loader.ml +++ b/plugins/primus_x86/primus_x86_loader.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std open Bap_primus.Std diff --git a/plugins/print/dune b/plugins/print/dune index d0af917a3..beb9e639a 100644 --- a/plugins/print/dune +++ b/plugins/print/dune @@ -6,8 +6,7 @@ bap-core-theory bap-demangle bap-knowledge - core_kernel - core_kernel.caml_unix + core graphlib ogre regular diff --git a/plugins/print/print_main.ml b/plugins/print/print_main.ml index 59b3c0884..cfd10a05d 100644 --- a/plugins/print/print_main.ml +++ b/plugins/print/print_main.ml @@ -1,5 +1,5 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Graphlib.Std open Bap.Std @@ -321,7 +321,7 @@ let print_bir_graph ~labeled patterns ppf proj = match Term.first blk_t sub with | None -> entries | Some entry -> - Map.add_exn entries (Term.tid sub) (Term.tid entry)) in + Map.add_exn entries ~key:(Term.tid sub) ~data:(Term.tid entry)) in fprintf ppf "digraph {@\nnode[shape=box];@\n"; Term.enum sub_t prog |> Seq.iter ~f:(fun sub -> let name = Sub.name sub in diff --git a/plugins/propagate_taint/dune b/plugins/propagate_taint/dune index 55a3ce553..765528d8e 100644 --- a/plugins/propagate_taint/dune +++ b/plugins/propagate_taint/dune @@ -6,7 +6,7 @@ bap bap-core-theory bap-microx - core_kernel + core graphlib monads regular)) diff --git a/plugins/propagate_taint/propagate_taint_main.ml b/plugins/propagate_taint/propagate_taint_main.ml index 4bebc0498..886507249 100644 --- a/plugins/propagate_taint/propagate_taint_main.ml +++ b/plugins/propagate_taint/propagate_taint_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Graphlib.Std open Bap.Std diff --git a/plugins/propagate_taint/propagator.ml b/plugins/propagate_taint/propagator.ml index cb0aae100..6363f2c49 100644 --- a/plugins/propagate_taint/propagator.ml +++ b/plugins/propagate_taint/propagator.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Regular.Std open Bap.Std @@ -77,10 +77,10 @@ type result = Result.t let propagate taints vars tid v r : taints = let ts = taints r in - Map.change vars tid (function + Map.change vars tid ~f:(function | None when Set.is_empty ts -> None | None -> Some (Var.Map.of_alist_exn [v, ts]) - | Some vs -> Option.some @@ Map.change vs v (function + | Some vs -> Option.some @@ Map.change vs v ~f:(function | None when Set.is_empty ts -> None | None -> Some ts | Some ts' -> Some (Set.union ts ts'))) diff --git a/plugins/propagate_taint/propagator.mli b/plugins/propagate_taint/propagator.mli index 6ffdf27a3..66e364f1d 100644 --- a/plugins/propagate_taint/propagator.mli +++ b/plugins/propagate_taint/propagator.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std diff --git a/plugins/radare2/dune b/plugins/radare2/dune index d4f4c68b6..18179dc6d 100644 --- a/plugins/radare2/dune +++ b/plugins/radare2/dune @@ -10,8 +10,7 @@ bap-knowledge bap-relation bitvec - core_kernel - core_kernel.caml_unix + core regular re.pcre yojson diff --git a/plugins/radare2/radare2_main.ml b/plugins/radare2/radare2_main.ml index f45a9f28c..8a6d6479d 100644 --- a/plugins/radare2/radare2_main.ml +++ b/plugins/radare2/radare2_main.ml @@ -1,5 +1,5 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core open Bap_future.Std open Bap.Std include Self() @@ -100,7 +100,7 @@ let provide_radare2 file = | Some name -> Bap_relation.add rels addr name else rels) in Bap_relation.matching rels () - ~saturated:(fun addr name () -> Hashtbl.add_exn funcs addr name) + ~saturated:(fun addr name () -> Hashtbl.add_exn funcs ~key:addr ~data:name) ~unmatched:(fun reason () -> report_missing reason); if Hashtbl.length funcs = 0 then warning "failed to obtain symbols"; diff --git a/plugins/raw/dune b/plugins/raw/dune index 787de3f07..89f832128 100644 --- a/plugins/raw/dune +++ b/plugins/raw/dune @@ -3,7 +3,7 @@ (public_name bap-raw.plugin) (preprocess (pps ppx_bap)) (libraries bap bap-main bitvec - core_kernel core_kernel.caml_unix ogre)) + core ogre)) (plugin (name raw) diff --git a/plugins/raw/raw_main.ml b/plugins/raw/raw_main.ml index aba396903..1e5266b5c 100644 --- a/plugins/raw/raw_main.ml +++ b/plugins/raw/raw_main.ml @@ -9,10 +9,10 @@ form the outside. open Bap.Std open Bap_main -open Core_kernel[@@warning "-D"] +open Core open Extension.Syntax -module Buffer = Caml.Buffer +module Buffer = Stdlib.Buffer module Unix = Caml_unix module Spec = struct diff --git a/plugins/read_symbols/dune b/plugins/read_symbols/dune index d769e68f3..2fb92a2c4 100644 --- a/plugins/read_symbols/dune +++ b/plugins/read_symbols/dune @@ -7,7 +7,7 @@ bap-main bap-relation bitvec - core_kernel)) + core)) (plugin (name read-symbols) diff --git a/plugins/read_symbols/read_symbols_main.ml b/plugins/read_symbols/read_symbols_main.ml index 6ebd46a7f..7001b9ecf 100644 --- a/plugins/read_symbols/read_symbols_main.ml +++ b/plugins/read_symbols/read_symbols_main.ml @@ -84,11 +84,11 @@ bap \\$binary --read-symbols-from=mv.scm --read-symbols-when-matches " -open Core_kernel[@@warning "-D"] +open Core 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%" @@ -120,7 +120,7 @@ let build_functions relation = let sexp_of_t x = Sexp.Atom (Bitvec.to_string x) end) in Bap_relation.matching relation () - ~saturated:(fun addr name () -> Hashtbl.add_exn functions addr name) + ~saturated:(fun addr name () -> Hashtbl.add_exn functions ~key:addr ~data:name) ~unmatched:(fun problem () -> match problem with | Non_injective_bwd (names,addr) -> error "skipping names (%s) that has the same address %a" @@ -128,7 +128,7 @@ let build_functions relation = | Non_injective_fwd (addrs,name) -> match List.min_elt addrs ~compare:Bitvec.compare with | None -> assert false - | Some addr -> Hashtbl.set functions addr name); + | Some addr -> Hashtbl.set functions ~key:addr ~data:name); functions let chop_suffix p = try Filename.chop_extension p with _ -> p diff --git a/plugins/relocatable/dune b/plugins/relocatable/dune index af2d81dd8..935493df1 100644 --- a/plugins/relocatable/dune +++ b/plugins/relocatable/dune @@ -13,7 +13,7 @@ bitvec bitvec-order bitvec-sexp - core_kernel + core monads ogre)) diff --git a/plugins/relocatable/rel_symbolizer.ml b/plugins/relocatable/rel_symbolizer.ml index f4fff3e3a..80f5c9491 100644 --- a/plugins/relocatable/rel_symbolizer.ml +++ b/plugins/relocatable/rel_symbolizer.ml @@ -15,7 +15,7 @@ $(b,bap-plugin-llvm)(1) open Bap_main open Bap_knowledge -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_core_theory diff --git a/plugins/report/dune b/plugins/report/dune index 272d3ce27..d4ce44ef5 100644 --- a/plugins/report/dune +++ b/plugins/report/dune @@ -2,7 +2,7 @@ (name bap_report_plugin) (public_name bap-report.plugin) (preprocess (pps ppx_bap)) - (libraries bap bap-future core_kernel core_kernel.caml_unix)) + (libraries bap bap-future core)) (plugin (name report) diff --git a/plugins/report/report_main.ml b/plugins/report/report_main.ml index ca7f96c26..98365fa80 100644 --- a/plugins/report/report_main.ml +++ b/plugins/report/report_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_future.Std open Format diff --git a/plugins/resolve_indirects/resolve_indirects_main.ml b/plugins/resolve_indirects/resolve_indirects_main.ml index 8767015e7..fa0009daa 100644 --- a/plugins/resolve_indirects/resolve_indirects_main.ml +++ b/plugins/resolve_indirects/resolve_indirects_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std (** substitute loads with the value of corresponding memory *) diff --git a/plugins/riscv/dune b/plugins/riscv/dune index 41aab69c9..ab40ddbbf 100644 --- a/plugins/riscv/dune +++ b/plugins/riscv/dune @@ -11,7 +11,7 @@ bap-knowledge bap-main bap-riscv - core_kernel + core monads ogre)) diff --git a/plugins/riscv/riscv_main.ml b/plugins/riscv/riscv_main.ml index 7f2c1e8b4..73a0fb8fe 100644 --- a/plugins/riscv/riscv_main.ml +++ b/plugins/riscv/riscv_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_main open Bap.Std open Bap_core_theory diff --git a/plugins/run/dune b/plugins/run/dune index 7f4a73dcd..611795631 100644 --- a/plugins/run/dune +++ b/plugins/run/dune @@ -6,7 +6,7 @@ bap-core-theory bap-knowledge bap-primus - core_kernel + core graphlib monads regular)) diff --git a/plugins/run/run_main.ml b/plugins/run/run_main.ml index f6b90c279..4b6a37313 100644 --- a/plugins/run/run_main.ml +++ b/plugins/run/run_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_knowledge open Bap_core_theory open Bap.Std diff --git a/plugins/specification/dune b/plugins/specification/dune index 3c6fa97b1..68385a21b 100644 --- a/plugins/specification/dune +++ b/plugins/specification/dune @@ -1,7 +1,7 @@ (library (name specification) (public_name bap-specification.plugin) - (libraries bap core_kernel bap-main ogre regular)) + (libraries bap core bap-main ogre regular)) (plugin (name specification) diff --git a/plugins/specification/specification_main.ml b/plugins/specification/specification_main.ml index 7ac945a08..e1c264cef 100644 --- a/plugins/specification/specification_main.ml +++ b/plugins/specification/specification_main.ml @@ -5,7 +5,7 @@ Displays information about the binary. The information is printed in the OGRE format. " -open Core_kernel[@@warning "-D"] +open Core open Bap_main open Bap.Std open Regular.Std diff --git a/plugins/strings/dune b/plugins/strings/dune index b99a0fa37..73a4d4ea8 100644 --- a/plugins/strings/dune +++ b/plugins/strings/dune @@ -1,7 +1,7 @@ (library (name bap_strings_plugin) (public_name bap-beagle-strings.plugin) - (libraries bap bap-strings bap-beagle core_kernel regular)) + (libraries bap bap-strings bap-beagle core regular)) (plugin (name strings) diff --git a/plugins/strings/strings_main.ml b/plugins/strings/strings_main.ml index f11850517..a49b5d6d4 100644 --- a/plugins/strings/strings_main.ml +++ b/plugins/strings/strings_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Regular.Std open Bap.Std open Bap_strings.Std diff --git a/plugins/stub_resolver/dune b/plugins/stub_resolver/dune index 14209edb8..3a46a763a 100644 --- a/plugins/stub_resolver/dune +++ b/plugins/stub_resolver/dune @@ -12,7 +12,7 @@ bitvec bitvec-order bitvec-sexp - core_kernel + core ogre)) (plugin diff --git a/plugins/stub_resolver/stub_resolver.ml b/plugins/stub_resolver/stub_resolver.ml index 1b50f8751..91e15da24 100644 --- a/plugins/stub_resolver/stub_resolver.ml +++ b/plugins/stub_resolver/stub_resolver.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_core_theory open Bap_knowledge @@ -88,7 +88,7 @@ let update_units t sub = match Term.get_attr sub filename with | Some file -> in_file file @@ fun unit -> let tid = Term.tid sub in - !!{t with units = Map.add_exn t.units tid unit} + !!{t with units = Map.add_exn t.units ~key:tid ~data:unit} | None -> !!t let should_link aliases ~link_only ~no_link = @@ -141,7 +141,7 @@ let find_pairs t = | 1 -> let impl = Set.min_elt_exn reals in Set.fold stubs ~init ~f:(fun links stub -> - Map.add_exn links stub impl) + Map.add_exn links ~key:stub ~data:impl) | 0 -> info "no implementations found in group %a" pp group; init diff --git a/plugins/stub_resolver/stub_resolver.mli b/plugins/stub_resolver/stub_resolver.mli index 78815f1ae..b2f23f111 100644 --- a/plugins/stub_resolver/stub_resolver.mli +++ b/plugins/stub_resolver/stub_resolver.mli @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std open Bap_core_theory open Bap_knowledge diff --git a/plugins/stub_resolver/stub_resolver_main.ml b/plugins/stub_resolver/stub_resolver_main.ml index d6a864bf0..9d40afd89 100644 --- a/plugins/stub_resolver/stub_resolver_main.ml +++ b/plugins/stub_resolver/stub_resolver_main.ml @@ -37,13 +37,13 @@ for more details on the format of accepted inputs): |} -open Core_kernel[@@warning "-D"] +open Core open Bap.Std 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/systemz/systemz_lifter.ml b/plugins/systemz/systemz_lifter.ml index 6b3eb56d1..d56a48140 100644 --- a/plugins/systemz/systemz_lifter.ml +++ b/plugins/systemz/systemz_lifter.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap_core_theory open Bap.Std @@ -97,7 +97,7 @@ end The return type [unit Theory.eff] is the denotation of effects that the instruction performs. The ['a Theory.eff] type is an - abbreviation for ['a Theory.effect], which, in turn, is an + abbreviation for ['a Theory.effect_], which, in turn, is an abbreviation to the knowledge base value of class [Theory.Effect.cls], therefore the fully de-abbreviated type of the return type is: diff --git a/plugins/taint/dune b/plugins/taint/dune index b0f23529b..07b6d22de 100644 --- a/plugins/taint/dune +++ b/plugins/taint/dune @@ -2,7 +2,7 @@ (name bap_taint_plugin) (public_name bap-taint.plugin) (preprocess (pps ppx_bap)) - (libraries bap core_kernel regular)) + (libraries bap core regular)) (plugin (name taint) diff --git a/plugins/taint/taint_main.ml b/plugins/taint/taint_main.ml index 8b5c400df..a53f4f14d 100644 --- a/plugins/taint/taint_main.ml +++ b/plugins/taint/taint_main.ml @@ -1,4 +1,4 @@ -open Core_kernel[@@warning "-D"] +open Core open Bap.Std include Self() open Format diff --git a/plugins/thumb/dune b/plugins/thumb/dune index 7a15ab248..0b8db13cf 100644 --- a/plugins/thumb/dune +++ b/plugins/thumb/dune @@ -9,7 +9,7 @@ bap-knowledge bap-main bitvec - core_kernel + core ogre)) (plugin diff --git a/plugins/thumb/thumb_branch.ml b/plugins/thumb/thumb_branch.ml index 16e933928..240220f25 100644 --- a/plugins/thumb/thumb_branch.ml +++ b/plugins/thumb/thumb_branch.ml @@ -1,10 +1,10 @@ open Bap_core_theory -open Core_kernel[@@warning "-D"] +open Core 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