34 if(e1->source.thread_nr == e2->source.thread_nr)
51 for(
const auto &read_event :
address.second.reads)
54 rf_choice_symbols.reserve(
address.second.writes.
size());
57 for(
const auto &write_event :
address.second.writes)
60 if(!
po(read_event, write_event))
63 read_event, write_event, equation));
69 if(!rf_choice_symbols.empty())
93 bool is_rfi = w->source.thread_nr ==
r->source.thread_nr;
101 is_rfi ?
"rfi" :
"rf",
std::vector< exprt > operandst
virtual ~memory_model_baset()
symbol_exprt nondet_bool_symbol(const std::string &prefix)
bool po(event_it e1, event_it e2)
In-thread program order.
symbol_exprt register_read_from_choice_symbol(const event_it &r, const event_it &w, symex_target_equationt &equation)
Introduce a new choice symbol s for the pair (r, w) add constraint s => (w.guard /\ r....
memory_model_baset(const namespacet &_ns)
void read_from(symex_target_equationt &equation)
For each read r from every address we collect the choice symbols S via register_read_from_choice_symb...
choice_symbolst choice_symbols
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Base class for implementing memory models via additional constraints for SSA equations.
exprt before(event_it e1, event_it e2, unsigned axioms)
Build the partial order constraint for two events: if e1 and e2 are in the same atomic section then c...
irep_idt address(event_it event) const
Produce an address ID for an event.
void add_constraint(symex_target_equationt &equation, const exprt &cond, const std::string &msg, const symex_targett::sourcet &source) const
Simplify and add a constraint to equation.
eventst::const_iterator event_it
Expression to hold a symbol (variable)
Inheriting the interface of symex_targett this class represents the SSA form of the input program as ...
Memory models for partial order concurrency.
exprt disjunction(const exprt::operandst &op)
1) generates a disjunction for two or more operands 2) for one operand, returns the operand 3) return...
API to expression classes.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.