theory of machines gate