Designing the FSM simulator