Protocol converter synthesis by solving language equations