1. A method for producing a circuit description of a design, the method comprising: a) from the design, selecting a candidate sub-network; b) identifying a set of output functions performed by the sub-network; c) based on the identified set of output functions, retrieving a replacement sub-network from a storage structure that stores replacement sub-networks; d) determining whether to replace the selected candidate sub-network with the replacement sub-network in the design; e) if determine to replace the selected candidate sub-network, replacing the selected candidate sub-network with the replacement sub-network in the design.