CS245 Syllabus, Fall 1999 (revised 10/25/99)

Week

Text

Topics

08/30

1

2

Paradigms, Languages, Interpreters and Compilers

History of Programming Languages; discussion of C++, Lisp, Bobcat , and PAL

Lab introduction

In-Class Exercise: trivial programs in C++, Lisp, Bobcat and PAL

Lab 1: Recursion and Iteration in Lisp and C++ (due 9/13)

09/06

4

Lexical and Syntactic Analysis

Ambiguity, Associativity, and Precedence

Parsers and Classes of Grammars, Predictive Parsing

In-Class Exercise: define the lexical and syntactic structures of Bobcat and PAL

Homework: Ch. 4, Q 8, 10 (a,c & d), 18, 25 (BNF, but no EBNF or diagrams) , Give First & Follow sets for Botcat (due 9/17)

Lab 2: Predictive parser/translator (due 9/20)

09/13

4.6

*

5.1

Predictive Parsing continued: First and Follow sets

Compiling and Interpreting Expressions and Control Flow Statements

Variables, Attributes, Basic Symbol Tables and Storage Allocation for Global Variables

In-Class Exercise: Simple rules for converting Bobcat expressions into PAL

Lab 3: Symbol Tables (due 9/29)

09/20

5.7

5.4, 7.5

5

Side Effects & Order of Evaluation; Defining Language Semantics

Stack Allocation and Frame Layout

Scoping and Symbol Table Data Structures; Lists, mapcar, let and flet in Lisp

In-Class Exercise: Interpretation of PAL programs

Homework: Ch. 5, Q 9, 10, 19, 20 (for 19 & 20 just explain why the results are predictable) (due 10/01)

Lab 4: Scoping Rules (due 10/6)

09/27

*

*

*

Heap Allocation -- new and delete in C++; Encapsulating Memory Management in a Class

A Simple List Class and Mapcar in C++

Destructor and Assignment Operator for Simple Lists

10/04

*

6

Copy Constructor and Default Constructor for Simple Lists, Review of Memory Management

Types: Concrete and Abstract Definitions; Type Tables and Simple Type Checking

Recursive Types (Functions, Records, Pointers), Type Equivalence, Checking & Conversion

Homework: Ch. 6, Q 36, 37 (due 10/15)

Lab 5: Symbol Table Class w/ Exception Handling (due 10/15)

In-Class Exercise: Type-checking in Bobcat

10/11

.

7

Fall Break 10/9-10-12

Intra- and Inter-procedural Control Flow, Exception Handling

Parameter Passing Mechanisms

Homework: Ch. 7, Q 16, 19, 24 (due 10/18)

In-Class Exercise: Function calls and Parameters in Bobcat

10/18

.

8,10.1-10.2

5.6, 10.8.2

Review of Chapters 1-7, Midterm exam 10/22-10/27 (Covers Ch. 1-7, due in class 10/27)

Data Abstraction; Mutable and Immutable Values and Types; Programming with Recursion

Storage Management and Garbage Collection

Homework: Ch. 8, Q 9, 13 (due 10/29)

Lab 6: Reference Counting (due 11/01)

10/25

9.3,9.4

*

*

Type Parameters vs. Inheritance, Dynamic Dispatch; Contravariance

Inheritance of Specification vs. Implementation; Class-based vs. Object-based Languages

Polymorphism and Subtyping; Multiple Inheritance; Multiple Dispatch

Homework: Ch. 9, Q 44 additional polymorphism questions (due 11/05)

Lab 7: AST Classes (due 11/08)

11/01

10.2

10.1

10.5

Assignment, Value-based vs. Reference-based Languages

Tail Recursion & Compiling Recursive Programs; Higher Order Functions

Closures; Evaluation in Pure Functional Languages and Programming Style Implications

Homework: Ch. 10, Q 9 (due 11/10)

Lab 8: Higher Order Functions (due 11/15)

11/08

10.5

10.6

10.7

Functional Programming

Mathematical Principles of Functional Programming

Lambda Calculus

Homework: Ch. 10, Q 43, 44, 45a,b (due 11/17)

Lab 9: Non-strict Evaluation (due 11/22)

11/15

13

Coroutines vs. True Concurrency

Explicit Control of Parallelism: Messages, Semaphores, Monitors, Initialize-and-Publish

Implicit Parallelism and Automatic Parallelization

Homework: Ch. 13, Q 4, 29 (due 11/24)

11/22

11

Logic Programming

Prolog

Thanksgiving Break

11/29

12

Formal Semantics

12/06

Language Design Goals, Course Review (last lecture is on 12/6)