Introduction to the Theory of Flow Machines