It seems to work. I have added some code to make mist call 'is_petri_net' functon and print the result (line 1275 of mist.c)