CBMC
nondet_volatile.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Volatile Variables
4
5
Author: Daniel Kroening, kroening@kroening.com
6
7
\*******************************************************************/
8
11
12
#ifndef CPROVER_GOTO_INSTRUMENT_NONDET_VOLATILE_H
13
#define CPROVER_GOTO_INSTRUMENT_NONDET_VOLATILE_H
14
15
#include <functional>
16
17
class
cmdlinet
;
18
class
exprt
;
19
class
goto_modelt
;
20
class
optionst
;
21
22
// clang-format off
23
#define NONDET_VOLATILE_OPT "nondet-volatile"
24
#define NONDET_VOLATILE_VARIABLE_OPT "nondet-volatile-variable"
25
#define NONDET_VOLATILE_MODEL_OPT "nondet-volatile-model"
26
27
#define OPT_NONDET_VOLATILE \
28
"(" NONDET_VOLATILE_OPT ")" \
29
"(" NONDET_VOLATILE_VARIABLE_OPT "):" \
30
"(" NONDET_VOLATILE_MODEL_OPT "):"
31
32
#define HELP_NONDET_VOLATILE \
33
help_entry( \
34
"--" NONDET_VOLATILE_OPT, \
35
"makes reads from volatile variables non-deterministic") << \
36
help_entry( \
37
"--" NONDET_VOLATILE_VARIABLE_OPT " <variable>", \
38
"makes reads from given volatile variable non-deterministic") << \
39
help_entry( \
40
"--" NONDET_VOLATILE_MODEL_OPT " <variable>:<model>", \
41
"models reads from given volatile variable by a call to the given model")
42
// clang-format on
43
44
void
parse_nondet_volatile_options
(
const
cmdlinet
&cmdline,
optionst
&options);
45
50
void
nondet_volatile
(
goto_modelt
&goto_model,
const
optionst
&options);
51
57
void
nondet_volatile
(
58
goto_modelt
&goto_model,
59
std::function<
bool
(
const
exprt
&)> should_havoc = [](
const
exprt
&) {
60
return
true
;
61
});
62
63
#endif // CPROVER_GOTO_INSTRUMENT_NONDET_VOLATILE_H
optionst
Definition:
options.h:22
parse_nondet_volatile_options
void parse_nondet_volatile_options(const cmdlinet &cmdline, optionst &options)
Definition:
nondet_volatile.cpp:409
exprt
Base class for all expressions.
Definition:
expr.h:55
goto_modelt
Definition:
goto_model.h:25
cmdlinet
Definition:
cmdline.h:20
nondet_volatile
void nondet_volatile(goto_modelt &goto_model, const optionst &options)
Havoc reads from volatile expressions, if enabled in the options.
Definition:
nondet_volatile.cpp:455
src
goto-instrument
nondet_volatile.h
Generated by
1.8.17