modified tree_dump to can use this function in is_petri_net. I have also modified all the ocurrences of tree_dump and call_back functions used with it