Device driver synthesis for embedded systems