Graphical models are usually drawn, yet a drawing is just a term in a free category, and terms can be written. A small textual signature of variables and typed influence lines replaces the picture with source code a compiler could read, each line naming one generating morphism.
A signature declares a set of variables and a set of influence lines. Each variate introduces an object, a wire; each influence introduces a generating morphism from a tuple of source variables to a target, the textual stand-in for a box in a string-diagram.
signature Foo {
variate A, B, C, D;
influence e: B, C, A -> D;
influence f: A -> B, C;
}
The line e: B, C, A -> D denotes a morphism
Remark. The drawing is the normal form
The signature fixes no layout. Node placement, edge crossings, and left-to-right order are all consequences of the
bookkeeping, not extra data. Two signatures differing only by reordering or by renaming denote the same morphism, so the DSL quotients away exactly the incidental choices a hand-drawn diagram would leave ambiguous.