Rewrite compiler