35 for(eventst::const_iterator
45 else if(!
e_it->is_shared_read() &&
46 !
e_it->is_shared_write())
55 e_it->is_shared_read() ||
56 !
e_it->guard.is_true())
81 std::map<unsigned, unsigned> counter;
83 for(eventst::const_iterator
88 if(
e_it->is_shared_read() ||
89 e_it->is_shared_write() ||
92 unsigned thread_nr=
e_it->source.thread_nr;
98 if(
e_it->is_shared_read())
105 unsigned cnt=counter[thread_nr]++;
111 for(address_mapt::const_iterator
117 if(
a_rec.reads.empty())
120 log.statistics() <<
"Shared " <<
a_it->first <<
": " <<
a_rec.reads.size()
129 if(
event->is_shared_write())
131 else if(
event->is_shared_read())
144 if(
event->is_shared_write())
146 else if(
event->is_shared_read())
148 else if(
event->is_spawn())
151 "t"+std::to_string(
event->source.thread_nr+1)+
"$"+
189 if(
e1->atomic_section_id!=0 &&
190 e1->atomic_section_id==
e2->atomic_section_id)
205 const std::string &
msg,
Pre-defined bitvector types.
Single SSA step in the equation.
unsigned atomic_section_id
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
A base class for relations, i.e., binary predicates whose two operands have the same type.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
std::vector< exprt > operandst
Class that provides messages with a built-in verbosity 'level'.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
void add_init_writes(symex_target_equationt &)
For each shared read event and for each shared write event that appears after spawn or has false guar...
void build_event_lists(symex_target_equationt &equation, message_handlert &message_handler)
First call add_init_writes then for each shared read/write (or spawn) populate: 1) the address_map (w...
virtual ~partial_order_concurrencyt()
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.
symbol_exprt clock(event_it e, axiomt axiom)
Produce a clock symbol for some event.
void build_clock_type()
Initialize the clock_type so that it can be used to number events.
static irep_idt rw_clock_id(event_it e, axiomt axiom=AX_PROPAGATION)
Build identifier for the read/write clock variable.
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.
partial_order_concurrencyt(const namespacet &_ns)
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 ...
virtual void constraint(const exprt &cond, const std::string &msg, const sourcet &source)
Record a global constraint: there is no guard limiting its scope.
std::list< SSA_stept > SSA_stepst
The Boolean constant true.
Fixed-width bit-vector with unsigned binary interpretation.
const std::string & id2string(const irep_idt &d)
Add constraints to equation encoding partial orders on events.
bool simplify(exprt &expr, const namespacet &ns)
#define UNREACHABLE
This should be used to mark dead code.
#define PRECONDITION(CONDITION)
#define POSTCONDITION(CONDITION)
ssa_exprt remove_level_2(ssa_exprt ssa)
exprt conjunction(const exprt::operandst &op)
1) generates a conjunction for two or more operands 2) for one operand, returns the operand 3) return...
Identifies source in the context of symbolic execution.