@@ -25,6 +25,7 @@ Author: Daniel Kroening, kroening@kroening.com
2525#include < goto-programs/show_symbol_table.h>
2626
2727#include < analyses/ai.h>
28+ #include < analyses/local_bitvector_analysis.h>
2829#include < analyses/local_may_alias.h>
2930#include < ansi-c/cprover_library.h>
3031#include < ansi-c/gcc_version.h>
@@ -139,6 +140,11 @@ void goto_analyzer_parse_optionst::get_command_line_options(optionst &options)
139140 options.set_option (" show-local-may-alias" , true );
140141 options.set_option (" specific-analysis" , true );
141142 }
143+ if (cmdline.isset (" show-local-bitvector" ))
144+ {
145+ options.set_option (" show-local-bitvector" , true );
146+ options.set_option (" specific-analysis" , true );
147+ }
142148
143149 // Output format choice
144150 if (cmdline.isset (" text" ))
@@ -572,6 +578,23 @@ int goto_analyzer_parse_optionst::perform_analysis(const optionst &options)
572578 return CPROVER_EXIT_SUCCESS;
573579 }
574580
581+ if (options.get_bool_option (" show-local-bitvector" ))
582+ {
583+ namespacet ns (goto_model.symbol_table );
584+
585+ for (const auto &gf_entry : goto_model.goto_functions .function_map )
586+ {
587+ std::cout << " >>>>\n " ;
588+ std::cout << " >>>> " << gf_entry.first << ' \n ' ;
589+ std::cout << " >>>>\n " ;
590+ local_bitvector_analysist local_bitvector_analysis (gf_entry.second , ns);
591+ local_bitvector_analysis.output (std::cout, gf_entry.second , ns);
592+ std::cout << ' \n ' ;
593+ }
594+
595+ return CPROVER_EXIT_SUCCESS;
596+ }
597+
575598 label_properties (goto_model);
576599
577600 if (cmdline.isset (" show-properties" ))
@@ -802,6 +825,7 @@ void goto_analyzer_parse_optionst::help()
802825 " {y--taint} {ufile_name} \t perform taint analysis using rules in given"
803826 " file\n "
804827 " {y--show-taint} \t print taint analysis results on stdout\n "
828+ " {y--show-local-bitvector} \t perform procedure-local bitvector analysis\n "
805829 " {y--show-local-may-alias} \t perform procedure-local may alias analysis\n "
806830 " \n "
807831 " C/C++ frontend options:\n "
0 commit comments