Programming Languages
G22.2110
Thursday 7:00-9:00
Room 109, Warren Weaver Hall
Recitation: Monday 6:00-7:00, WWH 109
Professor Ernest Davis
Reaching Me
- phone: (212) 998-3123
- office: 429 Warren Weaver Hall
- office hours: Monday, Wednesday 11:00-1:00, or by appointment.
- Email:
Prerequisites: None.
Textbook:
Programming Language Pragmatics, 2nd Ed.
by Michael Scott,
Morgan Kaufman, 2005
Languages to be discussed
C++, Java, Ada, Scheme, ML.
Topics
- Syntax
- Scoping
- Control Flow
- Types
- Procedures and parameters
- Exceptions
- Object oriented programming
- Classes and inheritance
- Concurrency
- Functional programming
Requirements
Problem sets (30%)
Programming assignments in Java, C++, Ada, and Scheme (30%)
Final exam (40%)
Class email list
Link to
the class email web page and follow the instructions there for
subscribing.
Teaching Assistant
The teaching assistant will be Abhijit Guria, x8-3277, 1015 715 Bway,
email: lastName at cs.nyu.edu. He will hold office hourse 4:00-5:00 Mondays
and by appointment.
Lecture Notes and Readings
Introduction. Syntax. Scott, chap.
1, chap 2 through sec. 2.1.
Statement level control structures.
Scott, Chap. 6 through sec 6.5 except 6.5.3.
Memory Allocation.
Scott, Chap 3 through sec 3.2; p. 354-356 (for semi-dynamic arrays);
pp. 383-386 (for garbage collection).
Names and Scope.
Scott chap 3, sections 3.1, 3.2,
3.3 except 3.3.4 and 3.3.5 on modules.
Types. Scott chap 7, sections 7.1-7.4 and
7.7.
Parameter Passing . Scott,
Chap. 8 through 8.3 except the discussion of closures p. 424.
Modules and OOP. Scott, chap. 9 except
9.4.4 and 9.4.5, and section 14.6 (pp. 781-784) on linking.
Generics. Scott, section 8.4. Also
Generics in the Java Programming Language by Gilad Bracha.
Exceptions. Scott, section 8.5.
Concurrency. Do not attempt Scott chap. 12,
unless you are really eager for a challenge.
Passing Functions as Parameters
Scheme.
Scheme continued.
ML
ML Datatypes
Recursion
Notes on Ada
Sample Code
applier.java
applier2.java
TestVisitor.java
TestInterface.java
TestOverload.java
TestOverload1.java
GenericApplier.java
sample1.cpp Basic C++ program
sample2.cpp Passing a Function as
an Argument
applier.cpp Template
intBinarySearchTree.cpp
Integer Binary Search Tree: A simple class definition
sizedBinarySearchTree.cpp Sized Binary Search Tree: Derived classes
binarySearchTree.cpp Binary Search Tree: Template
generalBinarySearchTree.cpp General Binary Search Tree: Combining a
Template with a Derived Class
Sample Ada Programs
Assignments
Problem Set 1 due Feb. 7.
Problem Set 2 due Feb. 21.
Problem Set 3 due Mar. 6.
Java Programming Assignment Due Mar. 13.
C++ Programming Assignment Due April 10
Ada Programming Assignment Due April 17
Scheme Programming Assignment Due May 1
ML Types assignment NOT TO HAND IN.
Reference Materials
-
Cygwin - A UNIX environment for Windows (click on "install now")
- Note: When asked to select packages, click "devel" and then
scroll down to make sure that the box in the "bin" column
next to "gcc" is checked. This will ensure that gcc is included
with the cygwin installation.
- Java Software Page
(Java2 Standard Edition, version 1.4.1)
-
The Java API web page (Java2 Standard Edition, version 1.4.1)
- The
Lovelace Tutorial on Ada95
-
Sample Ada programs
-
Using Gnat, the Ada compiler
- To run scheme on department unix machines, type "rs" to run Rscheme.
- Scheme Downloads for Windows
- Scheme Reference Manual (Revised^5)
-
An introduction to Scheme, by Paul Wilson, U. Texas
- To run Standard ML on department unix machines, type "sml".
-
A Gentle Introduction to ML, by Andrew Cummings, Napier University
-
Datatypes in ML
-
Ben Goldbert's Sample Final Exam
Final Exam
The final exam will be given Thursday, May 8.
Notes on the final exam
Sample Final Exam
Solutions to Sample Final Exam
Solutions to Final Exam
Thanks to Ben Goldberg, for much helpful advice, and to Ed Schonberg, for the
use of his powerpoint slides.