cprover
goto_instrument_parse_options.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Command Line Parsing
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_GOTO_INSTRUMENT_GOTO_INSTRUMENT_PARSE_OPTIONS_H
13 #define CPROVER_GOTO_INSTRUMENT_GOTO_INSTRUMENT_PARSE_OPTIONS_H
14 
15 #include <ansi-c/ansi_c_language.h>
16 
17 #include <util/parse_options.h>
18 #include <util/timestamper.h>
19 #include <util/ui_message.h>
21 
28 
29 #include <analyses/goto_check.h>
30 
31 #include "aggressive_slicer.h"
34 #include "replace_calls.h"
35 
36 #include "count_eloc.h"
37 
38 // clang-format off
39 #define GOTO_INSTRUMENT_OPTIONS \
40  "(all)" \
41  "(document-claims-latex)(document-claims-html)" \
42  "(document-properties-latex)(document-properties-html)" \
43  "(dump-c-type-header):" \
44  "(dump-c)(dump-cpp)(no-system-headers)(use-all-headers)(dot)(xml)" \
45  "(harness)" \
46  OPT_GOTO_CHECK \
47  /* no-X-check are deprecated and ignored */ \
48  "(no-bounds-check)(no-pointer-check)(no-div-by-zero-check)" \
49  "(no-nan-check)" \
50  "(remove-pointers)" \
51  "(no-simplify)" \
52  "(assert-to-assume)" \
53  "(no-assertions)(no-assumptions)(uninitialized-check)" \
54  "(race-check)(scc)(one-event-per-cycle)" \
55  "(minimum-interference)" \
56  "(mm):(my-events)" \
57  "(unwind):(unwindset):(unwindset-file):" \
58  "(unwinding-assertions)(partial-loops)(continue-as-loops)" \
59  "(log):" \
60  "(max-var):(max-po-trans):(ignore-arrays)" \
61  "(cfg-kill)(no-dependencies)(force-loop-duplication)" \
62  "(call-graph)(reachable-call-graph)" \
63  OPT_INSERT_FINAL_ASSERT_FALSE \
64  OPT_SHOW_CLASS_HIERARCHY \
65  "(no-po-rendering)(render-cluster-file)(render-cluster-function)" \
66  "(nondet-volatile)(isr):" \
67  "(stack-depth):(nondet-static)" \
68  "(nondet-static-exclude):" \
69  "(function-enter):(function-exit):(branch):" \
70  OPT_SHOW_GOTO_FUNCTIONS \
71  OPT_SHOW_PROPERTIES \
72  "(drop-unused-functions)" \
73  "(show-value-sets)" \
74  "(show-global-may-alias)" \
75  "(show-local-bitvector-analysis)(show-custom-bitvector-analysis)" \
76  "(show-escape-analysis)(escape-analysis)" \
77  "(custom-bitvector-analysis)" \
78  "(show-struct-alignment)(interval-analysis)(show-intervals)" \
79  "(show-uninitialized)(show-locations)" \
80  "(full-slice)(reachability-slice)(slice-global-inits)" \
81  "(fp-reachability-slice):" \
82  "(inline)(partial-inline)(function-inline):(log):(no-caching)" \
83  OPT_REMOVE_CONST_FUNCTION_POINTERS \
84  "(print-internal-representation)" \
85  "(remove-function-pointers)" \
86  "(show-claims)(property):" \
87  "(show-symbol-table)(show-points-to)(show-rw-set)" \
88  "(cav11)" \
89  OPT_TIMESTAMP \
90  "(show-natural-loops)(show-lexical-loops)(accelerate)(havoc-loops)" \
91  "(error-label):(string-abstraction)" \
92  "(verbosity):(version)(xml-ui)(json-ui)(show-loops)" \
93  "(accelerate)(constant-propagator)" \
94  "(k-induction):(step-case)(base-case)" \
95  "(show-call-sequences)(check-call-sequence)" \
96  "(interpreter)(show-reaching-definitions)" \
97  "(list-symbols)(list-undefined-functions)" \
98  "(z3)(add-library)(show-dependence-graph)" \
99  "(horn)(skip-loops):(apply-code-contracts)(model-argc-argv):" \
100  "(show-threaded)(list-calls-args)" \
101  "(undefined-function-is-assume-false)" \
102  "(remove-function-body):"\
103  OPT_AGGRESSIVE_SLICER \
104  OPT_FLUSH \
105  "(splice-call):" \
106  OPT_REMOVE_CALLS_NO_BODY \
107  OPT_REPLACE_FUNCTION_BODY \
108  OPT_GOTO_PROGRAM_STATS \
109  "(show-local-safe-pointers)(show-safe-dereferences)" \
110  "(show-sese-regions)" \
111  OPT_REPLACE_CALLS \
112  "(validate-goto-binary)" \
113  OPT_VALIDATE \
114  OPT_ANSI_C_LANGUAGE \
115  "(ensure-one-backedge-per-target)" \
116  // empty last line
117 
118 // clang-format on
119 
121 {
122 public:
123  virtual int doit();
124  virtual void help();
125 
126  goto_instrument_parse_optionst(int argc, const char **argv)
129  argc,
130  argv,
131  "goto-instrument"),
133  partial_inlining_done(false),
134  remove_returns_done(false)
135  {
136  }
137 
138 protected:
139  void register_languages();
140 
141  void get_goto_program();
143 
144  void do_indirect_call_and_rtti_removal(bool force=false);
146  void do_partial_inlining();
147  void do_remove_returns();
148 
152 
154 };
155 
156 #endif // CPROVER_GOTO_INSTRUMENT_GOTO_INSTRUMENT_PARSE_OPTIONS_H
goto_instrument_parse_optionst
Definition: goto_instrument_parse_options.h:121
parse_options_baset
Definition: parse_options.h:20
goto_instrument_parse_optionst::do_remove_returns
void do_remove_returns()
Definition: goto_instrument_parse_options.cpp:966
goto_instrument_parse_optionst::help
virtual void help()
display command line help
Definition: goto_instrument_parse_options.cpp:1686
goto_instrument_parse_optionst::do_partial_inlining
void do_partial_inlining()
Definition: goto_instrument_parse_options.cpp:952
goto_instrument_parse_optionst::goto_instrument_parse_optionst
goto_instrument_parse_optionst(int argc, const char **argv)
Definition: goto_instrument_parse_options.h:126
goto_instrument_parse_optionst::function_pointer_removal_done
bool function_pointer_removal_done
Definition: goto_instrument_parse_options.h:149
validation_interface.h
count_eloc.h
remove_calls_no_body.h
goto_instrument_parse_optionst::do_remove_const_function_pointers_only
void do_remove_const_function_pointers_only()
Remove function pointers that can be resolved by analysing const variables (i.e.
Definition: goto_instrument_parse_options.cpp:935
goto_modelt
Definition: goto_model.h:26
show_goto_functions.h
insert_final_assert_false.h
replace_calls.h
generate_function_bodies.h
goto_instrument_parse_optionst::doit
virtual int doit()
invoke main modules
Definition: goto_instrument_parse_options.cpp:116
GOTO_INSTRUMENT_OPTIONS
#define GOTO_INSTRUMENT_OPTIONS
Definition: goto_instrument_parse_options.h:39
goto_instrument_parse_optionst::do_indirect_call_and_rtti_removal
void do_indirect_call_and_rtti_removal(bool force=false)
Definition: goto_instrument_parse_options.cpp:915
goto_instrument_parse_optionst::get_goto_program
void get_goto_program()
Definition: goto_instrument_parse_options.cpp:977
show_properties.h
goto_instrument_parse_optionst::instrument_goto_program
void instrument_goto_program()
Definition: goto_instrument_parse_options.cpp:994
parse_options.h
goto_check.h
goto_instrument_parse_optionst::register_languages
void register_languages()
Definition: goto_instrument_languages.cpp:19
goto_instrument_parse_optionst::partial_inlining_done
bool partial_inlining_done
Definition: goto_instrument_parse_options.h:150
aggressive_slicer.h
goto_instrument_parse_optionst::remove_returns_done
bool remove_returns_done
Definition: goto_instrument_parse_options.h:151
class_hierarchy.h
remove_const_function_pointers.h
ansi_c_language.h
goto_functions.h
timestamper.h
Emit timestamps.
goto_instrument_parse_optionst::goto_model
goto_modelt goto_model
Definition: goto_instrument_parse_options.h:153
ui_message.h