A system for designing a dummy pattern layout for improving surface flatness of a wafer, comprising: at least one processor; and at least one memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform operations comprising: identifying a first feature pattern corresponding to a functional region of the wafer; determining a property of the first feature pattern based on a script associated with the feature pattern, wherein the property comprises a density of the first feature pattern; determining a dummy pattern rule based on the property of the first feature pattern; determining a density gradient based on a distance between the first feature pattern and a second feature pattern and a density difference between the first feature pattern and the second feature pattern; and generating a dummy pattern corresponding to a vacant region of the wafer by wrap-filling dummy units (130, 190, 330, 340, 350) in an adjacent area surrounding the first feature pattern based on the dummy pattern rule, extending the dummy pattern from the adjacent area to an extended area further away from the first feature pattern based on the dummy pattern rule; wherein the dummy pattern rule comprises the density gradient indicating a density change of the dummy pattern from the adjacent area to the extended area, wherein said density comprises any one of a number of feature units per unit area, a number of feature units per unit length, and a pitch of said feature units at least one processor; and at least one memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform operations comprising: identifying a first feature pattern corresponding to a functional region of the wafer; determining a property of the first feature pattern based on a script associated with the feature pattern, wherein the property comprises a density of the first feature pattern; determining a dummy pattern rule based on the property of the first feature pattern; determining a density gradient based on a distance between the first feature pattern and a second feature pattern and a density difference between the first feature pattern and the second feature pattern; and generating a dummy pattern corresponding to a vacant region of the wafer by wrap-filling dummy units (130, 190, 330, 340, 350) in an adjacent area surrounding the first feature pattern based on the dummy pattern rule, extending the dummy pattern from the adjacent area to an extended area further away from the first feature pattern based on the dummy pattern rule; wherein the dummy pattern rule comprises the density gradient indicating a density change of the dummy pattern from the adjacent area to the extended area, wherein said density comprises any one of a number of feature units per unit area, a number of feature units per unit length, and a pitch of said feature units identifying a first feature pattern corresponding to a functional region of the wafer; determining a property of the first feature pattern based on a script associated with the feature pattern, wherein the property comprises a density of the first feature pattern; determining a dummy pattern rule based on the property of the first feature pattern; determining a density gradient based on a distance between the first feature pattern and a second feature pattern and a density difference between the first feature pattern and the second feature pattern; and generating a dummy pattern corresponding to a vacant region of the wafer by wrap-filling dummy units (130, 190, 330, 340, 350) in an adjacent area surrounding the first feature pattern based on the dummy pattern rule, extending the dummy pattern from the adjacent area to an extended area further away from the first feature pattern based on the dummy pattern rule; wherein the dummy pattern rule comprises the density gradient indicating a density change of the dummy pattern from the adjacent area to the extended area, wherein said density comprises any one of a number of feature units per unit area, a number of feature units per unit length, and a pitch of said feature units