Introduction to the programming assignment This document was created
Shared by: mikelbyington
1. Introduction to the 2004/2005 ET4255 programming assignment This document was created on 29/4/2005. The goal is to develop a region query program. That is, given an input file with a large collection of rectangles from the layout of an integrated circuit and a query window, the goal is to report all rectangles inside the query window. The starting point may be the paper by Rosenberg, “Geographical Algorithms Compared, A Study of Data Structures Supporting Region Queries”, IEEE Trans. CAD, Vol. 4, No 1, Jan. 1985, pp. 53-67. However, you are encouraged to search for other relevant algorithms that might be better. A bonus can be gained for the top-n fastest solutions (see below). Please also consider the info on the web site (http://cas.et.tudelft.nl/education/eda), also available in some of the ppt slides and the info below. However, don’t hesitate to contact me (NvdM) when needed. 2. Further instructions Platform can be Linux, Windows XP or cygwin. You may program in any language you like, but verify it can be executed on / ported to the target computer to be used during the shoot-out. The assignment concerns a static layout, that is, the layout is known beforehand and needs to be loaded in the program only once. Then, a number of region searches will need to be performed. Regions searches need to clip the rectangles partially extending the query window. Region searches also need to return rectangles that completely encompass the query window (i.e. the query window falls entirely in a layout rectangle). The program should be a so-called ‘batch’ program. It should be able to be run from the command prompt (i.e. command.com on windows or the shell on Linux/Cygwin). It needs to accept 2 mandatory arguments, being 2 file names. The first file will contain the layout data in the format as specified; the second file contains a number of query regions in the same format. The program should produce output files in the same format, one file for each query window, named <n>.out where <n> refers to the nth query window in the input file (starting at 1). The query windows will have vastly different sizes, potentially from returning zero or a only a couple of rectangles, to almost all rectangles. The different query windows will be uncorrelated. Time will be measured by running the batch program twice, with identical layouts but different number of query windows. The first run will have only one query window, and the second will have exactly the same window as the first query but then a couple of subsequent windows. The difference between execution times of both runs will be recorded. Thus, the time for building the data structure is not counted. 1. We will run input files of different sizes, and queries expecting different quantities of output. The total time of all runs will be used for the ranking. We will not estimate the order of the algorithm. Time will be measured by using the Linux/Cygwin ‘time’ command, in this way we can start (and measure) windows executables exactly the same as Linux/Cygwin executables. The speed will be measured on one computer running all three platforms. We will (probably) run the programs on (one of) the machines in the MSc lab on the 18th floor. These machines have a memory of 1Gb. 3. Deliverables and Mark Document your code, write a short report which explains the design choices made and the overall design of your code. Include reference(s) to used literature. Hand-in report and documented code listing one week before shoot-out for a so-called code-review. This should be both on paper and electronically (by e-mail). Also send the references you used if they aren’t published in regular literature. Electronically is sufficient. The overall mark depends for 50% on the (oral) exam and for 50% on the assignment. This latter 50% is split into 25% for the code review and 25% for program quality. The mark for program quality will be at least 6 if the program is correct, and can increase depending on the sophistication of the algorithm. The mark for code review will be heavily influenced by ‘readability’ and ‘maintainability’ of the code. An bonus of 2 points will be awarded for the fastest program, of 1.5 point for the second place and of 1 point for the numbers 3-5 in the ranking. This bonus will be added to overall mark obtained from both the assignment and the exam.