Welcome to CSCI 3366 Principles of Programming Languages. This course sits at the intersection of computer science theory and computer systems. In this course we'll study the design, specification and implementation of programming languages. This is a rigorous, hands-on course that follows the learn-by-doing philosophy. Students will learn about programming languages by implementing a sequence of successively more expressive languages. Two major subplots are: 1. to give you better insight into the nature of software and the software engineering process, and 2. to reduce the time it will take you to develop a deeper understanding of the programming languages and systems that you might be using.

Good program design methodology will be stressed throughout the course. There will also be a study of some of the basic notions of computer science, including computer systems organization, files, and some algorithms of fundamental importance.

The main goal of the course is to help the student develop an understanding of programming language structure and implementation. Students will learn how various language features are implemented and learn some of the trade-offs of using various features.

CSCI 3366 has three 50-minute lectures each week. Lectures will be held on Mondays, Wednesdays and Fridays at 2PM in Fulton Hall 415. Attendance at the lectures is important, as all new material will be presented there. **NB: Laptops are not allowed in lecture. If you have special circumstances that require you to bring one, please see me.**

Please bookmark the course homepage:

` ``http://www.cs.bc.edu/~muller/teaching/cs3366/s17/`

We'll use this site fairly heavily throughout the semester and some of the course materials will be distributed through this site. Problem sets will be posted on GitHub and will be submitted via GitHub repositories. **If you don't already have a GitHub account, please make one.** Note that we will not have a course homepage on Canvas but we will post grades on the Canvas gradebook.

**Instructor:** Robert Muller
robert dot muller at bc dot edu
**office**: St. Mary's Hall Rm S277
**hours**: Mondays 3PM - 4:30PM, Tuesdays 10AM - 11:30AM
617-552-3964.

**Teaching** **Assistant**: Alden Frost
frostaa at bc dot edu
**office**: Fulton 160
**hours**: Wednesday 11AM - 2PM.

Problem sets will be assigned weekly. Unless otherwise specified, all problem sets are due at 11:59PM on the specified due date. The single best indicator of success for computer science is starting problem sets early.

Problem sets should be submitted for grading by uploading an appropriately named zip file through the course Canvas web site. (As linked from the course home page.) Problem sets cannot be submitted as email attachments. Attempts to submit problem sets as email attachments will not receive an email reply indicating that the attempted submission failed.

Wk | of | Topic | |
---|---|---|---|

1 | 1/15 | Introduction and Overview; Design, Specification and Implementation; Reliability & Efficiency; Language Implementation Overview; System Configuration; Introduction to OCaml | |

2 | 1/22 | Getting up to speed in OCaml. Sum types and branching; records, lists, functions, repetition. | |

3 | 1/29 | Mercury | Syntax, context-free grammars; parsing: bottom-up parsing; top-down recursive descent parsing, Early's algorithm, parser generators, derived forms. |

4 | 2/5 | Natural semantics, Implementing a simple REPL | |

5 | 2/12 | Venus | Variables, binding & scope, block structure, substitution & environments; static semantics & type safety. First Midterm Exam |

6 | 2/19 | More on Venus: evaluation order: call-by-value & call-by-name. | |

7 | 2/26 | Earth | First-order recursive functions; structured types; static & dynamic semantics, natural deduction |

3/5 | SPRING BREAK | ||

8 | 3/12 | Models of Polymorphism; parametric polymorphism, type inference, subtyping. | |

9 | 3/19 | Mars | More on polymorphism, function values. |

10 | 3/26 | Second Midterm Exam | |

11 | 4/2 | Jupiter | Imperative Languages, compiling |

12 | 4/9 | More on compiling; | |

13 | 4/16 | module systems | |

14 | 4/21 | Survey of recent PLs: Rust, Go, Agda | |

15 | 4/28 | Review and Wrapup |

There will be two midterm exams and a final exam. The exams are in-class and are closed notes and closed book. You will have 50 minutes to complete each midterm, and 2 hours to complete the final. If you require extra time for documented reasons, please let us know.

**First****Midterm**: around week 5;**Second****Midterm**: around week 10;

**Final Exam**: TBA.

There are no required textbooks for the course but there are several books recommended on the course homepage. We'll use extensive code and lecture notes which will be posted to the course web site.

The course is graded on a 200 point scale. You are granted 10 points gratis. Your grade for this class will be a combination of your homework, exam, and participation work. Participation is largely based on effort (not correctness). Final grades will be computed, roughly as follows:

- 7 problem sets, in total these account for 90 points;
- two midterm exams, each for 20 points;
- a final exam, 40 points;
- class and piazza forum participation, together, these account for the remaining 20 points.

Your lowest problem set score will be replaced by the average of all 7 scores.

**Important**! If you fail one of 1. - 3., you will fail CSCI 3366, even if your weighted-average scores are mathematically above the passing threshold.

Problem sets are due on the day indicated at 11:59PM. **This is a strict deadline**. Homework submitted at 5:01PM is one day late as is homework submitted 23:59 late. Late homework is penalized 20% per 24-hour period. In the case of medical exigencies, students may petition the the Instructor for an extension. Medical problems or family emergencies are the only conditions under which extensions will be granted.

All solutions and code should be produced by you alone, or by you and a partner, where appropriate. For pair-programmed assignments, each partner needs to submit the assignment and each needs to acknowledge the other partner when submitting.

You may discuss algorithms at a high level with any student in the class. You may also help any student find a small bug in their code. However, you may not copy solutions from anyone, nor should you collaborate beyond high-level discussions with anyone who is not your partner. For pair programming problems, you must follow the guidelines given above.

If you have any questions about what behavior is acceptable, it is your responsibility to come see one of the instructors before you engage in this behavior. We are more than happy to answer any questions you may have.