action: add 'reads_from' member variable
[model-checker.git] / action.h
index 4504fd8c089c71eaa60e10d25ecbbba61c26ec5f..731c3192f747b083bc0f26e6b0961c432bc90514 100644 (file)
--- a/action.h
+++ b/action.h
@@ -47,6 +47,7 @@ public:
        void * get_location() const { return location; }
        modelclock_t get_seq_number() const { return seq_number; }
        int get_value() const { return value; }
+       const ModelAction * get_reads_from() const { return reads_from; }
 
        Node * get_node() const { return node; }
        void set_node(Node *n) { node = n; }
@@ -94,6 +95,9 @@ private:
         * should probably be something longer. */
        int value;
 
+       /** The action that this action reads from. Only valid for reads */
+       const ModelAction *reads_from;
+
        /** A back reference to a Node in NodeStack, if this ModelAction is
         * saved on the NodeStack. */
        Node *node;