A method for producing a computer readable definition of photolithographic
mask used to define a target pattern is provided. The phase shift mask
patterns include phase shift windows, and the trim mask patterns include
trim shapes, which have boundaries defined by such sets of line segments.
For a particular pair of phase shift windows used to define a target
feature in a target pattern, each of the phase shift windows in the pair
can be considered to have a boundary that includes at least one line
segment that abuts the target feature. Likewise, a complementary trim
shape used in definition of the target feature, for example by including a
transmissive region used to clear an unwanted phase transition between the
particular pair of phase shift windows, includes at least one line segment
that can be considered to abut the target feature. Proximity correction is
provided by adjusting the position of the at least one line segment on the
boundary of a phase shift windows in said pair which abuts the target
feature, and by adjusting the position of the at least one line segment on
the boundary of the complementary trim shape which abuts the target
feature.