X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker.git;a=blobdiff_plain;f=cyclegraph.h;h=0bb01c4c15ec608aa06a1892103635c4973ed039;hp=2e523d7950b28c5b91830217414eebbc459d2972;hb=8574719911b1f66fbcbaedef47eebb84b860d526;hpb=307520433027a3e7440d1b3e34c52e1adbf2b05a diff --git a/cyclegraph.h b/cyclegraph.h index 2e523d7..0bb01c4 100644 --- a/cyclegraph.h +++ b/cyclegraph.h @@ -22,6 +22,8 @@ class CycleGraph { void addRMWEdge(const ModelAction *from, const ModelAction *rmw); bool checkReachable(const ModelAction *from, const ModelAction *to); + void commitChanges(); + void rollbackChanges(); private: CycleNode * getNode(const ModelAction *); @@ -33,6 +35,11 @@ class CycleGraph { /** @brief A flag: true if this graph contains cycles */ bool hasCycles; + + bool oldCycles; + + std::vector rollbackvector; + std::vector rmwrollbackvector; }; /** @brief A node within a CycleGraph; corresponds to one ModelAction */ @@ -43,6 +50,12 @@ class CycleNode { std::vector * getEdges(); bool setRMW(CycleNode *); CycleNode* getRMW(); + void popEdge() { + edges.pop_back(); + }; + void clearRMW() { + hasRMW=NULL; + } private: /** @brief The ModelAction that this node represents */