Add SCFence analysis
[model-checker.git] / scfence / fence_common.h
diff --git a/scfence/fence_common.h b/scfence/fence_common.h
new file mode 100644 (file)
index 0000000..014cce1
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef _FENCE_COMMON_
+#define _FENCE_COMMON_
+
+#include "model.h"
+#include "action.h"
+
+#define DEFAULT_REPETITIVE_READ_BOUND 20
+
+#define FENCE_OUTPUT
+
+#ifdef FENCE_OUTPUT
+
+#define FENCE_PRINT model_print
+
+#define ACT_PRINT(x) (x)->print()
+
+#define CV_PRINT(x) (x)->print()
+
+#define WILDCARD_ACT_PRINT(x)\
+       FENCE_PRINT("Wildcard: %d\n", get_wildcard_id_zero((x)->get_original_mo()));\
+       ACT_PRINT(x);
+
+#else
+
+#define FENCE_PRINT
+
+#define ACT_PRINT(x)
+
+#define CV_PRINT(x)
+
+#define WILDCARD_ACT_PRINT(x)
+
+#endif
+
+#endif