Analysis and synthesis of Petri nets by state machine decomposition