void ModelExecution::removeAction(ModelAction *act) {
{
sllnode<ModelAction *> * listref = act->getTraceRef();
void ModelExecution::removeAction(ModelAction *act) {
{
sllnode<ModelAction *> * listref = act->getTraceRef();
ClockVector * ModelExecution::computeMinimalCV() {
ClockVector *cvmin = NULL;
//Thread 0 isn't a real thread, so skip it..
ClockVector * ModelExecution::computeMinimalCV() {
ClockVector *cvmin = NULL;
//Thread 0 isn't a real thread, so skip it..
ModelAction *newact = new ModelAction(ATOMIC_NOP, std::memory_order_seq_cst, get_thread(act->get_tid()));
newact->set_seq_number(get_next_seq_num());
newact->create_cv(act);
ModelAction *newact = new ModelAction(ATOMIC_NOP, std::memory_order_seq_cst, get_thread(act->get_tid()));
newact->set_seq_number(get_next_seq_num());
newact->create_cv(act);
void ModelExecution::collectActions() {
//Compute minimal clock vector for all live threads
ClockVector *cvmin = computeMinimalCV();
void ModelExecution::collectActions() {
//Compute minimal clock vector for all live threads
ClockVector *cvmin = computeMinimalCV();
for (sllnode<ModelAction*> * it2 = action_trace.end();it2 != it;) {
ModelAction *act = it2->getVal();
//Do iteration early in case we delete the act
for (sllnode<ModelAction*> * it2 = action_trace.end();it2 != it;) {
ModelAction *act = it2->getVal();
//Do iteration early in case we delete the act
const ModelAction *rel_fence =act->get_last_fence_release();
if (rel_fence != NULL) {
modelclock_t relfenceseq = rel_fence->get_seq_number();
const ModelAction *rel_fence =act->get_last_fence_release();
if (rel_fence != NULL) {
modelclock_t relfenceseq = rel_fence->get_seq_number();
const ModelAction *rel_fence =act->get_last_fence_release();
if (rel_fence != NULL) {
modelclock_t relfenceseq = rel_fence->get_seq_number();
const ModelAction *rel_fence =act->get_last_fence_release();
if (rel_fence != NULL) {
modelclock_t relfenceseq = rel_fence->get_seq_number();