Guidelines for Homework

What to handin

Electronically: Your code, with comments and instructions about how to run the program (this can be in the header of your code). Also, make a transcript demonstrating your program's output. Send these together using the handin program.

Printout: NOTHING.

Note: Put your name on anything you hand in. Also, be certain to acknowledge any help you received. Ask the instructor or the ai if you are unsure as to how to do this. Finally, if you are not sure if some form of collaboration is allowable, see one of us before you do it!

How to handin

You must be on copper to do a handin.
To turn in your program, use this handin program:
	/usr2/elyk/q351/Handin/handin assignment# file1 ...

where

	assignment# is the current homework number
	file1 is the first file you're handing in

You may handin multiple files this way.  For example, to handin
hw4's assignment which might be contained in the files parse.ss
and parse.out:

	/usr2/elyk/q351/Handin/handin 4 parse.ss parse.out

That's it!  Your files will not be deleted - they are just copied into
my Handin directory.  If you want to handin again (with the same asst#),
you will simply overwrite what's in my Handin directory.

If the handin program doesn't work for some reason, just mail the code to me this way: From a UNIX prompt, type the following (where "file.ss" is to be replaced by the name of your scheme file):

	elm -s hw1 elyk@cs.indiana.edu < file.ss
Please don't mail from the nations cluster - my mailer can't read that stuff. Elm and Pine are both fine.

Late policy

Homeworks will be 10% off per day, and no homework will be accepted if it is more than 4 days late.

Early handins are much appreciated, and they will be graded as quickly as possible.

Documentation

Please at least document each function at the head of the function. Tell what it does, perhaps what input it expects, what it returns. If the function is complicated, describe also what's going on in high-level terms. If there are portions of a large function that you feel need explanation, put comments at the beginning of those portions. Try not to comment every line and don't comment the simple stuff.

Look at the following for an idea of how to make comments readable. This is by no means the only way, but it's not too hard to see what's going on. (Ignore the program's content - it's silly.)

;;;
;;; solve-the-worlds-problems
;;;
;;; INPUT:	problem: a list containing a descrip of problem
;;;             knowledge: a list of the knowledge the prog needs
;;;             time-limit: a number, in seconds, for how much time is
;;;			allowed to solve the problem
;;; OUTPUT: 	a list containing the solution to the problem, or
;;;             #f if no solution exists
;;; DESCRIP:	cdr down the problem and break into subproblems, each
;;;		of which is given a bit of the time from time-limit.
;;;		Use solve-it to help solve probs.
;;;
(define solve-the-worlds-problems
  (lambda (problem knowledge time-limit)

    ;; Determine if the problem is solved...
    (cond
      [(null? problem) '()]
      [(solvable? (car problem)) (solve-it (car problem))]
      [...     ]

      ;; Problem is not solvable, go on to rest of it...
      [else
	(cons (solve-the-worlds-problems (cdr problem)
					 knowledge 
					 (- time-limit 1)))])))