X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=cyclegraph.h;h=690170022b3746c878c253d46eb58cc102f5c50c;hb=c6ecd39c5c0483a5aaa370a1b4bbd07b2af77eb2;hp=df9d46c17d108c51af33862cb1777a6b150ab515;hpb=1667e1f8017bd3f4bf5b1ef5712e3156577f99a2;p=c11tester.git diff --git a/cyclegraph.h b/cyclegraph.h index df9d46c1..69017002 100644 --- a/cyclegraph.h +++ b/cyclegraph.h @@ -12,27 +12,29 @@ class ModelAction; class CycleGraph { public: CycleGraph(); - void addEdge(ModelAction *from, ModelAction *to); + ~CycleGraph(); + void addEdge(const ModelAction *from, const ModelAction *to); bool checkForCycles(); + void addRMWEdge(const ModelAction *from, const ModelAction *to); private: - CycleNode * getNode(ModelAction *); - HashTable actionToNode; + CycleNode * getNode(const ModelAction *); + HashTable actionToNode; bool checkReachable(CycleNode *from, CycleNode *to); - bool hasCycles; - }; class CycleNode { public: - CycleNode(ModelAction *action); + CycleNode(const ModelAction *action); void addEdge(CycleNode * node); std::vector * getEdges(); + bool setRMW(); private: - ModelAction *action; + const ModelAction *action; std::vector edges; + bool hasRMW; }; #endif