Text this: Rewriting modulo SMT and open system analysis