Principles of Programming Languages
CSE 307 - Fall 2009
Announcements
- November 21, 2009
- Bonus Assignment is now available and gradeable, if you dare attempt it.
- November 17, 2009
- Assignment 4 is now gradeable.
- November 10, 2009
- Assignment 4 is now available.
Description
This course introduces programming language design and
implementation. We will discuss the major programming paradigms and
the language features that comprise these paradigms. We will discuss
how language features are mapped onto computer hardware. Rather than
focus on any particular language, we will give students a broad
foundation, to help prepare them to deal with the many programming
languages they may encounter over the course of their career.
Students will given programming assignments that require them to
implement and use the language features discussed in the class.
Prerequisites: CSE 219 or CSE 260; CSE220. | Credits: 3. | Official description.
Instructor: Tom Rothamel, rothamel@cs.sunysb.edu, +1 631 627 1211 | Office hours: Computer Science 1434, Tuesday and Thursday, 2:30 - 4:00 PM
TA: Spyros Hadjichristodoulou, shadjichrist@cs.sunysb.edu, +1 631 988 2671 | Office hours: Computer Science 2110, Monday and Friday, 11:00 AM - 12:30 PM
Lectures: Tuesday and Thursday, 12:50 - 2:10 PM, Earth & Space 131
Textbook: Programming Language Pragmatics by Michael Scott. Third Edition, Morgan Kaufmann Publishers, 2009.
Grading: There will be two exams, a midterm worth 20% and a final worth 30%. Programming assignments will comprise the other 50% of the grade. Quizzes, if given, will be used to help interpret numeric grades.
Late work: Late assignments will be penalized at a rate of 25% per day.
Web presence: The course homepage (http://www.cs.sunysb.edu/~rothamel/cse307/) will be used for announcements. Our blackboard forum can be used discussion and asking questions.
Topics
This course will cover the following topics, in the order given. With
the exception of the first, these correspond to chapters in
Programming Language Pragmatics.
- Introduction to Python Programming
- Syntax, Lexical Analysis, and Parsing
- Abstract Syntax, Semantics, and Interpretation
- Names, Scopes, and Bindings
- Control Flow
- Data Types
- Subroutines and Control Abstraction
- Functional Languages
- Logic Languages
- Concurrency
- Scripting Languages
Schedule
- Tuesday, September 01, 2009:
- Lecture 1: Introduction. Why so many PLs? Families of languages. Compilation and Interpretation. Programming environment. Overview of compliation. (Chapter 1)
- Thursday, September 03, 2009:
- Lecture 2: Introduction to Python I. Getting and Running Python. Simple Expressions. Control Flow. Data Structures. (Reading: Python 2.6 Tutorial)
- Tuesday, September 08, 2009:
- Lecture 3: Introduction to Python II. More Data Structures. List comprehensions. Functions. Modules. Input/Output.
- Thursday, September 10, 2009:
- Lecture 4: Introduction to Python III. Classes. Exception Handling. Generators
- Tuesday, September 15, 2009:
- Lecture 5: Parts of a Compiler/Interpreter (Chapter 1.6). Specifying Syntax (2.1). Scanning (2.2). Perl-Style Regular Expressions.
- Thursday, September 17, 2009:
- Lecture 6: Parsing (Chapter 2.3, skip 2.3.2 and 2.3.2). Top-down parsing. Recursive descent parsers. TPG.
- Tuesday, September 22, 2009:
- Lecture 7: Review of Project 1, Names, Scopes and Bindings. Binding Time (Chapter 3.1). Object Lifetime and Storage Management (3.2).
- Thursday, September 24, 2009:
- Lecture 8: Project 2 Announced. Object lifetime cont. Scope rules (Chapter 3.3). Names within Scope (3.5). Binding Reference Environments (3.6).
- Tuesday, September 29, 2009:
- No Class - Classes follow Monday Schedule
- Thursday, October 01, 2009:
- Lecture 9: Macro Expansion (Chapter 3.7). Semantic analysis and Attribute Grammars (4).
- Tuesday, October 06, 2009:
- Lecture 10: Assignment 2 hints. Attribute Grammars. Semantics. (Chapter 4). Control flow introduction. (6)
- Thursday, October 08, 2009:
- Lecture 11: Expressions (Chapter 6.1). Structured and Unstructured Flow (6.2). Sequencing (6.3). Selection (6.4).
- Tuesday, October 13, 2009:
- Lecture 12: Iteration (Chapter 6.5). Recursion (6.6). Type systems (7.1)
- Thursday, October 15, 2009:
- Lecture 13: Type checking (Chapter 7.2). Type judgements. Records and Variants (7.3). Arrays (7.4). Strings (7.5). Maps and Sets (7.6).
- Tuesday, October 20, 2009:
- Lecture 14: Stack layout (Chapter 8.1). Parameter Passing (8.2).
- Thursday, October 22, 2009:
- Midterm Review
- Tuesday, October 27, 2009:
- Midterm
- Thursday, October 29, 2009:
- Lecture 15: Generic subroutines (Chapter 8.4). Object Oriented Programming (9.1).
- Tuesday, November 03, 2009:
- Lecture 16: Encapsulation and Inheritance (Chapter 9.2). Initialization and Finalization (9.3). Multiple Inheritance (9.5).
- Thursday, November 05, 2009:
- Lecture 17: Implementing Objects. Dynamic Method Binding (Chapter 9.5). Garbage Collection (7.7.3, 9.3.4).
- Tuesday, November 10, 2009:
- Lecture 18: More on Garbage Collection. History of Functional Programming (Chapter 10.1). FP Concepts (10.2). Lambda Calculus (10.6.1). Scheme (10.3).
- Thursday, November 12, 2009:
- Lecture 19: Scheme (Chapter 10.3). Evaluation Order (10.4). Pure functions.
- Tuesday, November 17, 2009:
- Lecture 20: Evaluation order continued (Chapter 10.4). Monads (10.4). Currying (10.5). Higher-Order Functions (10.5).
- Thursday, November 19, 2009:
- Lecture 21
- Tuesday, November 24, 2009:
- Lecture 22
- Thursday, November 26, 2009:
- No Classes - Thanksgiving
- Tuesday, December 01, 2009:
- Lecture 23
- Thursday, December 03, 2009:
- Lecture 24
- Tuesday, December 08, 2009:
- Lecture 25
- Thursday, December 10, 2009:
- Final Exam Review
- Thursday, December 17, 2009:
- Final Exam (5:15-7:45 PM)
Assignments
Assignments are due at 10 PM, Eastern Time, on the date given.
The following resources might be useful for your projects:
Policy
Academic integrity: All assignments, quizzes, and exams must be done individually, unless specified otherwise; you may discuss ideas with others and look up references, but you must write up your solutions independently and credit all sources that you used. It is your responsibility to ensure that your work remains secure. Any plagiarism or other forms of cheating discovered will have a permanent consequence in your university record.
Each student must pursue his or her academic goals honestly and be personally accountable for all submitted work. Representing another person's work as your own is always wrong. Any suspected instance of academic dishonesty will be reported to the Academic Judiciary. For more comprehensive information on academic integrity, including categories of academic dishonesty, please refer to the academic judiciary website.
Disability: If you have a physical, psychological, medical or learning disability that may impact your course work, please contact Disability Support Services, ECC (Educational Communications Center) Building, room 128, (631) 632-6748. They will determine with you what accommodations, if any, are necessary and appropriate. All information and documentation is confidential.
Students who require assistance during emergency evacuation are encouraged to discuss their needs with their professors and Disability Support Services. For procedures and information go to http://www.ehs.sunysb.edu and search Fire Safety and Evacuation and Disabilities.
Critical Incident Management: Stony Brook University expects students to respect the rights, privileges, and property of other people. Faculty are required to report to the Office of Judicial Affairs any disruptive behavior that interrupts their ability to teach, compromises the safety of the learning environment, or inhibits students' ability to learn.