- func_inst_list_t * curr_inst_list = func_inst_lists->back();
- func_node->link_insts(curr_inst_list);
+ action_list_t * curr_act_list = func_act_lists->back();
+
+ func_node->incr_exit_count();
+
+ /* defer the processing of curr_act_list until the function has exits a few times
+ * (currently 2 times) so that more information can be gathered to infer nullity predicates.
+ */
+ if (func_node->get_exit_count() >= 2) {
+ ModelList<action_list_t *> * action_list_buffer = func_node->get_action_list_buffer();
+ while (action_list_buffer->size() > 0) {
+ action_list_t * act_list = action_list_buffer->back();
+ action_list_buffer->pop_back();
+ func_node->update_tree(act_list);
+ }
+
+ func_node->update_tree(curr_act_list);
+ } else
+ func_node->get_action_list_buffer()->push_front(curr_act_list);