Title: CS 6371: Advanced Programming Languages
Course Registration Number: 14355
Times: MW 4:00-5:15
Location: ECSS 2.311
Instructor: Dr. Kevin Hamlen (hamlen AT utdallas)
Instructor's Office Hours: ECSS 3.704, Wed 2:00-4:00
Teaching Assistant: Meera Sridhar (mxs072100 AT utdallas)
TA's Office Hours: ECSS 3.403, Tue 11:30-1:30
This course will cover functional and logic programming, concepts of programming language design, and formal reasoning about programs and programming languages. The following are the course learning objectives:
Through taking this course, students will learn the tradeoffs of imperative vs. non-imperative programming languages, issues involved in designing a programming language, the role of formal semantics and type-systems in reasoning about programs and languages, and proof techniques related to programming language design.
The course is open to Ph.D. students and Masters students. Interested undergraduates should see the instructor for permission to take the course.
Prerequisites: Discrete Structures (CS 3305/5333 or equivalent), Algorithm Analysis and Data Structures (CS 3345/5343 or equivalent), Automata Theory (CS 4384/5349 or equivalent). A solid background in all three of these areas will be heavily assumed throughout the course!
Although the early course lectures will include a brief survey of the OCaml programming language, students will be expected to learn most of OCaml on their own. Therefore, if you want to get a head start, I recommend downloading and installing OCaml, and walking yourself through some of the many online tutorial examples:
If you can't get OCaml to work on your personal machine, you can use OCaml on the UTD CS Dept. Linux servers. To do so:
OCaml is available on any of the following CS servers: cslinux2.utdallas.edu, cscomp.utdallas.edu, cscomp1.utdallas.edu, cscomp2.utdallas.edu, cscomp3.utdallas.edu. When connecting from off-campus, ssh to cs1.utdallas.edu or cs2.utdallas.edu first, and then ssh to one of the other machines from there.
If you are having trouble with crashes when using OCaml on Windows in interactive mode, try downloading the following binary:
This is a version of the interactive shell that I re-built from sources. It doesn't seem to crash for me when I tested it. You must have OCaml already installed on your machine to use it. (If you try this version and it crashes for you, please let me know.)
Homework (40%): Homeworks will be assigned approximately once per 1.5 weeks, and will consist of a mix of programming assignments and written assignments. All programming assignments will be done in Ocaml or Prolog. Written assignments will typically involve discrete math proofs. Homeworks must be turned in at the start of class (i.e., by 4:15pm) on the due date. No late homeworks will be accepted.
Midterm (25%): There will be an in-class midterm exam on Monday, October 1st. The exam will cover functional programming, operational semantics, denotational semantics, and fixpoints.
Final (35%): The final exam for the course is scheduled for 2:00pm Friday, November 30. The exam will be cumulative, covering all material in the course. Students will have 2 hours and 45 minutes to complete it.
The course has no required textbook, but we will make use of several online references:
Date | Topic | Assignments | |
Functional Programming with OCaml | Pre-assignment: Download and install OCaml. Compile and execute the Fibonacci example | ||
Lecture 1: Mon 8/20 |
Course Introduction: Functional vs. Imperative programming, Type-safe languages, intro to OCaml Lecture notes |
||
Lecture 2: Wed 8/22 |
OCaml: Parametric Polymorphism Lecture notes |
Assignment 1 due (Ocaml intro) |
|
Lecture 3: Mon 8/27 |
OCaml: List folding, tail recursion, standard libraries, exception-handling Lecture notes |
||
Operational Semantics | |||
Lecture 4: Wed 8/29 |
Large-step Semantics: Part I Slides in PDF form |
Assignment 2 due (IMP Interpreter) |
|
Mon 9/3 | No Class (Labor Day) | ||
Lecture 5: Wed 9/5 |
Large-step Semantics: Part II Lecture Notes |
||
Lecture 6: Mon 9/10 |
Small-step Semantics Lecture Notes: See section 3.3 of Assignment 3 and chapter 2.6 of Winskel |
Assignment 3 due (Operational Semantics) |
|
Denotational Semantics | |||
Lecture 7: Wed 9/12 |
Denotational Semantics: Part I Lecture Notes |
||
Lecture 8: Mon 9/17 |
Denotational Semantics: Part II (same lecture notes as previous lecture) |
||
Lecture 9: Wed 9/19 |
Fixpoints Lecture Notes on Fixed-point Induction Lecture Notes on CPO's |
Assignment 4 due (Fixpoints) |
|
Lecture 10: Mon 9/24 |
Equivalence of Operational and Denotational Semantics Lecture Notes: See chapter 5.3 of Winskel |
||
Lecture 11: Wed 9/26 |
Midterm Review Sample Midterm Exam |
||
Midterm: Mon 10/1 |
Midterm Exam Midterm Exam |
||
Type Theory | |||
Lecture 12: Wed 10/3 |
Type Theory: Introduction Lecture Notes: See section 5.3 of Assignment 5 |
Assignment 5 due (IMP Type-checker) |
|
Lecture 13: Mon 10/8 |
Type Theory: Progress & Subject Reduction Lecture Notes |
||
Lecture 14: Wed 10/10 |
Type theory: Progress & Subject Reduction | ||
Lecture 15: Mon 10/15 |
Type theory: Type Systems for Program Analysis | ||
Lambda Calculus | |||
Lecture 16: Wed 10/17 |
Untyped Lambda Calculus: Part I Lecture notes: See section 3 of Assignment 6 |
Assignment 6 due (Lambda calculus) |
|
Lecture 17: Mon 10/22 |
Untyped Lambda Calculus: Part II | ||
Lecture 18: Wed 10/24 |
Simply Typed Lambda Calculus | ||
Lecture 19: Mon 10/29 |
Polymorphic Lambda Calculus: Type-unification, Curry-Howard Isomorphism | Assignment 7 due (Functional IMP) |
|
Lecture 20: Wed 10/31 |
Functions: Call-by-value, Call-by-Reference, Call-by-Name, Call-by-Need | ||
Formal Verification of Programs | |||
Lecture 21: Mon 11/5 |
Axiomatic Semantics: Part I Lecture Notes C. A. R. Hoare. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576-580 and 583, October 1969. |
||
Lecture 22: Wed 11/7 |
Axiomatic Semantics: Part II Lecture Notes |
Assignment 8 due (Hoare Logic) |
|
Logic Programming in Prolog | |||
Lecture 23: Mon 11/12 |
Logic Programming: Part I Guest Lecturer: Srividya Kona Lecture Notes |
||
Lecture 24: Wed 11/14 |
Logic Programming: Part II Lecture Notes |
Assignment 9 due (Prolog) |
|
Lecture 25: Mon 11/19 |
Logic Programming: Part III Lecture Notes |
||
Lecture 26: Wed 11/21 |
Course Evaluations Final Review Sample Final Exam |
||
Lecture 27: Mon 11/26 |
Final Review (continued) | ||
Fri 11/30 2:00-4:45pm |
Final Exam |