@ -141,12 +141,28 @@ let analyze source_files_to_analyze =
collected_stats )
collected_stats )
let invalidate_changed_procedures changed_files =
L . progress " Incremental analysis: invalidating procedures that have been changed@. " ;
let reverse_callgraph = CallGraph . create CallGraph . default_initial_capacity in
ReverseAnalysisCallGraph . build reverse_callgraph ;
SourceFile . Set . iter
( fun sf ->
SourceFiles . proc_names_of_source sf
| > List . iter ~ f : ( CallGraph . flag_reachable reverse_callgraph ) )
changed_files ;
CallGraph . iter_flagged reverse_callgraph ~ f : ( fun node -> SpecsFiles . delete node . pname ) ;
(* save some memory *)
CallGraph . reset reverse_callgraph
let main ~ changed_files =
let main ~ changed_files =
register_active_checkers () ;
register_active_checkers () ;
if Config . reanalyze then (
if Config . reanalyze then (
L . progress " Invalidating procedures to be reanalyzed@. " ;
L . progress " Invalidating procedures to be reanalyzed@. " ;
Summary . OnDisk . reset_all ~ filter : ( Lazy . force Filtering . procedures_filter ) () ;
Summary . OnDisk . reset_all ~ filter : ( Lazy . force Filtering . procedures_filter ) () ;
L . progress " Done@. " )
L . progress " Done@. " )
else if Config . incremental_analysis then
Option . iter ~ f : invalidate_changed_procedures changed_files
else DB . Results_dir . clean_specs_dir () ;
else DB . Results_dir . clean_specs_dir () ;
let source_files = get_source_files_to_analyze ~ changed_files in
let source_files = get_source_files_to_analyze ~ changed_files in
(* empty all caches to minimize the process heap to have less work to do when forking *)
(* empty all caches to minimize the process heap to have less work to do when forking *)