32 for(
const auto &r_entry : code_rw_set.
r_entries)
46 for(
const auto &w_entry : code_rw_set.
w_entries)
93 if(!race_on_read && !race_on_write)
100 if(race_on_read || race_on_write)
103 original_instruction.
swap(instruction);
122 t_orig->swap(original_instruction);
156 std::list<symbol_exprt> matches;
158 for(
const auto &symbol_name_entry :
162 symbol_tablet::symbolst::const_iterator s_it =
163 symbol_table.
symbols.find(symbol_name_entry.second);
165 if(s_it==symbol_table.
symbols.end())
168 if(s_it->second.type.id() == ID_code && !s_it->second.is_property)
169 matches.push_back(s_it->second.symbol_expr());
173 throw "interrupt handler '" +
id2string(interrupt_handler) +
"' not found";
175 if(matches.size()>=2)
176 throw "interrupt handler '" +
id2string(interrupt_handler) +
182 throw "interrupt handler '" +
id2string(interrupt_handler) +
183 "' must not have parameters";
217 gf_entry.second.body,
goto_instruction_codet representation of a function call statement.
const parameterst & parameters() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
source_locationt & add_source_location()
typet & type()
Return the type of the expression.
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.
const source_locationt & source_location() const
void swap(instructiont &instruction)
Swap two instructions.
A generic container class for the GOTO intermediate representation of one function.
instructionst::iterator targett
static instructiont make_function_call(const code_function_callt &_code, const source_locationt &l=source_locationt::nil())
Create a function call instruction.
static instructiont make_goto(targett _target, const source_locationt &l=source_locationt::nil())
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool has_w_entry(irep_idt object) const
bool has_r_entry(irep_idt object) const
A side_effect_exprt that returns a non-deterministically chosen value.
Expression to hold a symbol (variable)
const irep_idt & get_identifier() const
const symbol_base_mapt & symbol_base_map
Read-only field, used to look up symbol names given their base names.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
#define Forall_goto_program_instructions(it, program)
static bool potential_race_on_read(const rw_set_baset &code_rw_set, const rw_set_baset &isr_rw_set)
static bool potential_race_on_write(const rw_set_baset &code_rw_set, const rw_set_baset &isr_rw_set)
static void interrupt(value_setst &value_sets, const symbol_tablet &symbol_table, const irep_idt &function_id, goto_programt &goto_program, const symbol_exprt &interrupt_handler, const rw_set_baset &isr_rw_set, message_handlert &message_handler)
static symbol_exprt get_isr(const symbol_tablet &symbol_table, const irep_idt &interrupt_handler)
Interrupt Instrumentation for Goto Programs.
const std::string & id2string(const irep_idt &d)
Field-insensitive, location-sensitive may-alias analysis.
Ranges: pair of begin and end iterators, which can be initialized from containers,...
ranget< typename multimapt::const_iterator > equal_range(const multimapt &multimap, const typename multimapt::key_type &key)
Utility function to make equal_range method of multimap easier to use by returning a ranget object.
Race Detection for Threaded Goto Programs.
#define INITIALIZE_FUNCTION
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.