another bug fix
[cdsspec-compiler.git] / model.h
diff --git a/model.h b/model.h
index fa1bb6fca29b9ee9b8d4f6c18acb7791c75b6ad7..4b9e3ff53f0082b30efd095b5618186480882d5e 100644 (file)
--- a/model.h
+++ b/model.h
@@ -91,6 +91,11 @@ public:
        void finish_execution();
        bool isfeasibleprefix();
        void set_assert() {asserted=true;}
+
+       /** @brief Alert the model-checker that an incorrectly-ordered
+        * synchronization was made */
+       void set_bad_synchronization() { bad_synchronization = true; }
+
        const model_params params;
 
        MEMALLOC
@@ -122,7 +127,7 @@ private:
 
        bool take_step();
 
-       void check_recency(ModelAction *curr);
+       void check_recency(ModelAction *curr, const ModelAction *rf);
        ModelAction * get_last_conflict(ModelAction *act);
        void set_backtracking(ModelAction *act);
        Thread * get_next_thread(ModelAction *curr);
@@ -196,6 +201,8 @@ private:
        bool failed_promise;
        bool too_many_reads;
        bool asserted;
+       /** @brief Incorrectly-ordered synchronization was made */
+       bool bad_synchronization;
 };
 
 extern ModelChecker *model;