Gravar-mail: Learning Weighted Automata over Principal Ideal Domains