model: set 'last action in thread' as an action's parent
authorBrian Norris <banorris@uci.edu>
Mon, 28 May 2012 19:45:54 +0000 (12:45 -0700)
committerBrian Norris <banorris@uci.edu>
Mon, 28 May 2012 19:54:32 +0000 (12:54 -0700)
This is a step toward synchronizing clock vectors properly: on exploration of
an action, we use only the last action in the current thread as the 'parent'
(or NULL).

Note that this still does not include the parent thread in determining each
ModelAction's parent.

model.cc

index 8656d6b9710f600ab1b662ac47308a490c3bba3c..0a08717ba45d9c51e5873bf64d11b2e2a5b9cac6 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -211,7 +211,8 @@ void ModelChecker::check_current_action(void)
                return;
        }
 
-       curr = node_stack->explore_action(curr, NULL);
+       /* TODO: if get_last_action() is NULL, sync with parent thread */
+       curr = node_stack->explore_action(curr, get_last_action(curr->get_tid()));
        nextThread = get_next_replay_thread();
 
        currnode = curr->get_node();