There's a procedure that control engineers (used to) do to calculate the transfer function of a linearized system, gradually reducing a block diagram to a rational function of s. It's justified by Laplace transforms, but leaving the continuous stuff aside, you could imagine it's a purely algebraic procedure on a digraph annotated with rational functions.

There's a similar reduction procedure that undergrad computer science students do to calculate the regular expression from a finite automaton. I think the similarity is something like "they're both Kleene algebras", except that Wikipedia tells me that a Kleene algebra needs to have idempotent +.

Is there something like a Kleene algebra of rational functions, where + is not idempotent?