cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
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 <
util/config.h
>
16
#include <
util/parse_options.h
>
17
#include <
util/timestamper.h
>
18
#include <
util/ui_message.h
>
19
#include <
util/validation_interface.h
>
20
21
#include <
goto-programs/class_hierarchy.h
>
22
#include <
goto-programs/remove_calls_no_body.h
>
23
#include <
goto-programs/remove_const_function_pointers.h
>
24
#include <
goto-programs/restrict_function_pointers.h
>
25
#include <
goto-programs/show_goto_functions.h
>
26
#include <
goto-programs/show_properties.h
>
27
#include <
goto-programs/unwindset.h
>
28
29
#include <
ansi-c/ansi_c_language.h
>
30
#include <
ansi-c/goto-conversion/goto_check_c.h
>
31
#include <
pointer-analysis/goto_program_dereference.h
>
32
33
#include "
aggressive_slicer.h
"
34
#include "
count_eloc.h
"
35
#include "
document_properties.h
"
36
#include "
dump_c.h
"
37
#include "
generate_function_bodies.h
"
38
#include "
insert_final_assert_false.h
"
39
#include "
model_argc_argv.h
"
40
#include "
nondet_volatile.h
"
41
#include "
reachability_slicer.h
"
42
#include "
replace_calls.h
"
43
#include "
uninitialized.h
"
44
45
#include "
contracts/contracts.h
"
46
#include "
contracts/contracts_wrangler.h
"
47
#include "
contracts/dynamic-frames/dfcc.h
"
48
#include "
wmm/weak_memory.h
"
49
50
// clang-format off
51
#define GOTO_INSTRUMENT_OPTIONS \
52
OPT_DOCUMENT_PROPERTIES \
53
OPT_DUMP_C \
54
"(dot)(xml)" \
55
OPT_GOTO_CHECK \
56
OPT_REMOVE_POINTERS \
57
"(no-simplify)" \
58
OPT_UNINITIALIZED_CHECK \
59
OPT_WMM \
60
"(race-check)" \
61
OPT_UNWINDSET \
62
"(unwindset-file):" \
63
"(unwinding-assertions)(partial-loops)(continue-as-loops)" \
64
"(no-unwinding-assertions)" \
65
"(log):" \
66
"(call-graph)(reachable-call-graph)" \
67
OPT_INSERT_FINAL_ASSERT_FALSE \
68
OPT_SHOW_CLASS_HIERARCHY \
69
"(isr):" \
70
"(stack-depth):(nondet-static)" \
71
"(nondet-static-exclude):" \
72
"(nondet-static-matching):" \
73
"(function-enter):(function-exit):(branch):" \
74
OPT_SHOW_GOTO_FUNCTIONS \
75
OPT_SHOW_PROPERTIES \
76
"(drop-unused-functions)" \
77
"(show-value-sets)" \
78
"(show-global-may-alias)" \
79
"(show-local-bitvector-analysis)(show-custom-bitvector-analysis)" \
80
"(show-escape-analysis)(escape-analysis)" \
81
"(custom-bitvector-analysis)" \
82
"(show-struct-alignment)(interval-analysis)(show-intervals)" \
83
"(show-uninitialized)(show-locations)" \
84
"(full-slice)(slice-global-inits)" \
85
OPT_REACHABILITY_SLICER \
86
OPT_FP_REACHABILITY_SLICER \
87
"(inline)(partial-inline)(function-inline):(log):(no-caching)" \
88
"(value-set-fi-fp-removal)" \
89
OPT_REMOVE_CONST_FUNCTION_POINTERS \
90
"(print-internal-representation)" \
91
"(remove-function-pointers)" \
92
"(show-claims)(property):" \
93
"(show-symbol-table)(show-points-to)(show-rw-set)" \
94
OPT_TIMESTAMP \
95
"(show-natural-loops)(show-lexical-loops)(accelerate)(havoc-loops)" \
96
"(verbosity):(version)(xml-ui)(json-ui)" \
97
"(accelerate)(constant-propagator)" \
98
"(k-induction):(step-case)(base-case)" \
99
"(show-call-sequences)(check-call-sequence)" \
100
"(interpreter)(show-reaching-definitions)" \
101
"(list-symbols)(list-undefined-functions)" \
102
"(z3)(add-library)(show-dependence-graph)" \
103
"(horn)(skip-loops):" \
104
OPT_ARGC_ARGV \
105
OPT_DFCC \
106
"(" FLAG_LOOP_CONTRACTS ")" \
107
"(" FLAG_DISABLE_SIDE_EFFECT_CHECK ")" \
108
"(" FLAG_LOOP_CONTRACTS_NO_UNWIND ")" \
109
"(" FLAG_LOOP_CONTRACTS_FILE "):" \
110
"(" FLAG_REPLACE_CALL "):" \
111
"(" FLAG_ENFORCE_CONTRACT "):" \
112
OPT_ENFORCE_CONTRACT_REC \
113
"(show-threaded)(list-calls-args)" \
114
"(undefined-function-is-assume-false)" \
115
"(remove-function-body):" \
116
"(remove-function-body-regex):" \
117
OPT_AGGRESSIVE_SLICER \
118
OPT_FLUSH \
119
"(splice-call):" \
120
OPT_REMOVE_CALLS_NO_BODY \
121
OPT_REPLACE_FUNCTION_BODY \
122
OPT_GOTO_PROGRAM_STATS \
123
"(show-local-safe-pointers)(show-safe-dereferences)" \
124
"(show-sese-regions)" \
125
OPT_REPLACE_CALLS \
126
"(validate-goto-binary)" \
127
OPT_VALIDATE \
128
OPT_ANSI_C_LANGUAGE \
129
OPT_RESTRICT_FUNCTION_POINTER \
130
OPT_NONDET_VOLATILE \
131
"(ensure-one-backedge-per-target)" \
132
OPT_CONFIG_LIBRARY \
133
// empty last line
134
135
// clang-format on
136
137
class
goto_instrument_parse_optionst
:
public
parse_options_baset
138
{
139
public
:
140
int
doit
()
override
;
141
void
help
()
override
;
142
143
goto_instrument_parse_optionst
(
int
argc,
const
char
**argv)
144
:
parse_options_baset
(
145
GOTO_INSTRUMENT_OPTIONS
,
146
argc,
147
argv,
148
"goto-instrument"
),
149
function_pointer_removal_done
(false),
150
partial_inlining_done
(false),
151
remove_returns_done
(false)
152
{
153
}
154
155
protected
:
156
void
register_languages
()
override
;
157
158
void
get_goto_program
();
159
void
instrument_goto_program
();
160
161
void
do_indirect_call_and_rtti_removal
(
bool
force=
false
);
162
void
do_remove_const_function_pointers_only
();
163
void
do_partial_inlining
();
164
void
do_remove_returns
();
165
166
bool
function_pointer_removal_done
;
167
bool
partial_inlining_done
;
168
bool
remove_returns_done
;
169
170
goto_modelt
goto_model
;
171
};
172
173
#endif
// CPROVER_GOTO_INSTRUMENT_GOTO_INSTRUMENT_PARSE_OPTIONS_H
aggressive_slicer.h
Aggressive slicer Consider the control flow graph of the goto program and a criterion description of ...
ansi_c_language.h
class_hierarchy.h
Class Hierarchy.
goto_instrument_parse_optionst::register_languages
void register_languages() override
Definition
goto_instrument_languages.cpp:19
goto_instrument_parse_optionst::goto_model
goto_modelt goto_model
Definition
goto_instrument_parse_options.h:170
goto_instrument_parse_optionst::help
void help() override
display command line help
Definition
goto_instrument_parse_options.cpp:1891
goto_instrument_parse_optionst::instrument_goto_program
void instrument_goto_program()
Definition
goto_instrument_parse_options.cpp:1023
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:946
goto_instrument_parse_optionst::partial_inlining_done
bool partial_inlining_done
Definition
goto_instrument_parse_options.h:167
goto_instrument_parse_optionst::function_pointer_removal_done
bool function_pointer_removal_done
Definition
goto_instrument_parse_options.h:166
goto_instrument_parse_optionst::remove_returns_done
bool remove_returns_done
Definition
goto_instrument_parse_options.h:168
goto_instrument_parse_optionst::get_goto_program
void get_goto_program()
Definition
goto_instrument_parse_options.cpp:1006
goto_instrument_parse_optionst::do_partial_inlining
void do_partial_inlining()
Definition
goto_instrument_parse_options.cpp:981
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:965
goto_instrument_parse_optionst::do_remove_returns
void do_remove_returns()
Definition
goto_instrument_parse_options.cpp:995
goto_instrument_parse_optionst::goto_instrument_parse_optionst
goto_instrument_parse_optionst(int argc, const char **argv)
Definition
goto_instrument_parse_options.h:143
goto_instrument_parse_optionst::doit
int doit() override
invoke main modules
Definition
goto_instrument_parse_options.cpp:113
goto_modelt
Definition
goto_model.h:27
parse_options_baset::parse_options_baset
parse_options_baset(const std::string &optstring, int argc, const char **argv, const std::string &program)
Definition
parse_options.cpp:28
config.h
contracts.h
Verify and use annotated invariants and pre/post-conditions.
contracts_wrangler.h
Parse and annotate contracts.
count_eloc.h
Count effective lines of code.
dfcc.h
Main class orchestrating the the whole program transformation for function contracts with Dynamic Fra...
document_properties.h
Documentation of Properties.
dump_c.h
Dump C from Goto Program.
generate_function_bodies.h
goto_check_c.h
Program Transformation.
GOTO_INSTRUMENT_OPTIONS
#define GOTO_INSTRUMENT_OPTIONS
Definition
goto_instrument_parse_options.h:51
goto_program_dereference.h
Value Set.
insert_final_assert_false.h
Insert final assert false into a function.
model_argc_argv.h
Initialize command line arguments.
nondet_volatile.h
Volatile Variables.
parse_options.h
reachability_slicer.h
Slicing.
remove_calls_no_body.h
Remove calls to functions without a body.
remove_const_function_pointers.h
Goto Programs.
replace_calls.h
Replace calls to given functions with calls to other given functions.
restrict_function_pointers.h
Given goto functions and a list of function parameters or globals that are function pointers with lis...
show_goto_functions.h
Show the goto functions.
show_properties.h
Show the properties.
timestamper.h
Emit timestamps.
ui_message.h
uninitialized.h
Detection for Uninitialized Local Variables.
unwindset.h
Loop unwinding.
validation_interface.h
weak_memory.h
Weak Memory Instrumentation for Threaded Goto Programs.
goto-instrument
goto_instrument_parse_options.h
Generated by
1.17.0