1. A computer implemented method for representing a layout of a programmable device as a tree structure to be searched by a computer program for determining a configuration of functional components within a selected portion of an area occupied by of the layout, the method comprising: dividing the area occupied by the device layout into one or more main area portions; representing each main area portion as a corresponding root node on the tree structure; dividing each main area portion into equally sized sub-areas; representing each sub-area as a branch node that is a child of the root node corresponding to the main portion comprising the sub-area; continuing to divide each sub-area further into equally sized sub-areas and representing each sub-area as a branch node, until each of the sub-areas corresponds to a layout unit of the device layout; and representing each of the sub-areas corresponding to the layout unit of the device layout as a leaf node on the tree structure.