Programming Languages
G22.2110.01
Summer 2010
Course Outline
This outline is subject to change, but should give you some idea of what will
be covered and when. You will notice that there are fewer outline points than
classes. This is because some of the lectures will expand into more than one
class.
- Programming languages overview. Syntax and semantics.
Context-free grammars.
Readings: Scott, ch 1 - 2.2.1
Lecture Slides
- Imperative languages. Scoping and simple control
structures: loops, conditionals, case statements.
Readings: Scott, ch 3.1 - 3.4 and 6.1 - 6.5
Lecture Slides
- Subprograms: functions and procedures. Parameter passing. Nested
procedures. First-class and higher-order functions. Implementation
issues.
Readings: Scott, ch 6.6, 8.1 - 8.3
Lecture Slides
- Functional programming. Overview of the lambda calculus and
Scheme.
Readings: Scott, ch. 10 (including 10.6.1 on the CD)
A short introduction to the Lambda Calculus (from the University of Birmingham)
Lambda-calculus lecture notes (from Brown University)
Scheme
standard
How to Design Programs
Lecture Slides
Homework #3
Program #1
Sample implementations of numMatches for Program #1
- Data types and representation. Typing: strong vs. weak, static
vs. dynamic. Type declarations, type equivalence, type inference.
Subtypes and derived types. Scalar and composite types (arrays,
records, variant records). Pointers and references.
Readings: Scott, ch 7
Lecture Slides
- Overview of ML. Pattern matching, type inference, data types,
pattern matching.
Readings: Paulson, ch. 2 - 6
ML
tutorials
Lecture Slides
Program #2
- Program structure: Modules, packages, and interfaces. Abstract
types and information hiding.
Readings: Scott ch 3.3.4-3.3.5, 3.7, Stroustrup ch. 8-9, Arnold ch. 13, Paulson ch 7.
Lecture Slides
-
Object oriented programming: objects, classes, data and function
members, constructors/destructors. OOP in C++ and Java, objects vs
closures, classes vs datatypes, OO pitfalls.
Readings: Scott ch. 7.7, 9 (can skip 9.6.1), Stroustrup ch. 10, 12, 15.2
Lecture Slides
- Generic programming and templates in C++, Java, and ML. Containers
and iteration.
Readings: Scott ch. 8.4, Stroustrup ch. 13, 18.
Lecture Slides
- Exception handling. Continuations. Concurrent programming: threads, tasks,
synchronization, communication. Concurrency in Ada and Java.
Readings: Scott ch. 8.5, 12, Barnes ch. 18., Arnold ch. 12,
14, Stroustrup ch. 8.3
Lecture Slides
Extra stuff:
- Dynamic allocation and garbage collection: mark/sweep, copying, reference counting.
Slides