Theories of abstract automata