Abstract Urban models are key to navigation, architecture and entertainment. Apart from visualizing fac¸ades, a number of tedious tasks remain largely manual (e.g. compression, generating new fac¸ade designs and structurally comparing fac¸ades for classifification, retrieval and clustering). We propose a novel procedural modelling method to automatically learn a grammar from a set of fac¸ades, generate new fac¸ade instances and compare fac¸ades. To deal with the diffificulty of grammatical inference, we reformulate the problem. Instead of inferring a compromising, onesize-fifits-all, single grammar for all tasks, we infer a model whose successive refifinements are production rules tailored for each task. We demonstrate our automatic rule inference on datasets of two different architectural styles. Our method supercedes manual expert work and cuts the time required to build a procedural model of a fac¸ade from several days to a few milliseconds.