projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
towards making rmw work...
[model-checker.git]
/
cyclegraph.h
diff --git
a/cyclegraph.h
b/cyclegraph.h
index a748c7791110f5c37837ff72131bc8901b98e4e5..3ed4e4a2f6fe6bb008a3038b9c7208db0f9613b4 100644
(file)
--- a/
cyclegraph.h
+++ b/
cyclegraph.h
@@
-12,26
+12,30
@@
class ModelAction;
class CycleGraph {
public:
CycleGraph();
class CycleGraph {
public:
CycleGraph();
- void addEdge(ModelAction *from, ModelAction *to);
+ ~CycleGraph();
+ void addEdge(const ModelAction *from, const ModelAction *to);
bool checkForCycles();
bool checkForCycles();
+ void addRMWEdge(const ModelAction *from, const ModelAction *to);
private:
private:
- CycleNode * getNode(ModelAction *);
- HashTable<ModelAction *, CycleNode *, uintptr_t, 4> actionToNode;
+ CycleNode * getNode(
const
ModelAction *);
+ HashTable<
const
ModelAction *, CycleNode *, uintptr_t, 4> actionToNode;
bool checkReachable(CycleNode *from, CycleNode *to);
bool hasCycles;
bool checkReachable(CycleNode *from, CycleNode *to);
bool hasCycles;
-
};
class CycleNode {
public:
};
class CycleNode {
public:
- CycleNode(ModelAction *action);
+ CycleNode(
const
ModelAction *action);
void addEdge(CycleNode * node);
std::vector<CycleNode *> * getEdges();
void addEdge(CycleNode * node);
std::vector<CycleNode *> * getEdges();
+ bool setRMW(CycleNode *);
+ CycleNode* getRMW();
private:
private:
- ModelAction *action;
+
const
ModelAction *action;
std::vector<CycleNode *> edges;
std::vector<CycleNode *> edges;
+ CycleNode * hasRMW;
};
#endif
};
#endif