Experimental state-machine support.