Translating safe Petri nets to statecharts in a structure-preserving way door