CBMC
nondet_volatile.h File Reference
#include <functional>
+ Include dependency graph for nondet_volatile.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NONDET_VOLATILE_OPT   "nondet-volatile"
 
#define NONDET_VOLATILE_VARIABLE_OPT   "nondet-volatile-variable"
 
#define NONDET_VOLATILE_MODEL_OPT   "nondet-volatile-model"
 
#define OPT_NONDET_VOLATILE
 
#define HELP_NONDET_VOLATILE
 

Functions

void parse_nondet_volatile_options (const cmdlinet &cmdline, optionst &options)
 
void nondet_volatile (goto_modelt &goto_model, const optionst &options)
 Havoc reads from volatile expressions, if enabled in the options. More...
 
void nondet_volatile (goto_modelt &goto_model, std::function< bool(const exprt &)> should_havoc=[](const exprt &) { return true;})
 Havoc reads from volatile expressions. More...
 

Detailed Description

Volatile Variables

Definition in file nondet_volatile.h.

Macro Definition Documentation

◆ HELP_NONDET_VOLATILE

#define HELP_NONDET_VOLATILE
Value:
"makes reads from volatile variables non-deterministic") << \
help_entry( \
"--" NONDET_VOLATILE_VARIABLE_OPT " <variable>", \
"makes reads from given volatile variable non-deterministic") << \
help_entry( \
"--" NONDET_VOLATILE_MODEL_OPT " <variable>:<model>", \
"models reads from given volatile variable by a call to the given model")

Definition at line 32 of file nondet_volatile.h.

◆ NONDET_VOLATILE_MODEL_OPT

#define NONDET_VOLATILE_MODEL_OPT   "nondet-volatile-model"

Definition at line 25 of file nondet_volatile.h.

◆ NONDET_VOLATILE_OPT

#define NONDET_VOLATILE_OPT   "nondet-volatile"

Definition at line 23 of file nondet_volatile.h.

◆ NONDET_VOLATILE_VARIABLE_OPT

#define NONDET_VOLATILE_VARIABLE_OPT   "nondet-volatile-variable"

Definition at line 24 of file nondet_volatile.h.

◆ OPT_NONDET_VOLATILE

#define OPT_NONDET_VOLATILE
Value:

Definition at line 27 of file nondet_volatile.h.

Function Documentation

◆ nondet_volatile() [1/2]

void nondet_volatile ( goto_modelt goto_model,
const optionst options 
)

Havoc reads from volatile expressions, if enabled in the options.

Parameters
goto_modelthe goto model in which to havoc volatile reads
optionscommand line options

Definition at line 455 of file nondet_volatile.cpp.

◆ nondet_volatile() [2/2]

void nondet_volatile ( goto_modelt goto_model,
std::function< bool(const exprt &)>  should_havoc = [](const exprt &) { return true;} 
)

Havoc reads from volatile expressions.

Parameters
goto_modelthe goto model in which to havoc volatile reads
should_havocpredicate indicating if the given volatile expression should be havocked

◆ parse_nondet_volatile_options()

void parse_nondet_volatile_options ( const cmdlinet cmdline,
optionst options 
)

Definition at line 409 of file nondet_volatile.cpp.

NONDET_VOLATILE_OPT
#define NONDET_VOLATILE_OPT
Definition: nondet_volatile.h:23
NONDET_VOLATILE_VARIABLE_OPT
#define NONDET_VOLATILE_VARIABLE_OPT
Definition: nondet_volatile.h:24
help_entry
std::string help_entry(const std::string &option, const std::string &description, const std::size_t left_margin, const std::size_t width)
Definition: parse_options.cpp:183
NONDET_VOLATILE_MODEL_OPT
#define NONDET_VOLATILE_MODEL_OPT
Definition: nondet_volatile.h:25