
Python project
Due December 10, 2007 at midnight
December 9, 2007: Do not use OS dependent file separators like '\' or '/' inside your code.
Use methods available from os/os.path modules which are built considering this distinction. Note that 'os.sep' returns current system's file separator.
December 8, 2007: Part 3: Please note that URL count of
some of the testcases have been changed. See two more relatively static
web site's URL count below.
URL count for "http://www.cs.rutgers.edu/~mdstone/"
ling.rutgers.edu : 1
ruccs.rutgers.edu : 2
tinyurl.com : 2
www.ai.rutgers.edu : 1
www.creativecommons.org : 1
www.cs.cmu.edu : 1
www.cs.rutgers.edu : 12
www.itconversations.com : 1
www.perceptualscience.rutgers.edu : 1
www.rutgers.edu : 1
www.theplayethic.com : 1
www.youtube.com : 1
URL count for "http://www.cs.rutgers.edu/~steiger/"
dimacs.rutgers.edu : 1
www.cs.rutgers.edu : 4
www.math.rutgers.edu : 1
www.rutgers.edu : 2
December 8, 2007: For part 1-b there won't be more than one java file with the same name.
December 8, 2007: Test data is now also available in zip format.
December 7, 2007: Still another error found in the test data. Corrected test data now available.
Some useful advice on how to run Python from a fellow student.
December 5, 2007:Some discrepancies and typos have been fixed in testcase.
You can get some example of html comments and URLs by 'viewing' the source of this page
December 4, 2007: The TAs have requested that we standardize the output format for the Python project. Therefore, please have your print functions print the dictionaries in sorted order by key, with each key,value entry occupying a new line of output. This is not hard to accomplish if you extract the keys into a list, sort the list and then lookup the entries in sorted order (see standard operations on dictionaries).
There have been questions about HTML parsers being used on problem #3. You are NOT to use built-in parsers, but rather to build regular expressions to recognize the URLs. We will be posting examples of URLs by Weds, Dec 7th.
December 2, 2007: There was some ambiguity in the wording of problem 1a. in the project; please read the red text portion of the project description to clarify your understanding of problem #1. and to clear up any possible confusion. Latest change was made at 11:00pm.
Scheme project
Due November 20, 2007 at midnight
November 18, 2007: We have discovered a mistake in the test data FOR THE EXTRA CREDIT FUNCTIONS ONLY. They should have been coded to take type-value pairs for their inputs, but the test data from Nov 16th did otherwise. Here is the corrected test data. This ONLY affects the EXTRA CREDIT functions; all other test data is unchanged.
November 16, 2007: More answers to project questions to
share with the entire class:
1. some people reported that problems with case sensitivity were
solved merely by switching Dr. Scheme interpreters from the R5RS to
the Essentials of Programming Languages version.
2. someone noticed that the extra credit functions have slightly
different names in the skeleton and in the testdata. USE THE TESTDATA
NAMES.
November 15, 2007: A new testdata file that includes testdata for the extra credit is now availble. We have noticed a difference in the capitalization of letters in types and/or variable names between different versions of Dr. Scheme. Do not worry about this as the test grading program will accept either capital or lower case letters (e.g., NUM or num in a type-value pair).
Also, you should realize that the testdata is not all-inclusive; feel free to consult the grammar and make up new tests of your own, especially for cases the testdata does not cover.
November 13, 2007: The testdata has been changed to correct
an error in the original testdata for eval-statement; the correction
is as shown here:
(eval-statement '((a (NUM 5))) '(a <- 2 + 4))
((a (NUM 6)))
In order to do the extra credit, it will be necessary for you to add the extra credit function to the function table. Test data for the extra credit function will be posted soon.
November 12, 2007: The test data is now available
Two cautions: (i) be careful with the skeleton version of the foldl function as its arguments are in a different order than in Prof Ryder's slides and examples, (ii) the provided member? function in the skeleton uses eq? when equal? would be a better choice; some lists may have members which are themselves lists.
November 11, 2007:The extra credit problem for the Scheme project is now described in the project description (see red text) and its function signature given in the code skeleton.
November 7, 2007: Note, if you define your own higher order functions, then you may need to use recursion in their definitions. The project description warns against using ONLY recursive functions in your solution; if the functions you define are higher order recursive functions then that's okay.
There was an inconsistency between the program skeleton and the detailed description for the LIST+LIST function. The detatiled description has now been changed to be consistent with the program skeleton (see the red text); that is, the two list arguments will be of the same length.
November 5, 2007: Small change to project description page to make it match the code skeleton. Change shown in red near bottom of page.
Prolog project
Due: October 16, 2007 at midnight
Some notes on debugging with Prolog
October 16, 2007: If our grammar is translated as shown in the example into ASTs then minus and divide are right associative operators instead of left associative as they should be. Programs which return incorrect values for expressions such as "5-3-2", but follow the grammar rules correctly in building the parse trees will be accepted. Programs which evaluate such expressions with correct precedence will be given extra credit.
Also, in SWI Prolog there appears to be a limit on the list of
a list on output (for those of you who are calling the tokenizer and
then trying to look at the result as it is returned by the
interpreter). To avoid this limit, he suggests using the following
command at the start of your session with the SWI Prolog
interpreter:
set_prolog_flag(toplevel_print_options, [quoted(true), portray(true),max_depth(0), attributes(portray)]).
We now have SWI Prolog running on spanky, an undergraduate Linux server, so you can request that we grade your Prolog practice assignment and/or Prolog project using SWI Prolog or Sicstus Prolog. Embed a comment in your Prolog programs to make this choice known to the graders.