|
25 | 25 | #include <goto-programs/show_symbol_table.h>
|
26 | 26 |
|
27 | 27 | #include <analyses/ai.h>
|
| 28 | +#include <analyses/local_bitvector_analysis.h> |
28 | 29 | #include <analyses/local_may_alias.h>
|
29 | 30 | #include <ansi-c/cprover_library.h>
|
30 | 31 | #include <ansi-c/gcc_version.h>
|
@@ -139,6 +140,11 @@ void goto_analyzer_parse_optionst::get_command_line_options(optionst &options)
|
139 | 140 | options.set_option("show-local-may-alias", true);
|
140 | 141 | options.set_option("specific-analysis", true);
|
141 | 142 | }
|
| 143 | + if(cmdline.isset("show-local-bitvector")) |
| 144 | + { |
| 145 | + options.set_option("show-local-bitvector", true); |
| 146 | + options.set_option("specific-analysis", true); |
| 147 | + } |
142 | 148 |
|
143 | 149 | // Output format choice
|
144 | 150 | if(cmdline.isset("text"))
|
@@ -572,6 +578,23 @@ int goto_analyzer_parse_optionst::perform_analysis(const optionst &options)
|
572 | 578 | return CPROVER_EXIT_SUCCESS;
|
573 | 579 | }
|
574 | 580 |
|
| 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 | + |
575 | 598 | label_properties(goto_model);
|
576 | 599 |
|
577 | 600 | if(cmdline.isset("show-properties"))
|
@@ -802,6 +825,7 @@ void goto_analyzer_parse_optionst::help()
|
802 | 825 | " {y--taint} {ufile_name} \t perform taint analysis using rules in given"
|
803 | 826 | " file\n"
|
804 | 827 | " {y--show-taint} \t print taint analysis results on stdout\n"
|
| 828 | + " {y--show-local-bitvector} \t perform procedure-local bitvector analysis\n" |
805 | 829 | " {y--show-local-may-alias} \t perform procedure-local may alias analysis\n"
|
806 | 830 | "\n"
|
807 | 831 | "C/C++ frontend options:\n"
|
|
0 commit comments