Re: Assignment 3 & Related Reading Assignments

Dear CSCI-316 Students,

Although the submission deadline for Lisp Assignment 2 has now passed, late submissions of this assignment will continue to be accepted until the late submission deadline, which will be announced later but will be in December. Possible penalties for late submission were explained on page 3 of the 1st-day-announcements document, in the final paragraph of the “Assignments and Late Submission Policy” section.

You should now use the QUICKCHECK tool on mars to test your submitted solutions to Assignment 2.

Using QUICKCHECK

To use QUICKCHECK, first logon to your xxxxx_yyyy316 mars account and enter ckasn at the xxxxx_yyyy316@mars:~$ prompt. You should then get a [1]> prompt. At that prompt, enter:

(quickcheck '<your last name> 2)

The ' is needed, but DON’T type the < and >! For example, if your last name is “Winston” then you should enter:

(quickcheck 'winston 2)

This will try to load in your submitted file (e.g., the file winston-2.lsp if your last name is Winston) and will test your function definitions. It will print a list of all the errors it finds—so if it finds no errors then it will print NIL!

After testing your solutions, enter (exit) to return control to mars’s shell. For other important information, see the Technical Notes at the end of this announcement.

QUICKCHECK Transcript

QUICKCHECK will save a transcript of its actions in the file:

<your last name>-2.check.log

You can view this file by entering:

less <your last name>-2.check.log

at the xxxxx_yyyy316@mars:~$ prompt. (Within less, type h to see available commands.)

Important Notes

Note that QUICKCHECK might not find all errors. But if QUICKCHECK reports no errors with your submission then, assuming your submission follows all the rules in the indentation-&-spacing-rules-for-Lisp-Assignments-2-3-4-5 document on Brightspace, then you are quite likely to score at least 90% (and you will probably score at least 85%) on this assignment.

Final decisions on assignment scores will not be made until after I have graded the exams for this course: If my impression at that time is that your exams were harder or easier than I intended, then I might want to be more lenient or more strict regarding flaws in your assignment submissions.

While it is conceivable that QUICKCHECK might report an error when you have solved a problem in an unexpected but nevertheless correct way, this is most unlikely to happen in practice! If you think it really has happened to you on some problem, please see me during one of my office hour periods. But be sure to thoroughly test your solution before you see me. If you decide to see me, you should be ready to show me the file <your last name>-2.check.log that was produced when you ran QUICKCHECK as well as the <your last name>-2.lsp file you submitted.

One fairly common kind of error is caused by the presence of non-ASCII characters in your Lisp file that are similar in appearance to ASCII characters but are in fact different characters. Note that cutting and pasting text from a PDF file or a file created by a word processor (such as MS Word) into your Lisp file may well introduce such non-ASCII characters into the Lisp file!

If you have questions about the behavior of QUICKCHECK, the Technical Notes below may well answer them—so be sure to read the Notes before you ask for help!

See you in class on Tuesday.

Technical Notes

Read Errors

If QUICKCHECK reports a read error such as:

*** - READ: input stream
 #<INPUT BUFFERED FILE-STREAM CHARACTER
   #P"/home/ ... /submitted-Lisp-assignments/xxxxxxx-2.lsp" @24>
ends within an object. Last opening parenthesis probably in line 18.

there is probably an unmatched opening parenthesis (on line 18 in this example) in your file xxxxxxx-2.lsp.

Similarly, if you get an error such as:

*** - READ from
 #<INPUT BUFFERED FILE-STREAM CHARACTER
   #P"/home/ ... /submitted-Lisp-assignments/xxxxxxx-2.lsp" @22>
: an object cannot start with #\)

there is probably an unmatched closing parenthesis (on line 22 in this example) in the file xxxxxxx-2.lsp. Another possible cause of the same error message would be that you QUOTEd a closing parenthesis on line 22: Lisp expects to see an S-expr after ' and so ') is an error.

In both of these cases, your entire submission is invalid! Enter (exit) at the Break prompt to exit testing. These errors often occur when students write their code on a PC or Mac and fail to test their code on mars before submitting.

Compilation Warnings

If you get some compilation WARNINGs about variables that are “neither declared nor bound”, it might be because you used SETF, which you weren’t allowed to do!

Evaluation Errors

An evaluation error may occur while QUICKCHECK is testing a function:

Testing <function name>
*** - <some error message>
Break 1 [2]>

If this happens, then there is probably an error in your definition of the specific function that is being tested. In such cases you should enter (*rec*) at the Break prompt to continue testing of functions. (An alternative would be to enter (exit) at the Break prompt to exit clisp, but this would abort the testing of your functions.) Note that you may have to enter (*rec*) more than once for the same function, because QUICKCHECK may test a particular function in more than one way!


T. Yung Kong, D.Phil.
Professor
Computer Science Department
Queens College, CUNY
Flushing, NY 11367, USA