3 FuncInst::FuncInst(ModelAction *act, FuncNode *func_node) :
8 this->position = act->get_position();
9 this->location = act->get_location();
10 this->type = act->get_type();
11 this->func_node = func_node;
14 /* @param other Preceding FuncInst in the same execution trace
15 * Add other to predecessors if it has been added
17 * @return false: other is already in predecessors
18 * true : other is added to precedessors
20 bool FuncInst::add_pred(FuncInst * other) {
21 func_inst_list_mt::iterator it;
22 for (it = predecessors.begin(); it != predecessors.end(); it++) {
23 FuncInst * inst = *it;
28 predecessors.push_back(other);
32 bool FuncInst::add_succ(FuncInst * other) {
33 func_inst_list_mt::iterator it;
34 for (it = successors.begin(); it != successors.end(); it++) {
35 FuncInst * inst = *it;
40 successors.push_back(other);
44 FuncInst * FuncInst::search_in_collision(ModelAction *act) {
45 action_type type = act->get_type();
47 func_inst_list_mt::iterator it;
48 for (it = collisions.begin(); it != collisions.end(); it++) {
49 FuncInst * inst = *it;
50 if ( inst->get_type() == type )