Chemical reaction automata