cyclegraph: bugfix - more SnapshotAlloc
[model-checker.git] / cyclegraph.h
index f0f04ffee0c3ca1f9cd3ef2edf46c2743e6c0515..8fac5eb590c671682d48a6b8a8377bdeed21e2c2 100644 (file)
@@ -54,8 +54,8 @@ class CycleGraph {
        bool hasRMWViolation;
        bool oldRMWViolation;
 
-       std::vector<CycleNode *> rollbackvector;
-       std::vector<CycleNode *> rmwrollbackvector;
+       std::vector< CycleNode *, SnapshotAlloc<CycleNode *> > rollbackvector;
+       std::vector< CycleNode *, SnapshotAlloc<CycleNode *> > rmwrollbackvector;
 };
 
 /** @brief A node within a CycleGraph; corresponds to one ModelAction */
@@ -63,7 +63,8 @@ class CycleNode {
  public:
        CycleNode(const ModelAction *action);
        bool addEdge(CycleNode * node);
-       std::vector<CycleNode *> * getEdges();
+       CycleNode * getEdge(unsigned int i) const;
+       unsigned int getNumEdges() const;
        bool setRMW(CycleNode *);
        CycleNode* getRMW();
        const ModelAction * getAction() {return action;};
@@ -81,7 +82,7 @@ class CycleNode {
        const ModelAction *action;
 
        /** @brief The edges leading out from this node */
-       std::vector<CycleNode *> edges;
+       std::vector< CycleNode *, SnapshotAlloc<CycleNode *> > edges;
 
        /** Pointer to a RMW node that reads from this node, or NULL, if none
         * exists */