The Theory of Machines