CS 6371: Advanced Programming Languages

Course Information

Title: CS 6371: Advanced Programming Languages
Course Registration Number: 21248
Times: TR 1:00-2:15
Location: ECSS 2.203
Instructor: Dr. Kevin Hamlen (hamlen AT utdallas)
Instructor's Office Hours: TR 2:15-3:15 in ECSS 3.704
Teaching Assistant: Vishwath Mohan (vishwath.mohan AT utdallas)
TA's Office Hours: Tuesday 2:00-4:00 in ECSS 3.205

Course Summary

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:

  1. Functional Programming (ML/OCaml)
  2. Logic programming
  3. Small-step and large-step operational semantics
  4. Denotational semantics
  5. Fixpoints, fixpoint induction
  6. Axiomatic semantics
  7. Type theory
  8. Untyped and typed lambda calculi
  9. Partial evaluation, non-determinism

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!

To Prepare for the Course...

The first two lectures of the course are very important so please do not skip them! If you know you will miss them, you should obtain the lecture notes from this webpage once they are posted, obtain the first homework assignment through eLearning, and do the following on your own:

Using OCaml from the UTD Server

If you can't get OCaml to work on your personal machine, you can use OCaml on the UTD CS Department Linux servers. To do so:

Using Prolog from the UTD Server

You can install your own local version of SWI Prolog or you can access the version installed on the UTD linux servers as follows:

Grading

Homework (25%): 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 1:05pm) on the due date. No late homeworks will be accepted.

Quizzes (15%): Quizzes will be given in class approximately one per unit. They will be closed-book, closed-notes, and will typically be like one of the homework problems.

Midterm (25%): There will be an in-class midterm exam in class on Thursday, March 8. The exam will cover functional programming, operational semantics, denotational semantics, and fixpoints.

Final (35%): The final exam for the course is scheduled for Thursday, May 5th. The exam will be cumulative, covering all material in the course. Students will have 2 hours and 45 minutes to complete it.

Homework Policy

Students may work individually or together with other students presently enrolled in the class to complete the assignments, but they must CITE ALL COLLABORATORS AND ANY OTHER SOURCES OF MATERIAL that they consulted, even if those sources weren't copied word-for-word. Copying or paraphrasing someone else's work without citing it is plagiarism, and may result in severe penalties such as an immediate failing grade for the course and/or expulsion from the computer science program. Therefore, please cite all sources!

Students may NOT consult solution sets from previous semesters of the course, or collaborate with students who have such solutions. These sources are off-limits because such "collaborations" tend to involve simply copying someone else's answer to a similar homework problem, which does not prepare you for the quizzes and exams.

Texts

The course has no required textbook, but we will make use of several online references:

Tentative Course Schedule

Date Topic Assignments
Functional Programming with OCaml
Lecture 1:
Tue 1/17
Course Introduction: Functional vs. Imperative programming, Type-safe languages, intro to OCaml
Lecture Slides
OCaml Transcript
Assignment 1 due
(OCaml intro)
Lecture 2:
Thu 1/19
OCaml: Parametric Polymorphism
Lecture Slides
OCaml Transcript
Lecture 3:
Tue 1/24
OCaml: List folding, tail recursion, standard libraries, exception-handling
Lecture Slides
OCaml Transcript
Operational Semantics
Lecture 4:
Thu 1/26
Large-step Semantics: Intro
Lecture Slides
See also the last page of Assignment 2
Assignment 2 due
(IMP Interpreter)
Lecture 5:
Tue 1/31
Large-step Semantics: Proof techniques
Lecture Notes
Lecture 6:
Thu 2/2
Small-step Semantics
See last page of Assignment 3 for notes.
Assignment 3 due
(Operational Semantics)
Denotational Semantics
Lecture 7:
Tue 2/7
Denotational Semantics: Semantic Domains and Valuation Functions
Lecture Notes
Quiz 1: OCaml Programming
Lecture 8:
Thu 2/9
Denotational Semantics: Fixed Points
See notes for Lecture 7.
Lecture 9:
Tue 2/14
Fixed-point Induction
Lecture Notes
Assignment 4 due
(Fixpoints)
Lecture 10:
Thu 2/16
Semantic Equivalence
Complete Partial Orders
Lecture Notes
Lecture 11:
Tue 2/21
Quiz 2: Operational Semantics
Type Theory
Lecture 12:
Thu 2/23
Type Theory: Introduction
See reference section of Assignment 5 for notes.
Assignment 5 due
(IMP Type-checker)
Lecture 13:
Tue 2/28
Type Theory: Type-based Information Flow Security
Lecture 14:
Thu 3/1
Type Theory: Type Soundness
Lecture Notes
Lecture 15:
Tue 3/6
Midterm Review
Sample Midterm Exam
Quiz 3: Denotational Semantics
Midterm:
Thu 3/8
Midterm Exam
Tue 3/13 No Class (Spring Break)
Thu 3/15 No Class (Spring Break)
Untyped Lambda Calculus
Lecture 16:
Tue 3/20
Untyped Lambda Calculus
See reference section of Assignment 6 for notes.
Assignment 6 due
(Lambda calculus)
Lecture 17:
Thu 3/22
Untyped Lambda Calculus: Encodings and Reductions
See reference section of Assignment 6 for notes.
Logic Programming in Prolog
Lecture 18:
Tue 3/27
Logic Programming: Part I
Lecture 19:
Thu 3/29
Logic Programming: Part II Assignment 7 due
(Prolog)
Lecture 20:
Tue 4/3
Logic Programming: Part III
Typed Lambda Calculus
Lecture 21:
Thu 4/5
Simply-typed Lambda Calculus
Lecture Notes
Lecture 22:
Tue 4/10
System F
Lecture Notes
Quiz 4: Type theory
Assignment 8 due
(Functional IMP)
Lecture 23:
Thu 4/12
System F: Curry-Howard Isomorphism
Lecture 24:
Tue 4/17
Functions: Evaluation Strategies
Quiz 5: Untyped lambda calculus
Lecture 25:
Thu 4/19
Summary/Comparison of Modern Language Features
Formal Verification of Programs
Lecture 26:
Tue 4/24
Axiomatic Semantics: Hoare Logic
Quiz 6: Logic programming
Lecture Notes
Assignment 9 due
(Hoare Logic)
Lecture 27:
Thu 4/26
Axiomatic Semantics: Loop Invariants, Weakest Precondition, Strongest Postcondition
Lecture 28:
Tue 5/1
Final Review
Quiz 7: Typed lambda calculus
Sample Final Exam
Lecture 29:
Thu 5/3
Final Review
Quiz 8: Axiomatic semantics
Thu 5/10
11:00am-1:45pm
Final Exam