Title: CS 6371: Advanced Programming Languages
Course Registration Number: 21248
Times: TR 1:002:15
Location: ECSS 2.203
Instructor: Dr. Kevin Hamlen (hamlen AT utdallas)
Instructor's Office Hours: TR 2:153:15 in ECSS 3.704
Teaching Assistant: Vishwath Mohan (vishwath.mohan AT utdallas)
TA's Office Hours: Tuesday 2:004:00 in ECSS 3.205
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%): Quizzes will be given in class approximately one per unit. They will be closedbook, closednotes, and will typically be like one of the homework problems.
Midterm (25%): There will be an inclass 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.
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 with OCaml  
Lecture 1: Tue 1/17 
Course Introduction: Functional vs. Imperative programming, Typesafe 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, exceptionhandling Lecture Slides OCaml Transcript 

Operational Semantics  
Lecture 4: Thu 1/26 
Largestep Semantics: Intro Lecture Slides See also the last page of Assignment 2 
Assignment 2 due (IMP Interpreter) 

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

Lecture 6: Thu 2/2 
Smallstep 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 
Fixedpoint 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 Typechecker) 

Lecture 13: Tue 2/28 
Type Theory: Typebased 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 
Simplytyped 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: CurryHoward 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:00am1:45pm 
Final Exam 