|
Projects
Spring 2012 Older Courses Fall 2011 Spring 2011 Fall 2010 Spring 2010 Fall 2009 Spring 2009
Fall 2008
Spring 2008
Fall 2007 HOWTOs |
OPLspr09 /
PS6Home Assignments Lecture Blog Resources Project Discussion Group 91.301 Organization of Programming Languages Out: March 23, 2009 Problem Set 6: Type Systems and Final Project Exploration 1OverviewThis problem set introduces three ways to build type systems in Scheme: generic operations with explicit dispatch, data-directed style, and message-passing style. ReadingBefore doing this problem set, read the following material:
ImplementationUse Module language in Dr. Scheme 4.x for this problem set. Use this starter code for completing the work. Problems1. Exercise 2.76 on pp. 187, a discussion of the three strategies presented in the text. Before answering the questions, briefly define the three strategies. 2. Exercise 2.77 on pp. 192193 on complex-number selectors in type table. 3. Exercise 2.78 on pp. 193, implementing our 4. Exercise 2.79 on pp. 193, implementing a generic equality predicate. 5. Exercise 2.81 on pp. 200, fixing 6. Exercise 2.83 on pp. 201, raising objects type per the tower of types. 7. Exercise 2.84 on pp. 201, modifying Final Project Exploration 1In this exercise, you will play with at least one library provided by the PLT Scheme developers. You will have the opportunity to explore another library in each of the next two weeks. Please choose libraries that you think you might be interested in using in your final project. Start off at the PLT Scheme home page, http://plt-scheme.org/ Then there are two places you can go for library code:
In the Documentation area, you will find detailed Getting Started guides. The More: Systems Programming with PLT Scheme walks you through building a web server in Scheme from first principles. The Continue: Web Applications in PLT Scheme goes into greater depth with this approach. If you may be interested in building a web app with Scheme, this would be a good place to start. Otherwise, have a look at the various other libraries available, including GUI and graphics libraries, networking libraries, and parsing libraries. Your job is to explore one library and write up your results. Load the library and write some code to drive it around. For example, if we look at the #lang scheme (require net/url) (define myurl (string->url "http://www.cs.uml.edu/")) (define myport (get-pure-port myurl)) (display-pure-port myport) Notice that This above is a trivial example; to complete this for the purposes of this assignment (if you go down the path of pulling HTTP requests), you should use the parsing libraries to parse the HTML that is returned, and then do something with the results. To turn in: at least 2 pages of interspersed code and narrative explaining what you did. Reminder again: please think about what you might want to work on for your final project, and choose a relevant library to work with. |