An optical proximity correction program, comprising:
- receiving data of a pattern to be processed;
- adjusting a model for optical proximity correction with reference to measured data with proper focus and exposure dose;
- generating a first corrected pattern by correcting the pattern to be processed based on the model for optical proximity correction adjusted with reference to the measured data with proper focus and exposure dose;
- adjusting a model for optical proximity correction with reference to measured data with at least one of focus and exposure dose deviating;
- generating a second corrected pattern by correcting the pattern to be processed based on the model for optical proximity correction adjusted with reference to the measured data with at least one of focus and exposure dose deviating;
- generating a composed pattern by combining the first corrected pattern and the second corrected pattern;
- and
- correcting a border of the composed pattern on a rule basis,
- wherein the generating the composed pattern includes:
- calculating a dimensional deviation between the pattern to be processed and the first corrected pattern as for at least part of edges;
- calculating a dimensional deviation between the pattern to be processed and the second corrected pattern as for at least part of edges;
- and
- calculating a weighted average of the dimensional deviations;
- and wherein all of the above steps are processed by a computer.