CBMC
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
memory_model_baset Class Referenceabstract

#include <memory_model.h>

+ Inheritance diagram for memory_model_baset:
+ Collaboration diagram for memory_model_baset:

Public Member Functions

 
 
 
- Public Member Functions inherited from partial_order_concurrencyt
 
 

Protected Types

typedef std::map< std::pair< event_it, event_it >, symbol_exprtchoice_symbolst
 
 
- Protected Types inherited from partial_order_concurrencyt
typedef std::vector< event_itevent_listt
 
 
 

Protected Member Functions

  In-thread program order.
 
symbol_exprt  nondet_bool_symbol (const std::string &prefix)
 
  For each read r from every address we collect the choice symbols S via register_read_from_choice_symbol (for potential read-write pairs) and add a constraint r.guard => \/S.
 
  Introduce a new choice symbol s for the pair (r, w) add constraint s => (w.guard /\ r.lhs=w.lhs) add constraint s => before(w,r) [if w is from another thread].
 
- Protected Member Functions inherited from partial_order_concurrencyt
  First call add_init_writes then for each shared read/write (or spawn) populate: 1) the address_map (with a list of reads/writes for the address of each event) 2) the numbering map (with per-thread unique number of every event)
 
  For each shared read event and for each shared write event that appears after spawn or has false guard prepend a shared write SSA step with non-deterministic value.
 
  Produce an address ID for an event.
 
  Produce a clock symbol for some event.
 
  Initialize the clock_type so that it can be used to number events.
 
  Simplify and add a constraint to equation.
 
  Build the partial order constraint for two events: if e1 and e2 are in the same atomic section then constrain with equality between their clocks otherwise constrain with e1 clock being less than e2 clock.
 
 

Protected Attributes

 
 
- Protected Attributes inherited from partial_order_concurrencyt
 
 
 
 

Additional Inherited Members

- Public Types inherited from partial_order_concurrencyt
 
 
 
typedef eventst::const_iterator  event_it
 
- Static Public Member Functions inherited from partial_order_concurrencyt
  Build identifier for the read/write clock variable.
 
- Static Protected Member Functions inherited from partial_order_concurrencyt
  Produce the symbol ID for an event.
 

Detailed Description

Definition at line 17 of file memory_model.h.

Member Typedef Documentation

◆  choice_symbolst

Definition at line 38 of file memory_model.h.

◆  per_thread_mapt

Definition at line 60 of file memory_model.h.

Constructor & Destructor Documentation

◆  memory_model_baset()

memory_model_baset::memory_model_baset ( const namespacet_ns )
explicit

Definition at line 16 of file memory_model.cpp.

◆  ~memory_model_baset()

memory_model_baset::~memory_model_baset ( )
virtual

Definition at line 21 of file memory_model.cpp.

Member Function Documentation

◆  nondet_bool_symbol()

symbol_exprt memory_model_baset::nondet_bool_symbol ( const std::string &  prefix )
protected

Definition at line 25 of file memory_model.cpp.

◆  operator()()

virtual void memory_model_baset::operator() ( symex_target_equationt &  ,
)
pure virtual

Implemented in memory_model_psot, memory_model_sct, and memory_model_tsot.

◆  po()

bool memory_model_baset::po ( event_it  e1,
event_it  e2 
)
protected

In-thread program order.

Parameters
e1 preceding event
e2 following event
Returns
true if e1 precedes e2 in program order

Definition at line 31 of file memory_model.cpp.

◆  read_from()

void memory_model_baset::read_from ( symex_target_equationtequation )
protected

For each read r from every address we collect the choice symbols S via register_read_from_choice_symbol (for potential read-write pairs) and add a constraint r.guard => \/S.

Parameters
equation symex equation where the new constraint should be added

Definition at line 43 of file memory_model.cpp.

◆  register_read_from_choice_symbol()

symbol_exprt memory_model_baset::register_read_from_choice_symbol ( const event_itr,
const event_itw,
symex_target_equationtequation 
)
protected

Introduce a new choice symbol s for the pair (r, w) add constraint s => (w.guard /\ r.lhs=w.lhs) add constraint s => before(w,r) [if w is from another thread].

Parameters
r read event
w write event
equation symex equation where the new constraints should be added
Returns
the new choice symbol

Definition at line 83 of file memory_model.cpp.

Member Data Documentation

◆  choice_symbols

choice_symbolst memory_model_baset::choice_symbols
protected

Definition at line 39 of file memory_model.h.

◆  var_cnt

unsigned memory_model_baset::var_cnt
protected

Definition at line 33 of file memory_model.h.


The documentation for this class was generated from the following files:

AltStyle によって変換されたページ (->オリジナル) /