In size measurement of a semiconductor device, profiles of a pattern
formed in a resist process are determined through an exposure/development
simulation in respect of individual different combinations of exposure
values and focus values to form a profile matrix and scattered light
intensity distributions corresponding to the individual profiles are
determined through calculation to form a scattered light library, thereby
forming a profile library consisting of the profile matrix and scattered
light library. A scattered light intensity distribution of an actually
measured pattern is compared with the scattered light intensity
distributions of the scattered light library and a profile of profile
matrix corresponding to a scattered light intensity distribution of
scattered light library having the highest coincidence is determined as a
three-dimensional shape of the actually measured pattern.