CS245: Principles of Programming Languages

Bryn Mawr College, Fall 2016
Department of Computer Science
Professor Douglas Blank

1. Overview

An introduction to a wide range of topics relating to programming languages with an emphasis on abstraction and design. Design issues relevant to the implementation of programming languages are discussed, including a review and in-depth treatment of mechanisms for sequence control, the run-time structure of programming languages and programming in the large. The course has a strong lab component where students get to construct large programs in at least three different imperative programming languages.

Focus this semester: the course will be divided into these goals:

  1. learn Python
  2. learn Scheme
  3. compare and contrast Python and Scheme language constructs
  4. implement Scheme in Python
  5. implement Python in Scheme
  6. design, build, and run your own language

1.1 General information:

Course website: http://cs.brynmawr.edu/cs245
Class: Mondays and Wednesdays, 2:40pm-4:00pm, Park Science Building, Room 336
Lab: Thursdays 10:10am-11:00pm, Park Science Building, Room 230
Professor: Douglas Blank, http://cs.brynmawr.edu/~dblank/
Email: dblank@cs.brynmawr.edu
Office: Park Science, Room 248
Office phone: (610)526-6501
Office hours: Tuesdays, 10am-noon
Course Management System: https://moodle.brynmawr.edu/course/view.php?id=3230

2. Resources

We will use the following resources for this course:

  1. Jupyter on Athena at Bryn Mawr College: https://athena.brynmawr.edu
  2. The Scheme Programming Language, fourth edition, by Kent Dybvig. Available online: http://www.scheme.com/tspl4/
  3. Handouts and outside readings that will be distributed in class and through Moodle
  4. Notebooks
  5. Labs

To access the lab assignments, you need to do this once, in a notebook:

%%file nbgrader_config.py

c = get_config()
c.NbGrader.course_id = "cs245"
c.TransferApp.exchange_directory = "/opt/nbgrader/exchange/"

and this:

! nbgrader extension activate

At that point, an Assignments tab will open up in the Jupyter dashboard.

3. Schedule

3.1 Calendar

      October               November              December        
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
                   1         1  2  3  4  5               1  2  3  
 2  3  4  5  6  7  8   6  7  8  9 10 11 12   4  5  6  7  8  9 10  
 9 10 11 12 13 14 15  13 14 15 16 17 18 19  11 12 13 14 15 16 17  
16 17 18 19 20 21 22  20 21 22 23 24 25 26  18 19 20 21 22 23 24  
23 24 25 26 27 28 29  27 28 29 30           25 26 27 28 29 30 31  
30 31

3.2 Weekly Plan

Date Topic
Week 1
Aug 29, Mon Introductions and Overview
Aug 31, Wed Chapter 2: Python
Sep 1, Thu Lab: Lab01: Python
Week 2
Sep 5, Mon Labor Day: No classes
Sep 7, Wed Python. Introduction to Python
Sep 8, Thu Lab: Python Exam; assign Lab02: Scheme
Week 3
Sep 12, Mon Scheme. Thinking Recursively
Sep 14, Wed Scheme. Summary of Basic Scheme
Sep 15, Thu Lab: No lab meeting (Doug out of town); Scheme Exam; assign Lab03
Week 4
Sep 19, Mon Adding Functions and Variables to S-Calc
Sep 21, Wed Compare and Contrast
Sep 22, Thu Lab: Lab04
Week 5
Sep 26, Mon Implementing Scheme in Python. Derivation of the Y-Combinator
Sep 28, Wed Implementing Scheme in Python
Sep 29, Thu Lab: Lab05
Week 6
Oct 3, Mon Implementing Python in Scheme
Oct 5, Wed Implementing Python in Scheme Adding Functions and Variables to S-Calc
Oct 6, Thu Lab: Lab06
Week 7: Fall Break
Oct 10, Mon No class
Oct 12, Wed No class
Oct 13, Thu Lab: No lab meeting
Week 8
Oct 17, Mon Calysto Scheme
Oct 19, Wed Type Inference
Oct 20, Thu Lab: Lab07
Week 9
Oct 24, Mon SLLGen Parser
Oct 26, Wed Parsing in Python
Oct 27, Thu Lab: Lab08: Project proposals
Week 10
Nov 7, Mon Exam
Nov 9, Wed Work on project
Nov 10, Thu Lab: Lab09
Week 11
Nov 14, Mon Hand back exams. Dynamic vs. Lexical Scope
Nov 16, Wed Lexical Address
Nov 17, Thu Lab: work on project
Week 12
Nov 21, Mon Continuation-Passing Style
Nov 23, Wed No class
Nov 24, Thu Lab: No lab meeting
Week 13
Nov 28, Mon Streams
Nov 30, Wed Tail-Call Optimization
Dec 1, Thu Lab: work on project
Week 14
Dec 5, Mon Project Presentations
Dec 7, Wed Project Presentations
Dec 8, Thu Lab: no lab meeting

3.3 Important Dates

  • Classes Begin (Bryn Mawr & Haverford), Monday, August 29, 2016
  • Labor Day: No Classes, Monday, September 5, 2016
  • Registration Ends, Wednesday, September 7, 2016
  • Fall Break begins after last class, Friday, October 7, 2016
  • CR/NC Sign Up Deadline (Semester Long Courses), Friday, October 7, 2016
  • Fall break ends, Sunday, October 16, 2016
  • Spring 2017 Preregistration Begins, Monday, November 14, 2016
  • Spring 2017 Preregistration Ends, Friday, November 18, 2016
  • Thanksgiving Break (begins after last class), Wednesday, November 23, 2016
  • Thanksgiving Break ends, Sunday, November 27, 2016
  • Last Day of Classes, Thursday, December 8, 2016
  • Reading Day, Friday, December 9, 2016
  • Self Scheduled Exams Begin, Saturday, December 10, 2016
  • Exams End at 12:30pm, Friday, December 16, 2016
  • Fall 2016 Final Grade due (by noon), Tuesday, January 3, 2017

4. Grading

Final grades will be calculated as a weighted average of all grades according to the following weights:

  • Python Exam: 10% (mastery: retake until satisfied)
  • Scheme Exam: 10% (mastery: retake until satisfied)
  • Labs: 45%
  • Final Exam: 20%
  • Project: 15%