1. A method of pre-tabulating sub-networks, the method comprising: specifying a plurality of sub-networks, each sub-network specified by a graph and a set of local functions, the graph for each sub-network comprising a plurality of nodes with each node representing a circuit element in the sub-network and having an associated function in the set of local functions, each node's associated local function representing a function performed by the circuit element represented by the node; identifying a set of output functions for each sub-network based on the set of local functions used to specify the sub-network; generating a parameter for each sub-network based on the identified set of output functions for each sub-network; and by a computer, storing the graph and the set of local functions of each sub-network in a storage structure indexed by the generated parameter of the sub-network.