execution: correct comment on check_current_action()
[model-checker.git] / action.cc
index 76f18dd07fdf06ae6ac509c5e62bf55585e57c02..0084fd3411cdb57e888b1dcef161eb16a6d1398d 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #define __STDC_FORMAT_MACROS
 #include <inttypes.h>
+#include <stdlib.h>
 
 #include "model.h"
 #include "action.h"
@@ -501,7 +502,6 @@ bool ModelAction::synchronize_with(const ModelAction *act)
 {
        if (*this < *act)
                return false;
-       model->check_promises(act->get_tid(), cv, act->cv);
        cv->merge(act->cv);
        return true;
 }
@@ -618,7 +618,7 @@ void ModelAction::print() const
                if (reads_from)
                        model_print("  Rf: %-3d", reads_from->get_seq_number());
                else if (reads_from_promise) {
-                       int idx = model->get_promise_number(reads_from_promise);
+                       int idx = reads_from_promise->get_index();
                        if (idx >= 0)
                                model_print("  Rf: P%-2d", idx);
                        else
@@ -648,7 +648,7 @@ unsigned int ModelAction::hash() const
               if (reads_from)
                       hash ^= reads_from->get_seq_number();
               else if (reads_from_promise)
-                      hash ^= model->get_promise_number(reads_from_promise);
+                      hash ^= reads_from_promise->get_index();
               hash ^= get_reads_from_value();
        }
        return hash;