CSG111 Machine Problem 1: Getting acquainted

Out: Tuesday, September 11, 2007

Due: Tuesday, September 25, 2007

This assignment is mostly about finding your way around the system and dealing with PLT Scheme. The actual procedures shouldn't be too hard: if you find them difficult, that's a bad sign.

You shouldn't need anywhere near two weeks for this assignment, but I'm giving you two weeks so you can have the benefit of the first lab session.

In this course we will use not only Scheme but also Java to study programming languages and their interpreters. Therefore we will use a tool, called DJ to study structure-shy programming. As part of this assignment you are required to read about DJ, a simple tool for Java programming. Only focus on the method gather of the ClassGraph class. There is nothing to turn in for this reading but go through the lecture notes for lecture 1 to understand how gather gan be used to flatten any data type, not just lists.

Please do items 1 and 2 (getting a CCIS login and signing up for the mailing list) by next week, since you will need a CCIS login to do the lab exercise next week.

For your information, the first assignment last spring was very similar, and the median total time for this assignment was 6.9 hours, and the median estimated lines of code was 240 (I'm not sure whether this counted tests).

Submit the assignment as directed on the machine problems page.

  1. Get yourself a CCIS login. If you do not already have a CCIS account, follow the directions at http://www.ccs.neu.edu/welcome/ or go to 310 WVH to get a form. Be sure to follow the directions carefully!
  2. Subscribe to the course mailing list at https://lists.ccs.neu.edu/bin/listinfo/csg111. Be sure to include your first and last names, so I'll know who is who.
  3. Submit a picture of yourself for the class gallery. We will use the wiki also for other purposes. Note: Submitting this picture is an obligation in this course. The pictures will be used by faculty and co-op coordinators, and will be posted in the class photo album on the web. If you prefer not to have your picture included in the class photo album, please notify me privately by email.
  4. Do the following exercises in EOPL3: 1.14, 1.17-1.18, 1.20-1.23, 1.26-1.27.

The first three problems on this assignment (the non-programming tasks) do not count for points, but your assignment will not be accepted until you do them. If you run into technical difficulties, please let us know.

Each of the procedures will count 2 points each. This number is chosen as a convenient grading scale and does not affect the worth of this problem set in your overall grade, see [weighted averages].

Follow the instructions at the beginning of Section 1.4 in interpreting these problems.

Your code should contain no exclamation points or input/output, except that you may call eopl:error and eopl:printf. Also, you may not use apply. You may, however, use any procedure is that is provided by drscheme-init.scm.

For each procedure, you must include a purpose statement and contract, following the examples in class. If you have any auxiliary procedures, you should include purpose statement and contract for each of them as well.

Code that is really badly indented or not indented at all will be penalized. Use the PLT indenter.

Your deliverables are:

  1. Your code in a PLT Scheme module called mp1. Your module should be written in the language (lib "eopl.ss" "eopl") (that is, the EOPL language level), it should require drscheme-init.scm, and it should provide each of the procedures in the problem set.

    drscheme-init.scm is available in the interpreter directory, which we will use for all the machine problems.

  2. Your tests, in a PLT Scheme module called top

    You will be graded on the adequacy of your tests. Note: the tests in the book are almost never sufficient! An unsatisfactory set of tests will result in a 2-point penalty.

    Your testing set up should use the framework illustrated in class for subst. For Exercise 1.20, use the procedure equal-as-sets? instead of equal?to compare the actual answer to the correct one.

  3. The output from running your tests. The best way of doing this is to take the contents of the DrScheme interaction window and paste it into your favorite (fixed-width) text processor. The example for subst can serve as a model.
  4. A Development Diary.

We apologize for the length of this problem specification, but in part this problem set is about learning what is required.

Last modified: Tue Jan 9 14:10:50 EST 2007