Two mechanisms for the spontaneous emergence, execution, and reprogramming of chemical logic circuits | Synapse