diff --git a/infer/src/backend/ExternalPerfData.ml b/infer/src/IR/ExternalPerfData.ml similarity index 100% rename from infer/src/backend/ExternalPerfData.ml rename to infer/src/IR/ExternalPerfData.ml diff --git a/infer/src/backend/ExternalPerfData.mli b/infer/src/IR/ExternalPerfData.mli similarity index 100% rename from infer/src/backend/ExternalPerfData.mli rename to infer/src/IR/ExternalPerfData.mli diff --git a/infer/src/cost/cost.ml b/infer/src/cost/cost.ml index 9676f1453..190d3d45e 100644 --- a/infer/src/cost/cost.ml +++ b/infer/src/cost/cost.ml @@ -322,7 +322,7 @@ let compute_get_node_nb_exec node_cfg bound_map : get_node_nb_exec = {ConstraintSolver.f} in let start_node = NodeCFG.start_node node_cfg in - NodePrinter.with_session start_node + AnalysisCallbacks.html_debug_new_node_session start_node ~pp_name:(fun fmt -> F.pp_print_string fmt "cost(constraints)") ~f:(fun () -> let equalities = ConstraintSolver.collect_constraints ~debug node_cfg in @@ -380,7 +380,7 @@ let checker ({InterproceduralAnalysis.proc_desc; exe_env; analyze_dependency} as None in let get_formals callee_pname = - Ondemand.get_proc_desc callee_pname |> Option.map ~f:Procdesc.get_pvar_formals + AnalysisCallbacks.get_proc_desc callee_pname |> Option.map ~f:Procdesc.get_pvar_formals in let instr_cfg = InstrCFG.from_pdesc proc_desc in let instr_cfg_wto = InstrCFG.wto instr_cfg in diff --git a/infer/src/cost/dune b/infer/src/cost/dune new file mode 100644 index 000000000..07652e907 --- /dev/null +++ b/infer/src/cost/dune @@ -0,0 +1,14 @@ +; Copyright (c) Facebook, Inc. and its affiliates. +; +; This source code is licensed under the MIT license found in the +; LICENSE file in the root directory of this source tree. + +(library + (name costlib) + (public_name infer.costlib) + (flags + (:standard -open Core -open OpenSource -open InferIR -open InferStdlib -open IStd + -open InferGenerated -open InferBase -open Absint -open Bo -open Checkers)) + (libraries core sledge InferStdlib InferGenerated InferBase InferIR absint bo checkers) + (preprocess (pps ppx_compare)) +) diff --git a/infer/src/deadcode/Makefile b/infer/src/deadcode/Makefile index 18211911f..cfc8dc0ee 100644 --- a/infer/src/deadcode/Makefile +++ b/infer/src/deadcode/Makefile @@ -50,8 +50,8 @@ endif # Note that we run find under _build directory. Since we copy some # sources from subfolders to src/ folder to avoid duplicates we use # $(DEPTH_ONE) and iteration over main and library folders. -LIBRARY_FOLDERS = . ./IR ./absint ./atd ./base ./biabduction ./bufferoverrun ./c_stubs ./checkers ./istd ./nullsafe ./pulse ./scripts -INCLUDE_FOLDERS = -I absint -I IR -I atd -I base -I biabduction -I bufferoverrun -I c_stubs -I checkers -I istd -I nullsafe -I pulse -I scripts +LIBRARY_FOLDERS = . ./IR ./absint ./atd ./base ./biabduction ./bufferoverrun ./c_stubs ./checkers ./cost ./istd ./nullsafe ./pulse ./scripts +INCLUDE_FOLDERS = -I absint -I IR -I atd -I base -I biabduction -I bufferoverrun -I c_stubs -I checkers -I cost -I istd -I nullsafe -I pulse -I scripts ml_src_files:=$(shell \ cd $(INFER_BUILD_DIR); \ diff --git a/infer/src/dune.in b/infer/src/dune.in index dbbbc2211..3a3de85c3 100644 --- a/infer/src/dune.in +++ b/infer/src/dune.in @@ -14,7 +14,6 @@ let source_dirs = @ [ (if java then "java" else "java_stubs") ; "backend" ; "concurrency" - ; "cost" ; "integration" ; "labs" ; "quandary" @@ -61,6 +60,8 @@ let infer_cflags = ; "-open" ; "Checkers" ; "-open" + ; "Costlib" + ; "-open" ; "Absint" ; "-open" ; "OpenSource" @@ -101,7 +102,8 @@ let main_lib_stanza = ; "nullsafe" ; "bo" ; "pulselib" - ; "checkers" ] )) + ; "checkers" + ; "costlib" ] )) (String.concat " " infer_binaries)