A method of automatically creating and/or optimizing an optical proximity
correction (OPC) rule set can include providing an initial OPC rule set
and applying the initial OPC rule set to a layout data set to generate a
corrected layout data set. The corrected data set can be simulated and
optical rule checking (ORC) can be performed. Based on the simulation and
ORC, it can be determined whether residual edge placement errors are
present within the corrected layout data set and whether the residual
errors lie outside specified limits. If residual edge placement errors
are present within the corrected layout data set or lie outside of
specified limits, existing OPC rules can be modified and/or new OPC rules
can be added to the initial OPC rule set to correct the residual edge
placement errors.