execution: make structure snapshotting
[model-checker.git] / execution.h
index 9ae0b4f3e6b3f67d578562f07522742493894ef2..b152ae2a8386ae54ca235d9f20fd57271b10c4a8 100644 (file)
@@ -14,7 +14,6 @@
 #include "config.h"
 #include "modeltypes.h"
 #include "stl-model.h"
-#include "context.h"
 #include "params.h"
 
 /* Forward declaration */
@@ -61,7 +60,10 @@ struct release_seq {
 /** @brief The central structure for model-checking */
 class ModelExecution {
 public:
-       ModelExecution(struct model_params *params, Scheduler *scheduler, NodeStack *node_stack);
+       ModelExecution(ModelChecker *m,
+                       struct model_params *params,
+                       Scheduler *scheduler,
+                       NodeStack *node_stack);
        ~ModelExecution();
 
        Thread * take_step(ModelAction *curr);
@@ -88,7 +90,7 @@ public:
        void check_promises_thread_disabled();
        bool isfeasibleprefix() const;
 
-       action_list_t * get_actions_on_obj(void * obj, thread_id_t tid);
+       action_list_t * get_actions_on_obj(void * obj, thread_id_t tid) const;
        ModelAction * get_last_action(thread_id_t tid) const;
 
        bool check_action_enabled(ModelAction *curr);
@@ -111,10 +113,12 @@ public:
 
        action_list_t * get_action_trace() const { return action_trace; }
 
-       void increment_execution_number() { execution_number++; }
-
-       MEMALLOC
+       SNAPSHOTALLOC
 private:
+       int get_execution_number() const;
+
+       ModelChecker *model;
+
        const model_params * const params;
 
        /** The scheduler to use: tracks the running/ready Threads */
@@ -232,8 +236,6 @@ private:
         */
        CycleGraph * const mo_graph;
 
-       int execution_number;
-
        Thread * action_select_next_thread(const ModelAction *curr) const;
 };