12#ifndef CPROVER_GOTO_SYMEX_PARTIAL_ORDER_CONCURRENCY_H
13#define CPROVER_GOTO_SYMEX_PARTIAL_ORDER_CONCURRENCY_H
88 return event->ssa_lhs.get_identifier();
118 const std::string &
msg,
139#include "abstract_event_structure.h"
150 typedef ordered_evtst::const_iterator const_iterator;
155 const ordered_evtst::size_type offset=
ordered_evts.size();
166 void add_events(const_iterator first, const_iterator last)
169 for( ; first!=last; ++first)
173 const_iterator begin()
const
178 const_iterator end()
const
183 const_iterator find(
const evtt &
evt)
const
194 const_iterator entry=find(
evt);
196 return std::list<const_iterator>();
198 std::list<const_iterator>
ret;
199 ordered_evtst::size_type offset=entry-begin();
200 for(std::set<ordered_evtst::size_type>::const_iterator
211 const_iterator entry=find(
evt);
213 return std::list<const_iterator>();
215 std::list<const_iterator>
ret;
216 ordered_evtst::size_type offset=entry-begin();
217 for(std::set<ordered_evtst::size_type>::const_iterator
229 std::set<ordered_evtst::size_type>
barriers;
246 typedef std::map<evtt const*, std::map<evtt const*, exprt> >
adj_matrixt;
280# define S_PROP(t) ((t+1)<<1)
284 const unsigned step)
const;
350 const std::string &prefix)
const;
351 std::vector<std::pair<symbol_exprt, symbol_exprt>>
358 typedef std::pair<evtt const*, std::pair<unsigned, evtt::event_dirt>>
360 typedef std::map<std::pair<evt_dir_pairt, evt_dir_pairt>,
363 typedef std::map<
evtt const*,
364 std::list<std::pair<evtt const*, std::pair<exprt, std::string> > > >
static exprt guard(const exprt::operandst &guards, exprt cond)
Single SSA step in the equation.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
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...
Base class for implementing memory models via additional constraints for SSA equations.
std::vector< event_it > event_listt
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...
std::map< event_it, unsigned > numberingt
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.
virtual exprt before(event_it e1, event_it e2)=0
void build_clock_type()
Initialize the clock_type so that it can be used to number events.
std::map< irep_idt, a_rect > address_mapt
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.
symex_target_equationt::SSA_stepst eventst
static irep_idt id(event_it event)
Produce the symbol ID for an event.
eventst::const_iterator event_it
Expression to hold a symbol (variable)
const irep_idt & get_identifier() const
Inheriting the interface of symex_targett this class represents the SSA form of the input program as ...
std::list< SSA_stept > SSA_stepst
The type of an expression, extends irept.
#define UNREACHABLE
This should be used to mark dead code.
ssa_exprt remove_level_2(ssa_exprt ssa)
Identifies source in the context of symbolic execution.
Generate Equation using Symbolic Execution.