In
theoretical computer science and
mathematical logic a
string rewriting system (
SRS), historically called a
semi-Thue system, is a
rewriting system over
strings from a (usually
finite)
alphabet. Given a
binary relation ![](http://info.babylon.com/onlinebox.cgi?rt=GetFile&uri=!!ARV6FUJ2JP&type=0&index=3819)
between fixed strings over the alphabet, called
rewrite rules, denoted by
![](http://info.babylon.com/onlinebox.cgi?rt=GetFile&uri=!!ARV6FUJ2JP&type=0&index=3267)
, an SRS extends the rewriting relation to all strings in which the left- and right-hand side of the rules appear as
substrings, that is
![](http://info.babylon.com/onlinebox.cgi?rt=GetFile&uri=!!ARV6FUJ2JP&type=0&index=1737)
, where
![](http://info.babylon.com/onlinebox.cgi?rt=GetFile&uri=!!ARV6FUJ2JP&type=0&index=4132)
,
![](http://info.babylon.com/onlinebox.cgi?rt=GetFile&uri=!!ARV6FUJ2JP&type=0&index=3854)
,
![](http://info.babylon.com/onlinebox.cgi?rt=GetFile&uri=!!ARV6FUJ2JP&type=0&index=3071)
, and
![](http://info.babylon.com/onlinebox.cgi?rt=GetFile&uri=!!ARV6FUJ2JP&type=0&index=1722)
are strings.