switch to snapshot/modelalloc versions of stl classes
[model-checker.git] / model.h
diff --git a/model.h b/model.h
index ae9706b124067e18e5098e0fbd7e7859fce05d73..0af3425deefa1743fd03ca99c055678c26f48e22 100644 (file)
--- a/model.h
+++ b/model.h
@@ -5,7 +5,7 @@
 #ifndef __MODEL_H__
 #define __MODEL_H__
 
-#include <vector>
+#include "stl_wrappers.h"
 #include <cstddef>
 #include <ucontext.h>
 #include <inttypes.h>
@@ -27,9 +27,9 @@ class ClockVector;
 struct model_snapshot_members;
 
 /** @brief Shorthand for a list of release sequence heads */
-typedef std::vector< const ModelAction *, ModelAlloc<const ModelAction *> > rel_heads_list_t;
+typedef model_vector< const ModelAction * > rel_heads_list_t;
 
-typedef std::list< ModelAction *, SnapshotAlloc<ModelAction *> > action_list_t;
+typedef snap_list< ModelAction * > action_list_t;
 
 /**
  * Model checker parameter structure. Holds run-time configuration options for
@@ -42,6 +42,7 @@ struct model_params {
        unsigned int fairwindow;
        unsigned int enabledcount;
        unsigned int bound;
+       unsigned int uninitvalue;
 
        /** @brief Maximum number of future values that can be sent to the same
         *  read */
@@ -230,9 +231,9 @@ private:
         * to a trace of all actions performed on the object. */
        HashTable<const void *, action_list_t *, uintptr_t, 4> * const condvar_waiters_map;
 
-       HashTable<void *, std::vector<action_list_t> *, uintptr_t, 4 > * const obj_thrd_map;
-       std::vector< Promise *, SnapshotAlloc<Promise *> > * const promises;
-       std::vector< struct PendingFutureValue, SnapshotAlloc<struct PendingFutureValue> > * const futurevalues;
+       HashTable<void *, snap_vector<action_list_t> *, uintptr_t, 4 > * const obj_thrd_map;
+       snap_vector< Promise * > * const promises;
+       snap_vector< struct PendingFutureValue > * const futurevalues;
 
        /**
         * List of pending release sequences. Release sequences might be
@@ -240,10 +241,10 @@ private:
         * are established. Each entry in the list may only be partially
         * filled, depending on its pending status.
         */
-       std::vector< struct release_seq *, SnapshotAlloc<struct release_seq *> > * const pending_rel_seqs;
+       snap_vector< struct release_seq * > * const pending_rel_seqs;
 
-       std::vector< ModelAction *, SnapshotAlloc<ModelAction *> > * const thrd_last_action;
-       std::vector< ModelAction *, SnapshotAlloc<ModelAction *> > * const thrd_last_fence_release;
+       snap_vector< ModelAction * > * const thrd_last_action;
+       snap_vector< ModelAction * > * const thrd_last_fence_release;
        NodeStack * const node_stack;
 
        /** Private data members that should be snapshotted. They are grouped