A method and apparatus for performing an operation on hierarchically
described integrated circuit layouts such that the original hierarchy of
the layout is maintained is provided. The method comprises providing a
hierarchically described layout as a first input and providing a
particular set of operating criteria corresponding to the operation to be
performed as a second input. The mask operation, which may include
operations such as OPC and logical operations such as NOT and OR, is then
performed on the layout in accordance with the particular set of
operating criteria. A first program data comprising hierarchically
configured correction data corresponding to the hierarchically described
layout is then generated in response to the layout operation such that if
the first program data were applied to the flattened layout an output
comprising data representative of the result of performing the operation
on the layout would be generated. As the first program data is maintained
in a true hierarchical format, layouts which are operated upon in
accordance with this method are able to be processed through conventional
design rule checkers. Further, this method is capable of being applied to
all types of layouts including light and dark field designs and phase
shifting layouts.