Text this: Logic, Rewriting, and Concurrency