X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=cyclegraph.h;h=690170022b3746c878c253d46eb58cc102f5c50c;hb=bf7f7645131e1143b7ece3a74a827ace0c7a7304;hp=a748c7791110f5c37837ff72131bc8901b98e4e5;hpb=8548c711d71b6474802af83f5a4800eb4ac30718;p=model-checker.git diff --git a/cyclegraph.h b/cyclegraph.h index a748c77..6901700 100644 --- a/cyclegraph.h +++ b/cyclegraph.h @@ -12,26 +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