In logic, the procedure for obtaining the conjunctive normal form (CNF) of a formula can be conveniently written as a rewriting system.
In linguistics, rewrite rules, also called phrase structure rules, are used in some systems of generative grammar, as a means of generating the grammatically correct sentences of a language.