1. A method of modification of integrated circuit mask layout, comprising: receiving a plurality of shapes in integrated circuit layout; allocating variables for geometrical entities; constructing a mixed integer programming formulation using the geometrical variables, and allocating 0-1 variables for mutually exclusive constraints and groups of constraints; and solving the mixed integer programming formulation lo modify the exiting layout in two dimensions.