version of smc.generate that maintains a separate stack for each component under construction, and at each step stochastically chooses which one to keep building.