A computer implemented method for correcting a mask pattern includes:
predicting a displacement of a device pattern by using a mask pattern to
form the device pattern and a variation of a process condition;
determinating an optical proximity correction value so that the
displacement falls within a displacement tolerance of the device pattern;
and correcting the mask pattern using the optical proximity correction
value.