1. A method for optimizing a source shape and a mask shape for a lithography process comprising: performing a mask optimization for the lithography process in accordance with a set of parameters including at least one variable representation, at least one objective and problem constraints; performing a light source optimization for the lithography process in accordance with the set of parameters; performing a joint light source-mask optimization in accordance with the set of parameters; and iterating, by a hardware processor, at least one of said mask optimization or said light source optimization by changing at least one of the variable representation, the objective or the problem constraints to maximize a common process window for the lithography process.