@ -80,11 +80,10 @@ let all_checkers =
before them . * )
before them . * )
[ { name = " Self captured in block checker "
[ { name = " Self captured in block checker "
; active = Config . is_checker_enabled SelfInBlock
; active = Config . is_checker_enabled SelfInBlock
; callbacks = [ ( intraprocedural SelfInBlock . checker , Language . Clang ) ] }
; callbacks = [ ( intraprocedural SelfInBlock . checker , Clang ) ] }
; { name = " Class loading analysis "
; { name = " Class loading analysis "
; active = Config . is_checker_enabled ClassLoads
; active = Config . is_checker_enabled ClassLoads
; callbacks =
; callbacks = [ ( interprocedural Payloads . Fields . class_loads ClassLoads . analyze_procedure , Java ) ]
[ ( interprocedural Payloads . Fields . class_loads ClassLoads . analyze_procedure , Language . Java ) ]
}
}
; { name = " purity "
; { name = " purity "
; active = Config . ( is_checker_enabled Purity | | is_checker_enabled LoopHoisting )
; active = Config . ( is_checker_enabled Purity | | is_checker_enabled LoopHoisting )
@ -93,7 +92,7 @@ let all_checkers =
interprocedural2 Payloads . Fields . purity Payloads . Fields . buffer_overrun_analysis
interprocedural2 Payloads . Fields . purity Payloads . Fields . buffer_overrun_analysis
Purity . checker
Purity . checker
in
in
[ ( purity , Language . Java ) ; ( purity , Language . Clang ) ] ) }
[ ( purity , Java ) ; ( purity , Clang ) ] ) }
; { name = " Starvation analysis "
; { name = " Starvation analysis "
; active = Config . is_checker_enabled Starvation
; active = Config . is_checker_enabled Starvation
; callbacks =
; callbacks =
@ -101,10 +100,10 @@ let all_checkers =
let starvation_file_reporting =
let starvation_file_reporting =
file StarvationIssues Payloads . Fields . starvation Starvation . reporting
file StarvationIssues Payloads . Fields . starvation Starvation . reporting
in
in
[ ( starvation , Language . Java )
[ ( starvation , Java )
; ( starvation_file_reporting , Language . Java )
; ( starvation_file_reporting , Java )
; ( starvation , Language . Clang )
; ( starvation , Clang )
; ( starvation_file_reporting , Language . Clang ) ] ) }
; ( starvation_file_reporting , Clang ) ] ) }
; { name = " loop hoisting "
; { name = " loop hoisting "
; active = Config . is_checker_enabled LoopHoisting
; active = Config . is_checker_enabled LoopHoisting
; callbacks =
; callbacks =
@ -115,7 +114,7 @@ let all_checkers =
Payloads . Fields . buffer_overrun_analysis Payloads . Fields . purity Payloads . Fields . cost
Payloads . Fields . buffer_overrun_analysis Payloads . Fields . purity Payloads . Fields . cost
Hoisting . checker
Hoisting . checker
in
in
[ ( hoisting , Language . Clang ) ; ( hoisting , Language . Java ) ] ) }
[ ( hoisting , Clang ) ; ( hoisting , Java ) ] ) }
; { name = " cost analysis "
; { name = " cost analysis "
; active =
; active =
Config . (
Config . (
@ -126,17 +125,16 @@ let all_checkers =
interprocedural3 ~ set_payload : ( Field . fset Payloads . Fields . cost ) Payloads . Fields . cost
interprocedural3 ~ set_payload : ( Field . fset Payloads . Fields . cost ) Payloads . Fields . cost
Payloads . Fields . buffer_overrun_analysis Payloads . Fields . purity Cost . checker
Payloads . Fields . buffer_overrun_analysis Payloads . Fields . purity Cost . checker
in
in
[ ( checker , Language . Clang ) ; ( checker , Language . Java ) ] ) }
[ ( checker , Clang ) ; ( checker , Java ) ] ) }
; { name = " uninitialized variables "
; { name = " uninitialized variables "
; active = Config . is_checker_enabled Uninit
; active = Config . is_checker_enabled Uninit
; callbacks = [ ( interprocedural Payloads . Fields . uninit Uninit . checker , Language . Clang ) ] }
; callbacks = [ ( interprocedural Payloads . Fields . uninit Uninit . checker , Clang ) ] }
; { name = " SIOF "
; { name = " SIOF "
; active = Config . is_checker_enabled SIOF
; active = Config . is_checker_enabled SIOF
; callbacks = [ ( interprocedural Payloads . Fields . siof Siof . checker , Language . Clang ) ] }
; callbacks = [ ( interprocedural Payloads . Fields . siof Siof . checker , Clang ) ] }
; { name = " litho-required-props "
; { name = " litho-required-props "
; active = Config . is_checker_enabled LithoRequiredProps
; active = Config . is_checker_enabled LithoRequiredProps
; callbacks =
; callbacks = [ ( interprocedural Payloads . Fields . litho_required_props RequiredProps . checker , Java ) ]
[ ( interprocedural Payloads . Fields . litho_required_props RequiredProps . checker , Language . Java ) ]
}
}
; (* toy resource analysis to use in the infer lab, see the lab/ directory *)
; (* toy resource analysis to use in the infer lab, see the lab/ directory *)
{ name = " resource leak "
{ name = " resource leak "
@ -145,60 +143,53 @@ let all_checkers =
[ ( (* the checked-in version is intraprocedural, but the lab asks to make it
[ ( (* the checked-in version is intraprocedural, but the lab asks to make it
interprocedural later on * )
interprocedural later on * )
interprocedural Payloads . Fields . lab_resource_leaks ResourceLeaks . checker
interprocedural Payloads . Fields . lab_resource_leaks ResourceLeaks . checker
, Language . Java ) ] }
, Java ) ] }
; { name = " RacerD "
; { name = " RacerD "
; active = Config . is_checker_enabled RacerD
; active = Config . is_checker_enabled RacerD
; callbacks =
; callbacks =
( let racerd_proc = interprocedural Payloads . Fields . racerd RacerD . analyze_procedure in
( let racerd_proc = interprocedural Payloads . Fields . racerd RacerD . analyze_procedure in
let racerd_file = file RacerDIssues Payloads . Fields . racerd RacerD . file_analysis in
let racerd_file = file RacerDIssues Payloads . Fields . racerd RacerD . file_analysis in
[ ( racerd_proc , Language . Clang )
[ ( racerd_proc , Clang ) ; ( racerd_proc , Java ) ; ( racerd_file , Clang ) ; ( racerd_file , Java ) ] ) }
; ( racerd_proc , Language . Java )
; ( racerd_file , Language . Clang )
; ( racerd_file , Language . Java ) ] ) }
; { name = " quandary "
; { name = " quandary "
; active = Config . ( is_checker_enabled Quandary )
; active = Config . ( is_checker_enabled Quandary )
; callbacks =
; callbacks =
[ ( interprocedural Payloads . Fields . quandary JavaTaintAnalysis . checker , Language . Java )
[ ( interprocedural Payloads . Fields . quandary JavaTaintAnalysis . checker , Java )
; ( interprocedural Payloads . Fields . quandary ClangTaintAnalysis . checker , Language . Clang ) ] }
; ( interprocedural Payloads . Fields . quandary ClangTaintAnalysis . checker , Clang ) ] }
; { name = " pulse "
; { name = " pulse "
; active = Config . ( is_checker_enabled Pulse | | is_checker_enabled Impurity )
; active = Config . ( is_checker_enabled Pulse | | is_checker_enabled Impurity )
; callbacks =
; callbacks =
( let pulse = interprocedural Payloads . Fields . pulse Pulse . checker in
( let pulse = interprocedural Payloads . Fields . pulse Pulse . checker in
( pulse , Language . Clang )
[ ( pulse , Clang ) ; ( pulse , Java ) ] ) }
:: ( if Config . is_checker_enabled Impurity then [ ( pulse , Language . Java ) ] else [] ) ) }
; { name = " impurity "
; { name = " impurity "
; active = Config . is_checker_enabled Impurity
; active = Config . is_checker_enabled Impurity
; callbacks =
; callbacks =
( let impurity =
( let impurity =
intraprocedural_with_field_dependency Payloads . Fields . pulse Impurity . checker
intraprocedural_with_field_dependency Payloads . Fields . pulse Impurity . checker
in
in
[ ( impurity , Language . Java ) ; ( impurity , Language . Clang ) ] ) }
[ ( impurity , Java ) ; ( impurity , Clang ) ] ) }
; { name = " printf args "
; { name = " printf args "
; active = Config . is_checker_enabled PrintfArgs
; active = Config . is_checker_enabled PrintfArgs
; callbacks = [ ( intraprocedural PrintfArgs . checker , Language . Java ) ] }
; callbacks = [ ( intraprocedural PrintfArgs . checker , Java ) ] }
; { name = " liveness "
; { name = " liveness "
; active = Config . is_checker_enabled Liveness
; active = Config . is_checker_enabled Liveness
; callbacks = [ ( intraprocedural Liveness . checker , Language . Clang ) ] }
; callbacks = [ ( intraprocedural Liveness . checker , Clang ) ] }
; { name = " inefficient keyset iterator "
; { name = " inefficient keyset iterator "
; active = Config . is_checker_enabled InefficientKeysetIterator
; active = Config . is_checker_enabled InefficientKeysetIterator
; callbacks = [ ( intraprocedural InefficientKeysetIterator . checker , Language . Java ) ] }
; callbacks = [ ( intraprocedural InefficientKeysetIterator . checker , Java ) ] }
; { name = " immutable cast "
; { name = " immutable cast "
; active = Config . is_checker_enabled ImmutableCast
; active = Config . is_checker_enabled ImmutableCast
; callbacks =
; callbacks =
[ ( intraprocedural_with_payload Payloads . Fields . nullsafe ImmutableChecker . analyze
[ ( intraprocedural_with_payload Payloads . Fields . nullsafe ImmutableChecker . analyze , Java ) ] }
, Language . Java ) ] }
; { name = " fragment retains view "
; { name = " fragment retains view "
; active = Config . is_checker_enabled FragmentRetainsView
; active = Config . is_checker_enabled FragmentRetainsView
; callbacks =
; callbacks = [ ( intraprocedural FragmentRetainsViewChecker . callback_fragment_retains_view , Java ) ]
[ ( intraprocedural FragmentRetainsViewChecker . callback_fragment_retains_view , Language . Java ) ]
}
}
; { name = " eradicate "
; { name = " eradicate "
; active = Config . is_checker_enabled Eradicate
; active = Config . is_checker_enabled Eradicate
; callbacks =
; callbacks =
[ ( intraprocedural_with_payload Payloads . Fields . nullsafe Eradicate . analyze_procedure
[ ( intraprocedural_with_payload Payloads . Fields . nullsafe Eradicate . analyze_procedure , Java )
, Language . Java )
; ( file NullsafeFileIssues Payloads . Fields . nullsafe FileLevelAnalysis . analyze_file , Java ) ]
; ( file NullsafeFileIssues Payloads . Fields . nullsafe FileLevelAnalysis . analyze_file
}
, Language . Java ) ] }
; { name = " buffer overrun checker "
; { name = " buffer overrun checker "
; active = Config . ( is_checker_enabled BufferOverrun )
; active = Config . ( is_checker_enabled BufferOverrun )
; callbacks =
; callbacks =
@ -206,7 +197,7 @@ let all_checkers =
interprocedural2 Payloads . Fields . buffer_overrun_checker
interprocedural2 Payloads . Fields . buffer_overrun_checker
Payloads . Fields . buffer_overrun_analysis BufferOverrunChecker . checker
Payloads . Fields . buffer_overrun_analysis BufferOverrunChecker . checker
in
in
[ ( bo_checker , Language . Clang ) ; ( bo_checker , Language . Java ) ] ) }
[ ( bo_checker , Clang ) ; ( bo_checker , Java ) ] ) }
; { name = " buffer overrun analysis "
; { name = " buffer overrun analysis "
; active =
; active =
Config . (
Config . (
@ -217,7 +208,7 @@ let all_checkers =
interprocedural Payloads . Fields . buffer_overrun_analysis
interprocedural Payloads . Fields . buffer_overrun_analysis
BufferOverrunAnalysis . analyze_procedure
BufferOverrunAnalysis . analyze_procedure
in
in
[ ( bo_analysis , Language . Clang ) ; ( bo_analysis , Language . Java ) ] ) }
[ ( bo_analysis , Clang ) ; ( bo_analysis , Java ) ] ) }
; { name = " biabduction "
; { name = " biabduction "
; active = Config . is_checker_enabled Biabduction
; active = Config . is_checker_enabled Biabduction
; callbacks =
; callbacks =
@ -225,14 +216,14 @@ let all_checkers =
dynamic_dispatch Payloads . Fields . biabduction
dynamic_dispatch Payloads . Fields . biabduction
( Topl . instrument_callback Interproc . analyze_procedure )
( Topl . instrument_callback Interproc . analyze_procedure )
in
in
[ ( biabduction , Language . Clang ) ; ( biabduction , Language . Java ) ] ) }
[ ( biabduction , Clang ) ; ( biabduction , Java ) ] ) }
; { name = " annotation reachability "
; { name = " annotation reachability "
; active = Config . is_checker_enabled AnnotationReachability
; active = Config . is_checker_enabled AnnotationReachability
; callbacks =
; callbacks =
( let annot_reach =
( let annot_reach =
interprocedural Payloads . Fields . annot_map AnnotationReachability . checker
interprocedural Payloads . Fields . annot_map AnnotationReachability . checker
in
in
[ ( annot_reach , Language . Java ) ; ( annot_reach , Language . Clang ) ] ) } ]
[ ( annot_reach , Java ) ; ( annot_reach , Clang ) ] ) } ]
let get_active_checkers () =
let get_active_checkers () =