Title: CS 6371: Advanced Programming Languages
Course Registration Number: 23193
Times: TR 1:00–2:15
Location: CB2 1.206
Instructor: Dr. Kevin Hamlen (hamlen AT utdallas)
Instructor's Office Hours: TR 2:15–3:15 in ECSS 3.704
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. nonimperative programming languages, issues involved in designing a programming language, the role of formal semantics and typesystems in reasoning about programs and languages, and proof techniques related to formal, highassurance software validation.
The course is open to Ph.D. students and Masters students. Interested undergraduates should see the instructor for permission to take the course.
Prerequisites: Algorithm Analysis and Data Structures (CS 3345/5343 or equivalent), Automata Theory (CS 4384/5349 or equivalent). A solid background in each of these areas will be heavily assumed throughout the course!
STUDENTS MUST ATTEND AT LEAST ONE OF THE FIRST THREE CLASSES. IF YOU MISS MORE THAN TWO OF THE FIRST THREE CLASSES (other than for excused absences—see below) THEN YOUR FINAL COURSE GRADE WILL AUTOMATICALLY BE REDUCED BY ONE FULL LETTER GRADE. The first three classes will cover functional programming in the OCaml programming language, which will introduce many concepts assumed throughout the rest of the course. Documented absences approved by university policy are exempted from this attendance requirement. These include illness with an accompanying doctor's note, and observance of religious holy days.
To better understand the inclass OCaml demos, you should do the following as preparation:
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:
Homework (25%): Homeworks will be assigned approximately once per 1.5 weeks, and will consist of a mix of programming assignments and written assignments. Programming assignments will be implemented 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. To help students prepare for the next assignment, homework solutions will typically be revealed on each due date. Therefore, no late homeworks will be accepted.
Quizzes (15%): On indicated assignment due dates (see the course schedule below), students will solve one or two problems individually at the start of class as a quiz. The quiz problems are essentially extra homework problems solved individually in class without the help of the internet or collaboration with other students. The quizzes will be closedbook and closednotes.
Midterm (25%): There will be an inclass midterm exam in class on Thursday, March 7th. The exam will cover functional programming, operational semantics, denotational semantics, and fixpoints.
Final (35%): A final exam for the course has been (tentatively) scheduled by the university registrar for Thursday, May 9th at 2:00pm. The exam will be cumulative, covering all material in the course. Students will have 2 hours and 45 minutes to complete it.
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 wordforword. 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 this course, or collaborate with students who have such solutions. These sources are offlimits because such "collaborations" tend to involve simply copying or reverseengineering someone else's answer to a similar homework problem, which does not prepare you for the quizzes and exams.
The course has no required textbook, but we will make use of several online references:
Date  Topic  Assignments  
Functional Programming  Assignment prep: Follow the instructions above on preparing for the course. 

Lecture 1: Tue 1/15 
Course Introduction: Functional vs. Imperative programming, typesafe languages, intro to OCaml Lecture slides OCaml Transcript 
Assignment 1 due 1/24 (OCaml Intro) 

Lecture 2: Thu 1/17 
OCaml: Parametric polymorphism OCaml Transcript 

Lecture 3: Tue 1/22 
OCaml: List folding, tail recursion, exceptionhandling OCaml Transcript 

Lecture 4: Thu 1/24 
TBA Quiz #1: OCaml programming 
Assignment 2 due 1/31 (SIMPL Interpreter) 

Operational Semantics  
Lecture 5: Tue 1/29 
Largestep Semantics: Intro  
Lecture 6: Thu 1/31 
Largestep Semantics: Proof techniques  Assignment 3 due 2/12 (Operational Semantics) 

Lecture 7: Tue 2/5 
Smallstep Semantics  
Denotational Semantics  
Lecture 8: Thu 2/7 
Denotational Semantics: Semantic domains and valuation functions  
Lecture 9: Tue 2/12 
Denotational Semantics: Fixed points Quiz #2: Operational Semantics 
Assignment 4 due 2/26 (Denotational Semantics) 

Lecture 10: Thu 2/14 
Fixedpoint Induction  
Lecture 11: Tue 2/19 
Semantic Equivalence Programproof codevelopment 

Type Theory  
Lecture 12: Thu 2/21 
Type Theory: Introduction  
Lecture 13: Tue 2/26 
Type Theory: Typesoundness, Progress and Preservation Quiz #3: Denotational Semantics 
Assignment 5 due 3/14 (SIMPL Typechecker)  
Lecture 14: Thu 2/28 
Untyped Lambda Calculus: Introduction  
Lecture 15: Tue 3/5 
Midterm Review Sample Midterm Exam (with solutions)  
Midterm: Thu 3/7 
Midterm Exam  
Untyped Lambda Calculus  
Lecture 16: Tue 3/12 
Untyped Lambda Calculus: Encodings and reductions  
Lecture 17: Thu 3/14 
Simply Typed Lambda Calculus Quiz #4: Static semantics 
Assignment 6 due 3/28 (Lambda calculus) 

No Class: Tue 3/19 
No Class: Spring break  
No Class: Thu 3/21 
No Class: Spring break  
Logic Programming  
Lecture 18: Tue 3/26 
Logic Programming: Part I  
Lecture 19: Thu 3/28 
Logic Programming: Part II Quiz #5: Lambda calculus 
Assignment 7 due 4/9 (Prolog) 

Lecture 20: Tue 4/2 
Logic Programming: Part III  
Typed Lambda Calculus  
Lecture 21: Thu 4/4 
System F: Typeinhabitation, CurryHoward Isomorphism  
Lecture 22: Tue 4/9 
TBA Quiz #6: Logic programming 
Assignment 8 due 4/23 (Functional SIMPL) 

Lecture 23: Thu 4/11 
Summary/Comparison of Modern Language Features: Weak vs. strong typing, typesafety, function evaluation strategies  
Lecture 24: Tue 4/16 
Summary/Comparison of Modern Language Features: HindleyMilner typeinference, type polymorphism  
Formal Verification  
Lecture 25: Thu 4/18 
Axiomatic Semantics: Hoare Logic  
Lecture 26: Tue 4/23 
Axiomatic Semantics: Loop invariants  Assignment 9 due 5/2 (Hoare Logic) 

Lecture 27: Thu 4/25 
Axiomatic Semantics: Weakest precondition, strongest postcondition  
Lecture 28: Tue 4/30 
Final Review  
Lecture 29: Thu 5/2 
Final Review Quiz #7: Axiomatic semantics 