25 #define L_M_LAST_ARG(x) , x 28 #define L_M_LAST_ARG(x) 67 const symbol_tablet::symbolst::const_iterator it=
76 new_symbol.
name=identifier;
92 for(std::list<irep_idt>::const_iterator
115 result+=
" data race on ";
128 identifier==
"stdin" ||
129 identifier==
"stdout" ||
130 identifier==
"stderr" ||
131 identifier==
"sys_nerr" ||
144 for(rw_set_baset::entriest::const_iterator
148 if(
is_shared(ns, it->second.symbol_expr))
151 for(rw_set_baset::entriest::const_iterator
155 if(
is_shared(ns, it->second.symbol_expr))
186 original_instruction.
swap(instruction);
194 if(!
is_shared(ns, e_it->second.symbol_expr))
211 *t=original_instruction;
218 if(!
is_shared(ns, e_it->second.symbol_expr))
235 if(!
is_shared(ns, e_it->second.symbol_expr))
248 if(!
is_shared(ns, e_it->second.symbol_expr))
284 goto_program.update();
304 goto_functionst::function_mapt::iterator
309 throw "race check instrumentation needs an entry point";
irep_idt name
The unique identifier.
const std::string & id2string(const irep_idt &d)
targett insert_before(const_targett target)
Insertion before the instruction pointed-to by the given instruction iterator target.
std::string comment(const rw_set_baset::entryt &entry, bool write)
void set_comment(const irep_idt &comment)
const irep_idt & get_identifier() const
#define forall_rw_set_w_entries(it, rw_set)
exprt value
Initial value of symbol.
const exprt get_guard_symbol_expr(const irep_idt &object)
function_mapt function_map
Race Detection for Threaded Goto Programs.
symbol_tablet symbol_table
Symbol table.
This class represents an instruction in the GOTO intermediate representation.
#define forall_rw_set_r_entries(it, rw_set)
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
instructionst::iterator targett
virtual bool move(symbolt &symbol, symbolt *&new_symbol) override
Move a symbol into the symbol table.
#define INITIALIZE_FUNCTION
instructionst instructions
The list of instructions in the goto program.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
::goto_functiont goto_functiont
void add_initialization(goto_programt &goto_program) const
bool has_prefix(const std::string &s, const std::string &prefix)
bool is_shared(const namespacet &ns, const symbol_exprt &symbol_expr)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
The Boolean constant false.
A generic container class for the GOTO intermediate representation of one function.
typet type
Type of symbol.
w_guardst(symbol_tablet &_symbol_table)
static irep_idt entry_point()
Get the identifier of the entry point to a goto model.
source_locationt source_location
The location of the instruction in the source file.
Base class for all expressions.
const symbolt & get_guard_symbol(const irep_idt &object)
irep_idt base_name
Base (non-scoped) name.
void remove_skip(goto_programt &goto_program, goto_programt::targett begin, goto_programt::targett end)
remove unnecessary skip statements
#define Forall_goto_functions(it, functions)
const source_locationt & source_location() const
void swap(instructiont &instruction)
Swap two instructions.
const exprt get_w_guard_expr(const rw_set_baset::entryt &entry)
void race_check(value_setst &value_sets, symbol_tablet &symbol_table, goto_programt &goto_program, w_guardst &w_guards)
#define Forall_goto_program_instructions(it, program)
Expression to hold a symbol (variable)
std::list< irep_idt > w_guards
symbol_tablet & symbol_table
bool has_shared_entries(const namespacet &ns, const rw_set_baset &rw_set)
goto_functionst goto_functions
GOTO functions.
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
A codet representing an assignment in the program.
const exprt get_assertion(const rw_set_baset::entryt &entry)
Field-insensitive, location-sensitive may-alias analysis.
Race Detection for Threaded Goto Programs.