X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=nodestack.cc;h=e7b5f51162b485160f3b4bb20cb06f13df2dc3b6;hb=2fd874e12b6349b5543b9a3014b38b556c672623;hp=87b3ee531fbe2d10a7b52f229f23e7ea90196e9d;hpb=6cb1abb7f1f69690ecf78a293744204980912a7d;p=model-checker.git diff --git a/nodestack.cc b/nodestack.cc index 87b3ee5..e7b5f51 100644 --- a/nodestack.cc +++ b/nodestack.cc @@ -4,8 +4,9 @@ #include "model.h" /** @brief Node constructor */ -Node::Node(ModelAction *act, int nthreads) +Node::Node(ModelAction *act, Node *par, int nthreads) : action(act), + parent(par), num_threads(nthreads), explored_children(num_threads), backtrack(num_threads), @@ -173,7 +174,7 @@ ModelAction * NodeStack::explore_action(ModelAction *act) /* Record action */ get_head()->explore_child(act); - node_list.push_back(new Node(act, model->get_num_threads())); + node_list.push_back(new Node(act, get_head(), model->get_num_threads())); total_nodes++; iter++; return NULL;