CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
goto_analyzer_parse_options.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Goto-Analyser Command Line Option Processing
4
5Author: Daniel Kroening, kroening@kroening.com
6
7\*******************************************************************/
8
88
89#ifndef CPROVER_GOTO_ANALYZER_GOTO_ANALYZER_PARSE_OPTIONS_H
90#define CPROVER_GOTO_ANALYZER_GOTO_ANALYZER_PARSE_OPTIONS_H
91
92#include <util/config.h>
93#include <util/parse_options.h>
94#include <util/timestamper.h>
95#include <util/ui_message.h>
97
101
104#include <langapi/language.h>
105
106class optionst;
107
108// clang-format off
109#define GOTO_ANALYSER_OPTIONS_TASKS \
110 "(show)(verify)(simplify):" \
111 "(show-on-source)" \
112 "(unreachable-instructions)(unreachable-functions)" \
113 "(reachable-functions)" \
114 "(no-standard-checks)"
115
116#define GOTO_ANALYSER_OPTIONS_AI \
117 "(recursive-interprocedural)" \
118 "(three-way-merge)" \
119 "(legacy-ait)" \
120 "(legacy-concurrent)"
121
122#define GOTO_ANALYSER_OPTIONS_HISTORY \
123 "(ahistorical)" \
124 "(call-stack):" \
125 "(loop-unwind):" \
126 "(branching):" \
127 "(loop-unwind-and-branching):"
128
129#define GOTO_ANALYSER_OPTIONS_DOMAIN \
130 "(intervals)" \
131 "(non-null)" \
132 "(constants)" \
133 "(dependence-graph)" \
134 "(vsd)(variable-sensitivity)" \
135 "(dependence-graph-vs)" \
136
137#define GOTO_ANALYSER_OPTIONS_STORAGE \
138 "(one-domain-per-history)" \
139 "(one-domain-per-location)"
140
141#define GOTO_ANALYSER_OPTIONS_OUTPUT \
142 "(json):(xml):" \
143 "(text):(dot):"
144
145#define GOTO_ANALYSER_OPTIONS_SPECIFIC_ANALYSES \
146 "(taint):(show-taint)" \
147 "(show-local-may-alias)" \
148 "(show-local-bitvector)"
149
150#define GOTO_ANALYSER_OPTIONS \
151 OPT_FUNCTIONS \
152 OPT_CONFIG_C_CPP \
153 OPT_CONFIG_PLATFORM \
154 OPT_SHOW_GOTO_FUNCTIONS \
155 OPT_SHOW_PROPERTIES \
156 OPT_GOTO_CHECK \
157 OPT_CONFIG_LIBRARY \
158 "(show-symbol-table)(show-parse-tree)" \
159 "(property):" \
160 "(verbosity):(version)" \
161 OPT_FLUSH \
162 OPT_TIMESTAMP \
163 OPT_VALIDATE \
164 GOTO_ANALYSER_OPTIONS_TASKS \
165 "(no-simplify-slicing)" \
166 "(show-intervals)(show-non-null)" \
167 GOTO_ANALYSER_OPTIONS_AI \
168 "(location-sensitive)(concurrent)" \
169 GOTO_ANALYSER_OPTIONS_HISTORY \
170 GOTO_ANALYSER_OPTIONS_DOMAIN \
171 OPT_VSD \
172 GOTO_ANALYSER_OPTIONS_STORAGE \
173 GOTO_ANALYSER_OPTIONS_OUTPUT \
174 GOTO_ANALYSER_OPTIONS_SPECIFIC_ANALYSES \
175// clang-format on
176
178{
179public:
180 virtual int doit() override;
181 virtual void help() override;
182
183 goto_analyzer_parse_optionst(int argc, const char **argv);
184
185protected:
187
188 void register_languages() override;
189
190 virtual void get_command_line_options(optionst &options);
191
192 virtual bool process_goto_program(const optionst &options);
193
194 virtual int perform_analysis(const optionst &options);
195
196 // TODO: Add documentation
197 static void set_default_analysis_flags(optionst &options, const bool enabled);
198};
199
200#endif // CPROVER_GOTO_ANALYZER_GOTO_ANALYZER_PARSE_OPTIONS_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
virtual int doit() override
invoke main modules
virtual void get_command_line_options(optionst &options)
virtual bool process_goto_program(const optionst &options)
virtual int perform_analysis(const optionst &options)
Depending on the command line mode, run one of the analysis tasks.
virtual void help() override
display command line help
static void set_default_analysis_flags(optionst &options, const bool enabled)
Program Transformation.
Symbol Table + CFG.
Abstract interface to support a programming language.
Show the goto functions.
Show the properties.
Emit timestamps.
There are different ways of handling arrays, structures, unions and pointers.