CSE 428: Lectures
The following is the summary of lectures given so far. For each lecture
you find the list of topics covered, and the reference material. The books
are indicated by the name of their author(s).
WEEK 1 (Jan 12)
-
Introduction. Administrativia. Overview
of the course. (Sethi, 1.3)
-
The formal definition of Programming Languages. Syntax: Context Free Grammars,
derivations, language generated by a grammar. [Lecture
notes] (Sethi, 2.1-4)
-
Syntax: Derivation trees. Ambiguity. Precedence and associativity. [Lecture
notes] (Sethi, 2.4-5)
WEEK 2 (Jan 19)
-
Syntax: dangling-else ambiguity. Abstract Syntax. A simple language
for expressions. [Lecture
notes (lectures 4 and 5)] (Sethi, 2.5)
-
Semantics: The SOS style. Inductive definitions. Proof-trees. The
semantics of expressions [Lecture
notes (lectures 4 and 5)] (Sethi, 13.3, first
two paragraphs)
-
Identifiers and Declarations. Environments. The let construct.
[Lecture
notes (lectures 6 and 7)] (Sethi, 13.3, third
and fourth paragraph)
WEEK 3 (Jan 26)
-
The semantics of expressions with identifiers and declarations (let constructs).
[Lecture
notes (lectures 6 and 7)] (Sethi, 13.3, third
and fourth paragraph)
-
Re-explanation of some concepts which had not been well understood in previous
lectures.
-
Introduction to types and type checking [Lecture
notes (lectures 9 and 10)] (Sethi, 4.9, excluding
paragraphs from "overloading" till "circular types")
WEEK 4 (Feb 2)
-
The Type System for the mini-language of expressions. [Lecture
notes (lectures 9 and 10)] (In Sethi 14.5 you
can find another example of type system for a sub-language of ML: the Typed
Lambda Calculus)
-
Introduction to the Imperative paradigm. Environment and State in Imperative
Languages. Assignment, Conditional command, and Sequences of commands.
[Lecture
notes (lectures 11, 12 and 13)] (Sethi 3.1-4
and 3.7)
-
Declarations of variables and the notion of block
[Lecture
notes (lectures 11, 12 and 13)] (Sethi 5.4)
WEEK 5 (Feb 9)
-
The notion of scope. Local and non-local variables. Introduction to iteration
[Lecture
notes (lectures 11, 12 and 13)] (Sethi 5.4)
-
Definite and indefinite iteration (for and while). Examples
of iterative programs. The type array (For the iteration:
Sethi 3. For the type array: Sethi 4.3)
-
Records and pointers. Definition of lists. Garbage and dangling references
(Sethi 4.4 and 4.7)
WEEK 6 (Feb 16)
-
Introduction to procedures and functions. Call by value and by reference
(Sethi 5.1 and 5.2)
-
Call by value-result. Functions definition and function calls. Side effects.
(Sethi 5.1 and 5.2)
-
Recursive functions and procedures. [Example:
Exit from a maze] (Sethi 5.2)
WEEK 7 (Feb 23)
-
Dynamic and Static (Lexical) scope (Sethi 5.3, excluding
the section on call by name, and Sethi 5.4)
-
A brief overview of Compilation Techniques and Activation Records
(Sethi 5.4-7)
WEEK 8 (Mar 2)
-
Introduction to Functional Programming and to ML (Sethi
8.2-6)
-
Lists and Concrete Data Types in ML (Sethi
9.1, 9.2 and 9.5)
-
Examples of ML programs on lists (append and reverse, see Sethi
9.2) and binary trees (infix-visit)
WEEK 9 (Mar 16)
-
Concrete data types in ML. Constructors and values of a concrete data type.
Definition of functions by pattern matching and case analysis. Extended
example: Binary trees on integers. Definition of the heigth and
the number of nodes of a binary tree
(Sethi 9.1, 9.2, 9.4 and 9.5)
-
Explanation of some questions related to Hw#5. Polimorphic types in ML.
Example: the datatype 'a btree. Definition of records in ML. Introduction
to the Higher-Order features of ML. Functions as parameters. The function
map. (Sethi 9.3)
-
Higher -Order in ML. Expressions of functional type. The function reduce.
Definition of sum_all, multiply_all, and map in terms
of reduce. (Sethi 9.3)
WEEK 10 (Mar 23)
-
Higher-Order in ML. Definition of exists, composition of functions,
and the curry function (Sethi
9.3). Call-by-value (eager evaluation) and call-by-name (lazy evaluation)
in functional programming (Sethi 8.4)
-
Example of Meta-Programming in ML: an interpreter for the mini imperative
language considered in Lectures 11, 12 and 13 (see the Lecture
notes for these lectures). Code
and example.
-
A ML interpreter for the mini imperative language (continued).
WEEK 11 (Mar 30)
-
A ML interpreter for the mini imperative language (continued).
-
A ML interpreter for the mini imperative language. Extension with function
declarations and calls. Code
and example
-
The type system for the subset of ML (mini ML) corresponding to the Lambda
Calculus [Lecture
notes]. (Sethi 14.5).
WEEK 12 (Apr 6)
-
Introduction to Logic Programming. Main characteristics of Logic Programming
with respect to Functional Programming: Unification and Nondeterminism.
Logical meaning of a program (Sethi 11-11.1).
-
The syntax of Prolog. (Sethi 11.2). Example:
Database representing the relation mother and definition of
other related relations. Code
and sample session.
WEEK 13 (Apr 13)
-
Control in Prolog. Search tree and Unification (Sethi
11.5).
-
The depth-first strategy of Prolog in constructing the search tree. Problems
arising in presence of infinite branches in the search tree (loops). Negation
in Prolog. Lists and numbers in Prolog. (Sethi 11.3).
Examples of programs on lists: Code
and sample session.
-
Implementation in Prolog of the Type System of mini ML (see Lecture
notes of Lecture 32). Code
and sample session. A parser for the mini imperative language.
Code
and sample session.
WEEK 14 (Apr 20)
-
Introduction to Object Oriented Programming. Objects and Classes. Templates.
Constructors. Creation of an object. Application of a Method (Sethi
6.5-6.7).
-
Derived classes. Inheritance and protection. Public, protected, and private
members. The concept of "self" (called "this" in C++) (Sethi
7-7.4).
-
Example: Implementation of the data structure Stack and Queue based on
a circular list. (Sethi 6.6 and 7.6).
WEEK 15 (Apr 27)
-
Overloading and Overriding. Example: Eratosthenes' Sieve based on the demand-driven
discipline. Code. (Sethi
7.5).
-
Example:Eratosthenes' Sieve based on the data-driven discipline. Code.
Threads in Java. Example: Multithread implementation of the Eratosthenes'
Sieve. Code.