projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check_recency: refactor some more, + include Promises
[model-checker.git]
/
cyclegraph.h
diff --git
a/cyclegraph.h
b/cyclegraph.h
index bb2ab2d87b4370065ff64fa9dfcac45e86f2ce39..a2cb93d7ca702217be5af879cbf0c2ba34f9a67e 100644
(file)
--- a/
cyclegraph.h
+++ b/
cyclegraph.h
@@
-9,9
+9,11
@@
#ifndef __CYCLEGRAPH_H__
#define __CYCLEGRAPH_H__
#ifndef __CYCLEGRAPH_H__
#define __CYCLEGRAPH_H__
-#include "hashtable.h"
#include <vector>
#include <inttypes.h>
#include <vector>
#include <inttypes.h>
+#include <stdio.h>
+
+#include "hashtable.h"
#include "config.h"
#include "mymemory.h"
#include "config.h"
#include "mymemory.h"
@@
-45,9
+47,13
@@
class CycleGraph {
#if SUPPORT_MOD_ORDER_DUMP
void dumpNodes(FILE *file) const;
void dumpGraphToFile(const char *filename) const;
#if SUPPORT_MOD_ORDER_DUMP
void dumpNodes(FILE *file) const;
void dumpGraphToFile(const char *filename) const;
+
+ void dot_print_node(FILE *file, const ModelAction *act);
+ template <typename T, typename U>
+ void dot_print_edge(FILE *file, const T *from, const U *to, const char *prop);
#endif
#endif
- bool resolvePromise(
ModelAction *reader
, ModelAction *writer,
+ bool resolvePromise(
const Promise *promise
, ModelAction *writer,
promise_list_t *mustResolve);
SNAPSHOTALLOC
promise_list_t *mustResolve);
SNAPSHOTALLOC
@@
-67,12
+73,11
@@
class CycleGraph {
/** @brief A table for mapping ModelActions to CycleNodes */
HashTable<const ModelAction *, CycleNode *, uintptr_t, 4> actionToNode;
/** @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;
+ /** @brief A table for mapping Promises to CycleNodes */
+ HashTable<const Promise *, CycleNode *, uintptr_t, 4> promiseToNode;
#if SUPPORT_MOD_ORDER_DUMP
#if SUPPORT_MOD_ORDER_DUMP
- std::vector<
CycleNode *
> nodeList;
+ std::vector<
CycleNode *, SnapshotAlloc<CycleNode *>
> nodeList;
#endif
bool checkReachable(const CycleNode *from, const CycleNode *to) const;
#endif
bool checkReachable(const CycleNode *from, const CycleNode *to) const;