public:
CycleGraph();
~CycleGraph();
- void addEdge(const ModelAction *from, const ModelAction *to);
+
+ template <typename T, typename U>
+ void addEdge(const T from, const U to);
+
bool checkForCycles() const;
void addRMWEdge(const ModelAction *from, const ModelAction *rmw);
bool checkPromise(const ModelAction *from, Promise *p) const;
void addNodeEdge(CycleNode *fromnode, CycleNode *tonode);
void putNode(const ModelAction *act, CycleNode *node);
CycleNode * getNode(const ModelAction *);
+ CycleNode * getNode(const Promise *promise);
+
HashTable<const CycleNode *, const CycleNode *, uintptr_t, 4, model_malloc, model_calloc, model_free> *discovered;
/** @brief A table for mapping ModelActions to CycleNodes */
HashTable<const ModelAction *, CycleNode *, uintptr_t, 4> actionToNode;
+ /** @brief A table for mapping reader ModelActions to Promise
+ * CycleNodes */
+ HashTable<const ModelAction *, CycleNode *, uintptr_t, 4> readerToPromiseNode;
+
#if SUPPORT_MOD_ORDER_DUMP
std::vector<CycleNode *> nodeList;
#endif