I present a new estimation-of-distribution approach to program evolution where distributions are not estimated over the entire space of programs. Rather, a novel representationbuilding procedure that exploits domain knowledge is used to dynamically select program subspaces for estimation over. This leads to a system of demes consisting of alternative representations (i.e. program subspaces) that are maintained simultaneously and managed by the overall system. Metaoptimizing semantic evolutionary search (MOSES), a program evolution system based on this approach, is described, and its representation-building subcomponent is analyzed in depth. Experimental results are also provided for the overall MOSES procedure that demonstrate good scalability. Categories and Subject Descriptors I.2.2 [Artificial Intelligence]: Automatic Programming – Program synthesis General Terms Algorithms, Design, Experimentation Keywords Empirical Study, Heuristics, Optimization, Representations