projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nodestack: add Node::get_parent() function
[model-checker.git]
/
nodestack.cc
diff --git
a/nodestack.cc
b/nodestack.cc
index 87b3ee531fbe2d10a7b52f229f23e7ea90196e9d..e7b5f51162b485160f3b4bb20cb06f13df2dc3b6 100644
(file)
--- a/
nodestack.cc
+++ b/
nodestack.cc
@@
-4,8
+4,9
@@
#include "model.h"
/** @brief Node constructor */
#include "model.h"
/** @brief Node constructor */
-Node::Node(ModelAction *act, int nthreads)
+Node::Node(ModelAction *act,
Node *par,
int nthreads)
: action(act),
: action(act),
+ parent(par),
num_threads(nthreads),
explored_children(num_threads),
backtrack(num_threads),
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);
/* 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;
total_nodes++;
iter++;
return NULL;