Active learning for extended finite state machines