Symbolic reachability analysis for rewrite theories