The Project: - All of the materials described below exist in last year's project page on the 2002 course website. In the near future, links to all this stuff will be included in a similar page in this year's page, but for the time being have a look at the 2002 page. - To get started on the project, have a look at last year's project page. We will be following this for the time being. The first step is to port the ratintvl code from last year (located in the Solutions section of last year's project webpage), which used MITScheme, to DrScheme. ratintvl is an abstract data type that represents an interval with rational endpoints. Some notes on the differences between MIT and DrScheme: - In last year's code, you will see functions such as cdr, cadr, cddr, car. These correspond to DrScheme's first, rest, second, etc. Part of your task in porting the code is to figure out the relation between these notations and modify the code to use the ones we are used to. - Standard list printout in Scheme is (1 2 3), not the form (list 1 2 3) as we are accustomed to. However, in the standard form, you have to know whether something is input or output to know what it is, since DrScheme's (list f a b) becomes in the standard form (f a b), which could be the function f with arguments a and b if you didn't know better. - If you are tired of using the test suite interface, Prof. O'Donnell wrote a test program, which can be found under the Programming Utitilities section of last year's project webpage. This too, however, needs to be ported to DrScheme. - Approximation of the real numbers involves specifying an arbitrarily small finite interval that bounds an exact real number (which is possibly irrational). If you know an upper bound of how far off your approximation is from the exact value, you can define a rational interval in which you know the exact value must lie. The notion of an exact real, then, involves shrinking such an interval to arbitrarily small width to obtain arbitrarily good precision. - Due by Monday at 11:59: Write up a page discussion about what your have learned about the ratintvl code, including both your understanding of the implementation as well as the steps required for porting it to DrScheme. Also, post information about your port to the phpbb forums. Lambda uber alles, or defining things with lambda: - lambda construction is a powerful tool for slick definitions of functions. In the DEMOs, the 'l' prefix in a function name denotes that it is the lambda definition of the thing. The DEMO contains a lambda definition of cons, first, and rest, called lcons, lfirst, and lrest, respectively. Have a look at the definitions. There will be more on this on Monday.