Go to the documentation of this file.
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";
199 value_sets, goto_model, isr);
217 gf_entry.second.body,
#define Forall_goto_program_instructions(it, program)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
static symbol_exprt get_isr(const symbol_tablet &symbol_table, const irep_idt &interrupt_handler)
const symbol_base_mapt & symbol_base_map
Read-only field, used to look up symbol names given their base names.
void swap(instructiont &instruction)
Swap two instructions.
function_mapt function_map
Expression to hold a symbol (variable)
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...
static instructiont make_function_call(const code_function_callt &_code, const source_locationt &l=source_locationt::nil())
Create a function call instruction.
typet & type()
Return the type of the expression.
goto_instruction_codet representation of a function call statement.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const std::string & id2string(const irep_idt &d)
const source_locationt & source_location() const
const irep_idt & get_identifier() const
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)
#define INITIALIZE_FUNCTION
const parameterst & parameters() const
static bool potential_race_on_read(const rw_set_baset &code_rw_set, const rw_set_baset &isr_rw_set)
A side_effect_exprt that returns a non-deterministically chosen value.
::goto_functiont goto_functiont
bool has_w_entry(irep_idt object) const
goto_functionst goto_functions
GOTO functions.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
A generic container class for the GOTO intermediate representation of one function.
bool has_r_entry(irep_idt object) const
static irep_idt entry_point()
Get the identifier of the entry point to a goto model.
source_locationt & add_source_location()
This class represents an instruction in the GOTO intermediate representation.
static bool potential_race_on_write(const rw_set_baset &code_rw_set, const rw_set_baset &isr_rw_set)
symbol_tablet symbol_table
Symbol table.
instructionst::iterator targett
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.