Go to the documentation of this file.
10 #ifndef CPROVER_GOTO_INSTRUMENT_WMM_SHARED_BUFFERS_H
11 #define CPROVER_GOTO_INSTRUMENT_WMM_SHARED_BUFFERS_H
44 throw "sorry, CAV11 only available for TSO";
110 const unsigned current_thread);
117 const unsigned current_thread);
125 const unsigned current_thread,
126 const bool tso_pso_rmo);
143 assignment(goto_program, t, source_location, id_lhs,
144 ns.
lookup(id_rhs).symbol_expr());
164 return add(*maybe_symbol,
"_weak_choice" + suffix,
bool_typet());
245 const std::string &suffix,
247 bool added_as_instrumentation);
252 return add(
object, suffix, type,
true);
258 const std::string &suffix,
261 return add(
object, suffix, type,
false);
267 #endif // CPROVER_GOTO_INSTRUMENT_WMM_SHARED_BUFFERS_H
Class that provides messages with a built-in verbosity 'level'.
void write(goto_programt &goto_program, goto_programt::targett &t, const source_locationt &source_location, const irep_idt &object, goto_programt::instructiont &original_instruction, const unsigned current_thread)
instruments write
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
symbol_tablet & symbol_table
void det_flush(goto_programt &goto_program, goto_programt::targett &t, const source_locationt &source_location, const irep_idt &object, const unsigned current_thread)
flush buffers (instruments fence)
void set_cav11(memory_modelt model)
bool is_buffered_in_general(const symbol_exprt &, bool is_write)
irep_idt add(const symbolt &object, const std::string &suffix, const typet &type)
#define CHECK_RETURN(CONDITION)
The type of an expression, extends irept.
std::vector< irep_idt > r_buff0_thds
std::multimap< irep_idt, source_locationt > cycles_r_loc
goto_functionst & goto_functions
class symbol_tablet & symbol_table
void weak_memory(value_setst &value_sets, symbol_tablet &symbol_table, goto_programt &goto_program, memory_modelt model, goto_functionst &goto_functions)
void assignment(goto_programt &goto_program, goto_programt::targett &t, const source_locationt &source_location, const irep_idt &id_lhs, const irep_idt &id_rhs)
Base class for all expressions.
irep_idt add_fresh_var(const symbolt &object, const std::string &suffix, const typet &type)
std::multimap< irep_idt, source_locationt > cycles_loc
void add_initialization_code(goto_functionst &goto_functions)
Expression to hold a symbol (variable)
void assignment(goto_programt &goto_program, goto_programt::targett &t, const source_locationt &source_location, const irep_idt &id_lhs, const exprt &rhs)
add an assignment in the goto-program
irep_idt choice(const irep_idt &function_id, const std::string &suffix)
irep_idt add(const symbolt &object, const std::string &suffix, const typet &type, bool added_as_instrumentation)
add a new var for instrumenting the input var
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool is_buffered(const namespacet &, const symbol_exprt &, bool is_write)
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
bool has_prefix(const std::string &s, const std::string &prefix)
shared_bufferst(symbol_tablet &_symbol_table, unsigned _nb_threads, messaget &_message)
const std::string & id2string(const irep_idt &d)
std::set< irep_idt > affected_by_delay_set
void weak_memory(value_setst &value_sets, const irep_idt &function_id, memory_modelt model)
instruments the program for the pairs detected through the CFG
std::string unique()
returns a unique id (for fresh variables)
std::set< irep_idt > cycles
cfg_visitort(shared_bufferst &_shared, symbol_tablet &_symbol_table, goto_functionst &_goto_functions)
std::set< irep_idt > past_writes
void delay_read(goto_programt &goto_program, goto_programt::targett &t, const source_locationt &source_location, const irep_idt &read_object, const irep_idt &write_object)
delays a read (POWER)
shared_bufferst & shared_buffers
void nondet_flush(const irep_idt &function_id, goto_programt &goto_program, goto_programt::targett &t, const source_locationt &source_location, const irep_idt &object, const unsigned current_thread, const bool tso_pso_rmo)
instruments read
std::map< irep_idt, varst > var_mapt
std::set< irep_idt > instrumentations
A collection of goto functions.
A generic container class for the GOTO intermediate representation of one function.
std::vector< irep_idt > r_buff1_thds
const symbolt * lookup(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
void flush_read(goto_programt &goto_program, goto_programt::targett &t, const source_locationt &source_location, const irep_idt &write_object)
flushes read (POWER)
bool track(const irep_idt &id) const
const varst & operator()(const irep_idt &object)
instruments the variable
irep_idt read_delayed_var
This class represents an instruction in the GOTO intermediate representation.
void affected_by_delay(value_setst &value_sets, goto_functionst &goto_functions)
analysis over the goto-program which computes in affected_by_delay_set the variables (non necessarily...
instructionst::iterator targett
void add_initialization(goto_programt &goto_program)