model: add support for modification orders
[model-checker.git] / main.cc
diff --git a/main.cc b/main.cc
index 339b85efd45d427096546cbf8641d3afbb71067f..cbf93b67fce125aef65f9e90801c295633d8c46a 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -31,6 +31,8 @@ static int thread_system_next(void) {
                        ASSERT(false);
        }
        next = model->scheduler->next_thread();
+       if (!model->isfeasible())
+               return 1;
        if (next)
                next->set_state(THREAD_RUNNING);
        DEBUG("(%d, %d)\n", curr ? curr->get_id() : -1, next ? next->get_id() : -1);