Title: CS 6371: Advanced Programming Languages
Course Registration Number: 22290
Times: TR 1:002:15
Location: JSOM 2.901
Instructor: Dr. Kevin Hamlen (hamlen AT utdallas)
Instructor's Office Hours: TR 2:153:15 in ECSS 3.704
Teaching Assistant: Owolabi Legunsen (owolabi.legunsen AT utdallas)
TA's Office Hours: M 10:0012:00 in ECSS 4.701
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 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!
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:
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:
You can install your own local version of SWI Prolog or you can access the version installed on the UTD linux servers as follows:
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%): 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 will be similar to the homework problems, but short enough to solve in class. 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%): The final exam for the course is scheduled for Thursday, May 9th. 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 the course, or collaborate with students who have such solutions. These sources are offlimits 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.
The course has no required textbook, but we will make use of several online references:
Date  Topic  Assignments  
Functional Programming  
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 Lecture Slides OCaml Transcript 

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

Operational Semantics  
Lecture 4: Thu 1/24 
Largestep Semantics: Intro Lecture Slides See Assignment 2 (available via eLearning) for lecture notes. 
Assignment 2 due 1/31 (IMP Interpreter) 

Lecture 5: Tue 1/29 
Largestep Semantics: Proof techniques Lecture Notes 

Lecture 6: Thu 1/31 
Smallstep Semantics Quiz 1: OCaml Lecture Notes 
Assignment 3 due 2/12 (Operational Semantics) 

Denotational Semantics  
Lecture 7: Tue 2/5 
Denotational Semantics: Semantic domains and valuation functions Lecture Notes 

Lecture 8: Thu 2/7 
Denotational Semantics: Fixed points Lecture Notes Supplementary notes on Complete Partial Orders (CPOs) 

Lecture 9: Tue 2/12 
Fixedpoint Induction Lecture Notes Quiz 2: Operational Semantics 
Assignment 4 due 2/21 (Fixpoints) 

Lecture 10: Thu 2/14 
Semantic Equivalence  
Lecture 11: Tue 2/19 
SoftwareProof Codevelopment Coq Demo 

Type Theory  
Lecture 12: Thu 2/21 
Type Theory: Introduction See Assignment 5 (available via eLearning) for lecture notes. Quiz 3: Denotational Semantics 
Assignment 5 due 3/5 (IMP Typechecker) 

Lecture 13: Tue 2/26 
Type Theory: Soundness Lecture Notes 

Lecture 14: Thu 2/28 
Type Theory: Typebased Information Flow Security  
Lecture 15: Tue 3/5 
Midterm Review Sample midterm exam with solutions 

Midterm: Thu 3/7 
Midterm Exam  
No Class: Tue 3/12 
No class: Spring break  
No Class: Thu 3/14 
No class: Spring break  
Untyped Lambda Calculus  
Lecture 16: Tue 3/19 
Untyped Lambda Calculus (See Assignment 6 reference section for lecture notes.) Quiz 4: Type Theory 
Assignment 6 due 4/2 (Lambda calculus) 

Lecture 17: Thu 3/21 
Untyped Lambda Calculus: Encodings and reductions (See Assignment 6 reference section for lecture notes.) 

Typed Lambda Calculus  
Lecture 18: Tue 3/26 
Simplytyped Lambda Calculus Lecture Notes 

Lecture 19: Thu 3/28 
System F (See notes for Lecture #18.) 

Lecture 20: Tue 4/2 
System F: CurryHoward isomorphism  Assignment 7 due 4/11 (Functional IMP) 

Lecture 21: Thu 4/4 
Functions: Evaluation strategies  
Lecture 22: Tue 4/9 
Summary/Comparison of Modern Language Features Quiz 5: Lambda Calculus 

Logic Programming  
Lecture 23: Thu 4/11 
Logic Programming: Part I Lecture Slides 
Assignment 8 due 4/23 (Prolog) 

Lecture 24: Tue 4/16 
Logic Programming: Part II (See slides from Lecture 23) 

Lecture 25: Thu 4/18 
Logic Programming: Part III (See slides from Lecture 23) 

Formal Verification  
Lecture 26: Tue 4/23 
Axiomatic Semantics: Hoare Logic Quiz 6: Prolog Lecture Slides Lecture Notes

Assignment 9 due 5/2 (Hoare Logic) 

Lecture 27: Thu 4/25 
Axiomatic Semantics: Loop invariants, weakest precondition, strongest postcondition  
Lecture 28: Tue 4/30 
Final Review Lecture Slides Sample Final Exam (with solutions) 

Lecture 29: Thu 5/2 
Final Review Quiz 7: Axiomatic Semantics 

Thu 5/9 11:00am1:45pm 
Final Exam in JSOM 2.802 