#include "cyclegraph.h"
#include "action.h"
+#include "common.h"
/** Initializes a CycleGraph object. */
CycleGraph::CycleGraph() :
* @param from The edge comes from this ModelAction
*/
void CycleGraph::addEdge(const ModelAction *from, const ModelAction *to) {
+ ASSERT(from);
+ ASSERT(to);
+
CycleNode *fromnode=getNode(from);
CycleNode *tonode=getNode(to);
* action can read from a given write.
*/
void CycleGraph::addRMWEdge(const ModelAction *from, const ModelAction *rmw) {
+ ASSERT(from);
+ ASSERT(rmw);
+
CycleNode *fromnode=getNode(from);
CycleNode *rmwnode=getNode(rmw);
return false;
}
+void CycleGraph::startChanges() {
+ ASSERT(rollbackvector.size()==0);
+ ASSERT(rmwrollbackvector.size()==0);
+ ASSERT(oldCycles==hasCycles);
+}
+
/** Commit changes to the cyclegraph. */
void CycleGraph::commitChanges() {
rollbackvector.resize(0);