This page gives highlights of past lectures and provides lecture notes, reading assignments, and exercises.
Chapters, sections and exercises in readings are from the textbook, unless specified otherwise.
Readings on F# link directly to online resources, such as examples or the Wikibook on F# Programming.
| Dates | Topics | Exercises |
|---|---|---|
|
Jan 14 Jan 16 Jan 18 |
Course introduction and administration.
Overview of course topics.
Programming language paradigms.
Brief history of programming languages.
Compilation vs. interpretation.
Issues and factors in programming language design.
|
|
|
Jan 23 Jan 25 |
Variable binding. Variable scope ands scoping rules.
Function definitions.
Pattern matching.
Patterns in let expressions and in function definitions.
|
|
|
Jan 28 Jan 30 Feb 01 |
Using ADTs to encode arithmetic expressions.
Simple evaluators of arithmetic expressions.
|
|
|
Feb 04 Feb 06 Feb 08 |
Extending the basic expression language with variables
and with let binders.
Evaluating expressions with let binders.
Examples.
|
All ex. in code 6 |
|
Feb 11 Feb 13 Feb 15 |
Stack machines for expression evaluation, with variables and without.
Compiling expressions to stack machine code.
Running stack machine code.
Examples.
Producing byte code.
|
All ex. in code 8 |
|
Feb 18 Feb 20 Feb 22 |
Formal languages.
Regular expressions. Languages generated by regular expressions.
Finite Automata.
Finite automata as recognizers of regular languages.
Examples.
Lecture notes by Wayne Goddard on |
Practice problems in this week's readings |
|
Feb 25 Feb 27 Mar 01 |
Context-free grammars and languages.
Definition and examples.
Systematically generating CFG's from regular expressions.
Lecture notes on
|
Practice problems in this week's readings |
| Mar 04 |
Midterm 1 |
|
|
Mar 08 Mar 11 |
From concrete to abstract syntax. Lexers, parsers and generators. Specifying lexers and parsers in F# with fslex and fsyacc. A concrete syntax and a lexer and parser for a simple language of expressions. Example of pushdown automaton parser generated by fsyacc. Readings:
|
|
|
Mar 13 Mar 15 Mar 25 |
Micro-ML, a simple language of recursive functions: concrete and abstract syntax. Lexer and parser specification. Examples of micro-ML programs. Interpreting micro-ML. Specifying interpreters formally with evaluation rules. Implementation of specification in F#, via eval function. Static and dynamic scope. Readings:
|
|
| Mar 27 |
Static vs. dynamic typing.
Adding type-checking to micro-ML.
Formal type-checking rules.
Implementation of type checker.
|
|
|
Mar 29 Apr 01 Apr 03 |
Higher-order functions in F#. Currying and partial evaluation. Higher-order combinators. Examples. Extending Micro-ML to higher-order functions. Comparison between interpreters for first-order and higher-order micro-ML. Examples of higher-order programming in Micro-ML. Eager and Lazy evaluation. Call by value, call by name. Advantages and disadvantages. Readings:
|
|
| Apr 05 |
Imperative programming. Main concepts. Programs as state transformers. A naive imperative language. Environment and store. Readings:
|
|
|
Apr 08 Apr 10 Apr 12 |
The C programming language. Integers, pointers and arrays in C. Type declarations in C. The micro-C language. Interpreting micro-C programs. Local and global environments. Memory model. Store and activation records. Interpreting statements, declarations, expressions, and variable access in the presence of side effects. Relationship between & (address) and * (pointer dereferencing) operators. Readings:
|
|
|
Apr 15 Apr 17 Apr 19 Apr 22 Apr 24 |
A virtual stack machine for micro-C. Instruction set, concrete and symbolic. Virtual machine as implemented in Java and C. The structure of the runtime stack. Compiling micro-C to machine code: overview of main approach. Readings:
|
Exercises in lecture notes |
| Apr 26 |
Brief overview of basic concepts in object-oriented languages. Memory model for object-oriented languages. Stack and heap allocation. Real-world virtual machines. An overview of the Java virtual machine. Readings:
|
|
|
Apr 29 May 01 May 03 |
Project Q&A sessions. |
|