From: Brian Norris Date: Tue, 5 Feb 2013 22:26:24 +0000 (-0800) Subject: cyclegraph: bugfix - pop edges properly X-Git-Tag: oopsla2013~286 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=d7e26717ec76b225475afe69a463b6e21e026f26 cyclegraph: bugfix - pop edges properly Now that CycleNode's have back-edges, we need to properly remove *both* the forward and back edges when doing roll-back. --- diff --git a/cyclegraph.cc b/cyclegraph.cc index eaddc8e..e834cb6 100644 --- a/cyclegraph.cc +++ b/cyclegraph.cc @@ -348,7 +348,7 @@ void CycleGraph::commitChanges() void CycleGraph::rollbackChanges() { for (unsigned int i = 0; i < rollbackvector.size(); i++) - rollbackvector[i]->popEdge(); + rollbackvector[i]->removeEdge(); for (unsigned int i = 0; i < rmwrollbackvector.size(); i++) rmwrollbackvector[i]->clearRMW(); diff --git a/cyclegraph.h b/cyclegraph.h index 749abf8..fcb1d30 100644 --- a/cyclegraph.h +++ b/cyclegraph.h @@ -102,11 +102,6 @@ class CycleNode { void clearRMW() { hasRMW = NULL; } const ModelAction * getAction() const { return action; } const Promise * getPromise() const { return promise; } - - void popEdge() { - edges.pop_back(); - } - bool is_promise() const { return !action; } void resolvePromise(const ModelAction *writer);