Fix snapshot code
[model-checker.git] / nodestack.cc
index e5f46875649ab9bac345728ee3ef8eabd061015d..bacd067dcb4b8277408e2efd5685fc27bac8e2da 100644 (file)
@@ -838,6 +838,16 @@ void NodeStack::pop_restofstack(int numAhead)
        node_list.back()->clear_backtracking();
 }
 
+/** Reset the node stack. */
+void NodeStack::full_reset() 
+{
+       for (unsigned int i = 0; i < node_list.size(); i++)
+               delete node_list[i];
+       node_list.clear();
+       reset_execution();
+       total_nodes = 1;
+}
+
 Node * NodeStack::get_head() const
 {
        if (node_list.empty() || head_idx < 0)