An Incremental Learning Algorithm for Extended Mealy Automata