28#define L_M_LAST_ARG(x) , x
31#define L_M_LAST_ARG(x)
70 const symbol_tablet::symbolst::const_iterator it=
79 new_symbol.
name=identifier;
95 for(std::list<irep_idt>::const_iterator
117 result+=
" data race on ";
128 identifier ==
CPROVER_PREFIX "alloc_size" || identifier ==
"stdin" ||
129 identifier ==
"stdout" || identifier ==
"stderr" ||
130 identifier ==
"sys_nerr" ||
141 for(rw_set_baset::entriest::const_iterator
142 it=
rw_set.r_entries.begin();
143 it!=
rw_set.r_entries.end();
145 if(
is_shared(ns, it->second.symbol_expr))
148 for(rw_set_baset::entriest::const_iterator
149 it=
rw_set.w_entries.begin();
150 it!=
rw_set.w_entries.end();
152 if(
is_shared(ns, it->second.symbol_expr))
243 t->source_location_nonconst().set_comment(
258 t->source_location_nonconst().set_comment(
285 L_M_ARG(goto_function) goto_program,
289 goto_program.update();
314 goto_functionst::function_mapt::iterator
319 throw "race check instrumentation needs an entry point";
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
The Boolean constant false.
function_mapt function_map
::goto_functiont goto_functiont
static irep_idt entry_point()
Get the identifier of the entry point to a goto model.
symbol_tablet symbol_table
Symbol table.
goto_functionst goto_functions
GOTO functions.
This class represents an instruction in the GOTO intermediate representation.
A generic container class for the GOTO intermediate representation of one function.
instructionst instructions
The list of instructions in the goto program.
instructionst::iterator targett
static instructiont make_assignment(const code_assignt &_code, const source_locationt &l=source_locationt::nil())
Create an assignment instruction.
static instructiont make_skip(const source_locationt &l=source_locationt::nil())
static instructiont make_assertion(const exprt &g, const source_locationt &l=source_locationt::nil())
targett insert_before(const_targett target)
Insertion before the instruction pointed-to by the given instruction iterator target.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
Expression to hold a symbol (variable)
const irep_idt & get_identifier() const
const symbolst & symbols
Read-only field, used to look up symbols given their names.
virtual bool move(symbolt &symbol, symbolt *&new_symbol) override
Move a symbol into the symbol table.
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
typet type
Type of symbol.
irep_idt name
The unique identifier.
irep_idt irep_idt base_name
Name of module the symbol belongs to.
exprt value
Initial value of symbol.
std::list< irep_idt > w_guards
const symbolt & get_guard_symbol(const irep_idt &object)
const exprt get_assertion(const rw_set_baset::entryt &entry)
w_guardst(symbol_tablet &_symbol_table)
void add_initialization(goto_programt &goto_program) const
const exprt get_w_guard_expr(const rw_set_baset::entryt &entry)
const exprt get_guard_symbol_expr(const irep_idt &object)
symbol_tablet & symbol_table
bool has_prefix(const std::string &s, const std::string &prefix)
#define Forall_goto_program_instructions(it, program)
const std::string & id2string(const irep_idt &d)
Field-insensitive, location-sensitive may-alias analysis.
Various predicates over pointers in programs.
#define SYMEX_DYNAMIC_PREFIX
static std::string comment(const rw_set_baset::entryt &entry, bool write)
static void race_check(value_setst &value_sets, symbol_tablet &symbol_table, const irep_idt &function_id, goto_programt &goto_program, w_guardst &w_guards)
static bool has_shared_entries(const namespacet &ns, const rw_set_baset &rw_set)
static bool is_shared(const namespacet &ns, const symbol_exprt &symbol_expr)
Race Detection for Threaded Goto Programs.
void remove_skip(goto_programt &goto_program, goto_programt::targett begin, goto_programt::targett end)
remove unnecessary skip statements
Race Detection for Threaded Goto Programs.
#define INITIALIZE_FUNCTION