  The concept of a system has proliferated through natural and social sciences.
While myriad theories of systems exist, there is no mathematical general theory
of systems. In this thesis, we take a first step towards formulating such a
theory. Our focus is on developing a syntax for compositional systems equipped
with a rewriting theory. We pull from category theory and linguistics to
accomplish this. The basic syntactical unit is a structured cospan and
rewriting is introduced via the double pushout method. Two versions of
rewriting are proposed: one that tracks intermediate steps and another
disregards them. Benefits and drawbacks of both versions are discussed. We
apply our results to the decomposition of closed systems, obtaining a
structurally inductive viewpoint of rewriting such systems.
