EFSM learning with guard and update function inference