198:314 Principles of Programming Languages
Fall 2001

Programming Assignments

It is your responsibility to hand in a program that loads/compiles properly on remus. We will not make any changes to submitted programs.


All assignments are due by midnight of the due date stated (i.e., due on Oct 5 means by 23:59:59 on Oct 5)

Electronic Handin Procedures

All assignments will be turned in using the handin program. To submit an assignment named proAssign.pl, you type:
handin cs314-{myinstructor}.proj* proAssign.pl
The possible substitutions for {myinstructor} are: borgida, kremer, ryder.
The possible substitutions for * are 1,2,3,4 depending on which assignment you are submitting throughout the semester.

To check that you handed in the first assignment successfully, for example, type:
handin -l cs314-{myinstructor}.proj1
In the parameter to handin, that's a lower case "L" not the number 1. To find out more about the handin program type:
man handin
on remus or romulus.

Assignments

Prolog Assignment (80+ points)
C Assignment (60 points)
Distributed: October 6, 2001

Due: October 19, 2001
 

 
C++ Assignment(80 points) in Postscript or in PDF
Distributed: October 31, 2001, midnight

Due: November 18, 2001
 
Scheme Assignment (80 points)
Dec. 16th, 2001: Scheme grade has been emailed to you. Here is a link to the testing suite and grading policies. Distributed: November 16, 2001/ finalized 11/18/01
Due: Sunday, December 9, 2001
  • Solution
  • December 9:
    Some students report strange dependencies between their matchList and matchList3 functions: the running of one messes up the execution of the other. Deal with this by loading your file, running test**b** on matchList and (exit) ing scheme; then restarting scheme, loading your file, and running test**d2** on matchList3.
  • December 5:
    Instruction for submitting your project.
    • Save all your work in one file called proj4.scm and submit this file using handin:
      handIn cs314-{myInstructor}.proj4 proj4.scm
    • It does not matter whether you include in the file the functions we provided in the description of the assignment (isVar?,map1,...). We will load these functions *after* loading your file, which will over-write whatever you had provided.
    • Make sure the "helper functions" you wrote, if any, are included in the *one* file you hand in.
    • We will only examine the implementation of matchList and MatchList3 for use of the higher-order functions that we provided. You will get partial credit even if you do not use these functions, but the more/better you use them, the higher the grade. Note that you can define and use any other higher order functions as helpers for any parts, BUT we will probably not be able to detect this use of "higher order", so you will not get credit for it.
    • Aside: test data for matchList4 has been modified to make sure that both arguments are lists. In fact, we made life easier by ensuring here that both argument lists (pattern and value) have the same lengths.
  • November 30:
    1.Revised test file : some test runs were converted to comments (so you read less); internal names changed and other comments added (so you understand better).

    2. FAQ

    • Except in part (e) (which will not count for much), the first argument of matchLists will be a List of AtomicPatterns; hence 'nested patterns' like ((1 <>) (3)) will *NOT* (we repeat: *NOT*) appear, except in part (e).
      On the other hand, the second argument of matchList will be an arbitrary Scheme list, but only with integer atoms. Please see the test data -- if you do not see a situation being tested, please ask us: it is probably not needed.
    • In parts d, and e we have left out the specification of matchAtomic3 and matchAtomic4, so you have some freedom. Please see the test data file for comments.
    • You may use any built-in Scheme functions. However, *IF* you are using the built in function map, or reduce or accum (which are not in scm, but which were discussed in class), please use instead the functions map1, map2, accumUs or reduceUs that we described. [They do the same thing, but we may modify them for grading purposes.]
  • November 25: Draft of an extensive test file. (Updated November 30.) . Should help you figure out what each function needs to do. (If you insist on printing it, please use mpage -2 -P[printerName]
  • On-line documentation:
  • Mini-tutorial and "how to run scheme"
  • Some files with interesting scheme programs are len-app-atom-new.scm here and higher-order.scm

 
 

Back to the entire class home page.
Last updated by BGR 6:42pm November 11, 2001.