[infer][checkers] run the Java biabduction tests using the checkers framework

Summary:
Another step toward running the biabduction analysis as a checker.

Depends on D6038210

Reviewed By: jvillard

Differential Revision: D6038682

fbshipit-source-id: fed45bf
master
Jeremy Dubreil 7 years ago committed by Facebook Github Bot
parent 514968bf36
commit 03cb052ad9

@ -32,7 +32,7 @@ $(INFER_REPORT): $(JAVA_DEPS_NO_MODELS) $(JAVA_SOURCES)
$(QUIET)$(MKDIR_P) $(MODELS_OUT)
$(QUIET)rm -f $(JAVA_MODELS_JAR)
$(QUIET)$(call silent_on_success,Building Java models,\
$(INFER_BIN) --results-dir $(INFER_RESULTS_DIR) --models-mode -- \
$(INFER_BIN) -a checkers --biabduction-only --results-dir $(INFER_RESULTS_DIR) --models-mode -- \
$(JAVAC) -bootclasspath $(ANDROID_JAR) -d $(MODELS_OUT) -classpath $(MODELS_CLASSPATH) \
$(JAVA_SOURCES))

@ -722,12 +722,9 @@ let dummy =
(** Reset a summary rebuilding the dependents and preserving the proc attributes if present. *)
let reset_summary proc_desc =
let proc_desc_option = if Config.dynamic_dispatch = `Lazy then Some proc_desc else None in
init_summary
( []
, ProcAttributes.proc_flags_empty ()
, []
, Procdesc.get_attributes proc_desc
, proc_desc_option )
let attributes = Procdesc.get_attributes proc_desc in
let proc_flags = attributes.ProcAttributes.proc_flags in
init_summary ([], proc_flags, [], attributes, proc_desc_option)
(* =============== END of support for spec tables =============== *)
(*

@ -2383,7 +2383,18 @@ let clang_frontend_action_string =
let dynamic_dispatch =
let default_mode =
match analyzer with BiAbduction -> `Lazy | Checkers when quandary -> `Sound | _ -> `None
match analyzer with
| BiAbduction
-> `Lazy
| Checkers when biabduction
-> if quandary then
F.printf
"WARNING: Running Quanday on Java is not compatible with the Biabduction analysis@." ;
`Lazy
| Checkers when quandary
-> `Sound
| _
-> `None
in
Option.value ~default:default_mode !dynamic_dispatch

@ -8,7 +8,7 @@
TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --no-default-checkers --eradicate --eradicate-return-over-annotated --eradicate-optional-present --debug-exceptions
INFER_OPTIONS = --eradicate-only --eradicate-return-over-annotated --eradicate-optional-present --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java)

@ -11,7 +11,7 @@
"method": "get"
}
],
"infer-blacklist-files-containing": [
"checkers-blacklist-files-containing": [
"@generated"
],
"skip-translation": [

@ -7,8 +7,8 @@
TESTS_DIR = ../../..
ANALYZER = infer
INFER_OPTIONS = --no-filtering --debug-exceptions
ANALYZER = checkers
INFER_OPTIONS = --biabduction-only --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java)

Loading…
Cancel
Save