REST: Integrating Term Rewriting with Program Verification