CSE 307 Principles of Programming Languages

Spring 2015

Course Description Grading Schedule Instructor/TA Texts Lecture Notes Special needs

Course Description

Unlike courses that teach a specific programming language, CSE 307, "Principles of Programming Languages,'' is a course about programming languages. It is primarily concerned with the following questions:

CSE 307 will address all these questions to some extent. It will cover the organization of programming languages, emphasizing language design concepts and runtime implementation, and study of major features of various programming languages. "Organization" means how the features of programming languages may be combined to form a unified whole. "Language design concepts" includes principles of good design (both technical and aesthetic), styles of programming (such as object-oriented, functional and logic programming paradigms), the interactions among various features, and the costs of implementing various features. "Run time implementation" means the data structures and algorithms used to implement interpreters and compilers. This offering of CSE 307 will focus on functional and object-oriented programming and major features of programming languages.

Programming Languages and Course Software

This course has some programming content, although it is not a project-intensive course. Most of the programming will be done in Objective CAML (OCaml) and SWI Prolog. Compilers and tools for these languages are available in the Transaction Lab (Windows), and can also be downloaded and installed from these links.

There is also a website that gives you a simple IDE and a command shell for running OCaml. I have not tested it much, so make sure that if you use that web site, you save copies of your files locally.

Objectives

At the end of this course, a student should have a deep, working knowledge of the key concepts, features and ideas used in modern programming languages. More specifically, the expected outcomes of this course are:

In addition to these basic skills, the concepts you learn in this course will be useful in many other ways, some of which are listed below:

Lecture Notes:

I will make every effort to post the slides in advance of the lectures. Students may find it helpful to print the slides in advance and bring them to the class. This way, you can take notes on top of the slides, so that you can recall some of the important points made (or explained) in the lecture.

Beyond the slides used in the lectures, there are additional notes included below on many topics. These notes, often in plain text format, closely follow the lectures slides in most cases, while providing a bit more context, and in some cases, substantive additional examples and illustrations. Some of the notes discuss new material that is not in the slides --- for instance, you should read this document, as it can help a great deal in terms of helping you become fluent in functional programming: Functional Programming for Imperative Programmers. Also check out this simple Prolog interpreter written in OCaml. You can look at the code to (a) get a better understanding of how Prolog evaluation works, (b) play around with the interpreter, and (c) get better feel for programming in OCaml.

# Topic Slides Addl.
Notes
Textbook
Chapter or Sections
    View Print   2nd edition 3rd edition
1 Introduction and History 1-up 3-up   1, 2, 3 1, 2
2 Functional Programming with OCAML 1-up 3-up pdf 11 3
3 Syntax 1-up 3-up   4 6
4 Values and Types 1-up 3-up txt 6 8
5 Names, Scopes and Bindings 1-up 3-up txt 5.1 to 5.4 7.1 to 7.4
6 Variables and Constants 1-up 3-up txt 5.5 to 5.7 7.5 to 7.7
7 Expressions 1-up 3-up txt 5.5 to 5.7 7.5 to 7.7
8 Control Statements 1-up 3-up txt 7.1 to 7.4 9.1 to 9.4
9 Procedures and Parameter Passing 1-up 3-up txt 8.1 to 8.3 10.1 to 10.3
10 Exceptions 1-up 3-up txt 7.5 9.5
11 Runtime environments 1-up 3-up txt 8.4 to 8.6 10.4 to 10.6
12 Logic Programming 1-up 3-up   12 4
13 Modules and Encapsulation 1-up 3-up   9.1 to 9.3 11.1 to 11.3
14 C++ Language 1-up 3-up      
15 Object-Oriented Programming 1-up 3-up txt 10 5
16 Implementation of OO-Languages 1-up   10 5
17 Course Review 1-up 3-up      

Prerequisites

CSE 219 or CSE 260; CSE 220; CSE major or permission of instructor

Textbook:

Programming Languages Principles and Practice, 2nd edition (2003)
Kenneth C. Louden
Thomson - Brooks/Cole
ISBN 0-534-95341-7
Resources page maintained by the author, including errata list.

Alternate Text

I recommend the second edition because I can find it for a fraction of the cost of the third edition. However, any student that has a hard time finding the recommended text can use the alternate text below, which is just the newer edition of the recommended text. For the purposes of this course, the contents of the two editions are nearly identical, but I prefer the second edition because of slightly better coverage of one topic --- implementation of object-oriented languages.

Programming Languages Principles and Practice, 3rd edition
Kenneth C. Louden and Kenneth A. Lambert
ISBN 1-111-52941-8

Online References

Introduction to OCaml (online, PDF), Jason Hickey

Grading

Grading will be based on exams (60%) and homework and programming assignments (40%). However, your final grade cannot be more than 1-point above the minimum of the grades you receive for homeworks or exams. For instance, if your homework grade is a C+, then your final grade can at most be a B+, even if you aced all your exams.

Homeworks are due by 11:59pm on the specified date. However, we do not intend to penalize students for delays lasting up to 3 hours. Work submitted more than 3 hours late will likely receive a zero credit. However, every student is permitted to skip one assignment in a semester in order to accommodate unforeseen circumstances. Use this "pass" wisely, because you can get only one such pass.

Any form of copying in the course, and all forms of academic dishonesty, are considered serious offenses, and will be prosecuted to the maximum extent permitted by university policies. The minimum penalty for any form of copying, whether from your friends, the Internet or outside sources, or from previous offerings of the course, will be an F-grade. Note that it is a "one strike and you are out" policy, i.e., you end up with an F-grade regardless of how well you have done in the course until then. There will be no exceptions.


Instructor:

R. Sekar
Office: 2313E Computer Science
Office Hours: Mon/Wed 2:50pm to 3:50pm

TAs:

Muthukumar Suresh (msuresh at cs.stonybrook.edu)
Office Hours: Tuesday 4:00 to 5:00pm, Friday 12:00 to 1:00pm at CS 2110

Riccardo Pelizzi (rpelizzi at cs.stonybrook.edu)
Office Hours: Wednesday, Thursday 1:00 to 2:00pm at CS 2321 (Secure Systems Lab)


Schedule:

Lecture time/location: Official meeting time for the course is Mon/Wed at 4:00pm to 5:20pm at 317 Frey Hall.

Approximate Dates for Exams:

Mid-term I:Monday, March 23, Frey 100, 4pm to 5:20pm

Mid-term II:Friday, April 17, Frey 100, 10am to 11:55am.

Last lecture: May 6

Final Exam: May 12, Tuesday, 8:30pm to 11:00pm, Engineering 145


Special Needs

If you have a physical, psychological, medical or learning disability that may impact on your ability to carry out assigned course work, please contact the staff in the Disabled Student Services office (DSS), in the ECC building. DSS will review your concerns and determine, with you, what accommodations are necessary and appropriate. All information and documentation of disability is confidential.