This class is taught by Jay McCarthy. Call him Jay. Email him at first-name DOT last-name AT gmail DOT com.
We meet in Olsen 109 at 1230-1345 on TR.
Jay McCarthy’s office hours are TR 0800-1400 in Olsen 221.
There is a mailing list hosted at Google Groups. Use it to ask non-revealing questions and receive answers, as well as general course announcements. You are responsible for reading the content of this mailing list.
Analytical approach to the study of programming languages. Description of the salient features of the imperative, functional, logical, and object-oriented programming paradigms in a suitable metalanguage such as Scheme. Topics include iteration, recursion, higher-order functions, types, inheritance, unification, message passing, orders of evaluation, and scope rules. Elementary syntactic and semantic descriptions. Implementation of simple interpreters.
Introduction / Racket: Numbers, Symbols, Expressions, Check Expect
PLAI2 1 / HtDP 2
Racket: Designing Programs, Functions, Conditionals, Structures, Lists, Natural Recursion
HtDP 3-6, 9
Racket: Recursive Structures / Higher-order Functions
HtDP 14 & 20
Parsing & Basic Interpretation
Basic Interpretation & Desugaring
Mutation: Basics & The Store
Memory management: GC, Reference Counting, & Mark and Sweep
PLAI2 11, Wilson 1-2.3
Memory management: Stop and Copy & Generational Collection
PLAI2 11, Wilson 2.4-9
Representation Decisions and Church Encoding
Control: Web Basics & CPS
Control: CPS Interpreter
Control: Tail Calls and call/cc and others
Types: Conditionals and Recursion
PLAI2 15.2.4-15.2.5 & 15.3.3 & 15.3.6
Types: Mutation and Parametric Polymorphism
Types: Type Inference
Types: Let-Polymorphism, Structural vs Nominal, Subtyping, Objects and Curry-Howard
PLAI2 126.96.36.199 & 15.3.4-5 & 15.3.7 & 188.8.131.52-15.3.8
Final (no exam, but due date for project)
Jay will not be present on days marked with a * in the Notes column.
This schedule is likely to change.
Assignments marked with a * are optional, extra credit. Assignments that are bold are required.
Out dates are suggestions—
This schedule may change.
I highly recommend that you read this article about grading. I also recommend you read this article about the stress that you may experience in a computer science program. Please try to make healthy productive choices in your life. I would love the opportunity to help you in any ways I can.
Create a Bitbucket account if you do not have one.
Create a repository named 2016-Fall-91.301.
Ensure it is configured as a Git repository that is private. You can configure it with No forks, if you want.
Click on Settings and then click on Access management then add me (username: jeapostrophe) to the repository with the Read permission.
Initialize the repository by following the instructions on the Bitbucket site.
As you work on assignments, you should create a directory in the repository with the name of assignment and do all your work in that directory. You should commit and push often. I will watch over your shoulder and try to give you advice as you work. Thus, the more you push, the easier it will be for you, because you’ll get more attention from me. This video is a good tutorial on Git.
When you do an assignment, you’ll create various files and commit them to your repository. Each assignment should have its own directory named code with all of its files in that directory.
Your main file should be named "main.EXT" where "EXT" is the appropriate extension. (For example, the Basic Racket assignment should be "basic/main.rkt".)
Every programming assignment should come with a text file containing the expected output of the program named "output.txt".
Every programming assignment should come with a "Makefile" that, when invokes with no arguments, produces an output text file named "actual.txt" and then displays the difference between this file and "output.txt" using diff -u.
Every programming assignment should come with a file named "README.txt" or "README.md". This prose document should explain how you know that your program is correct. Generally, the only acceptable argument is one based on connecting each part of the program specification to one or more test cases that verify that the program meets the specification. Almost all students receive 0s in their first few assignments because they do not adequately test their code or explain why their tests are good. Most of the later assignments require over one hundred tests to adequately verify.
Every written assignment should only contain the main file with an extension of either ".txt" or ".md", depending on whether you would like to use formatting.
For all types of assignments, only plain-text files in UTF-8 encoding with 80 column lines are accepted with Unix (\n) line endings. If you would like use formatting in writing, please use Markdown.
You turn in your assignments by tagging a revision on Bitbucket and then emailing me a link to the tag. Both of these things should be done before 6PM Lowell time on the due date listed. If either is late (even by a single second), it will not be graded. This is a real due date and due time. Please use this early due time to get a good night’s sleep and enjoy your evenings.
You should tag the revision with code of the assignment. You should email the link to me with [CS301] code as the subject (exactly), where code is the code listed on the assignment table under the Code column. Do not send multiple emails and do not make multiple tags.
Your email should contain nothing else in it.
Turn-ins that are not in the correct format will not be graded and you will get a 0 on the assignment. This precise format must be followed exactly or it will not be sorted correctly by my grading organization program.
All assignments will receive a grade from the closed interval between 0 and 1.
Your grade will start off at 1 and I will subtract 0.05 for every error or when a part of the specfication is unverified. For example, in the Higher-order Functions assignment, there are 12 functions that you have to write and it takes about three or four tests per function to verify its correctness, so there are about 48 instances where you could lose 0.05 points. Later assignments have many many more such instances.
I will take your various points and combine them with this function to get a numeric grade:
> (define easy 0.05) > (define med 0.1) > (define hard 0.2)
> (define (combine ; Required Assignments lists rinterp-java wlang1 gsurvey wgc gc webgsurvey typei wtype lazy wlang2 ; Optional Assignments basic hof xinterp wcont typec wlazy prolog) (+ (+ (* easy lists) (* med rinterp-java) (* hard wlang1) (* easy gsurvey) (* med wgc) (* hard gc) (* easy webgsurvey) (* hard typei) (* med wtype) (* easy lazy) (* hard wlang2)) (+ (* easy basic) (* easy hof) (* med xinterp) (* med wcont) (* med typec) (* med wlazy) (* hard prolog))))
> (combine 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0)
> (combine 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0)
> (combine 1.0 1.0 0.0 1.0 1.0 1.0 1.0 0.5 1.0 0.5 1.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0)
> (combine 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0)
These weights are designed so that a "normal" good student will get 1.0. I assume that a normal student will not get 1.0 on all assignments, so the required assignments are weighted to add up to more than 1.0.
A wise student would do the Basic Racket and Higher-order Functions assignments no matter what to better learn to use Racket. Similarly, a wise student would do Type Checker, because it is so close to Type Inferrer, which is a required assignment. The others are just for particularly excited students. The best assignment for becoming an elite PL wizard is Prolog.
> (convert-to-letter 1)
> (convert-to-letter 0.94)
> (convert-to-letter 0.899999)
> (convert-to-letter 0.81)
> (convert-to-letter 0.74)
> (convert-to-letter 0.6999999)
> (convert-to-letter 0.62)
> (convert-to-letter 0.57)
My job is to help you.
If you need a "shallow" amount of help, then look at the Google Group. First, see if I have already answered your question. Then, send your own email.
Only send me personal email if you need to talk about something private, such as your grades. Anything else is best discussed in public, so others can benefit. If you do send personal email, put [CS301] as a prefix in the subject.
If you need a "deep" amount of help, please come to my office or call me (801-361-0732) and we’ll talk and try to resolve whatever ails you.
If you are having trouble knowing what library functions will be useful in Racket, read the following sections of the Guide to Racket: Racket Essentials, Symbols, and Pairs and Lists. Late in the course you will find Continuations, Web Interaction, and Pattern-Based Syntax Matching useful.
If you are having trouble knowing where to start, use the design recipe from How to Design Programs.
DrRacket comes with an extensive manual and help system. The documentation is available by clicking the Help|Help Desk menu item. This will open up a browser window to your local copy of http://docs.racket-lang.org. Use the search box to find function and syntax documentation. (Everything the search box returns is clickable.)
PLAI. Most assignments are written with a library specifically designed for this class. It is documented in a separate manual that is available by clicking the plai in the #lang instructions for each assignment. Try it:
(HTDP) In the beginning of the course, we will use the free online textbook How to Design Programs, by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi, to introduce the Racket programming language.
(PLAI) For the majority of the course, we will use the second edition of the free online textbook Programming Languages: Application and Interpretation, by Shriram Krishnamurthi. (In one instance, we will use the first edition.)
(Wilson) Eventually we will look at Paul Wilson’s survey of Garbage Collection methods later in the course.
We will not be using the textbook in the traditional way. Think of the textbook as your lecture notes. Don’t read it before a class, but refer to it afterwards. The book is superb, so you won’t need to distract yourself from the discussion by taking copious notes. (You may want to take note of your ideas and insights, but the content of the lecture will be in the textbook.)
We will use DrRacket v6.6 (or higher) for many programming assignments. Do not use an older version of DrRacket!
We will use three language extensions: Basic Student, Intermediate Student with Lambda, Typed PLAI, and PLAI.
To use Basic Student: Open DrRacket. From the Language menu, click Choose Language.... Expand How to Design Programs. Select Basic Student. Click OK.
To use Intermediate Student with lambda: Open DrRacket. From the Language menu, click Choose Language.... Expand How to Design Programs. Select Intermediate Student with Lambda. Click OK.
To use PLAI: Open DrRacket. From the Language menu, click Choose Language.... Select the Determine language from source. Type this at the beginning of your program:
The textbook and lectures uses another language called Typed PLAI, but we won’t use it for assignments.
To install Typed PLAI: Open DrRacket. From the File menu, click Install Package and type plai-typed.
To use Typed PLAI: Open DrRacket. From the Language menu, click Choose Language.... Select the Determine language from source. Then you can copy in the code from the book or class.
Finally, I’d like you to do all your work on a Bitbucket repository that you share with me, so make sure you get yourself set up with that.
In this course, all work is to be each student’s own. Students should therefore be familiar with the University’s rules on academic dishonesty, which can be found in the Bulletin of Undergraduate Studies and in the Schedule of Classes. In particular, plagiarism will not be tolerated! Any student caught plagiarizing another’s work will automatically receive a grade of F for the course. If you are unsure as to what constitutes plagiarism, it is your responsibility to check with the instructor. Other forms of dishonesty will result in similar actions. You may collaborate with your classmates on the design and results of the programs you will write in this course, but each student must implement these programs alone. Submission of shared student code is not permissible, and will result in a grade of F for the course. Help files are typically provided for each programming assignment, and students are encouraged to cut and paste useful code from these help files into their assignment submissions, but all other code must be the specific work of each student.
You are not allowed to post solution code to problem sets assigned in this class in public places (e.g. Github). This includes your own solutions as well as solutions that may be provided by the instructors. This policy is a courtesy to future students, who — to the fullest extent possible — should have the opportunity to struggle with the problems in the same way that you do. Non-compliance will be pursued rigorously per UMass Lowell’s academic integrity policy.