Logic Rewriting and Concurrency