Device driver synthesis and verification