The course CS 582 "Programming Languages II" is a continuation of CS 581 and introduces advanced concepts found in programming languages through the definition of a series of small toy languages. For each example language different language aspects (e.g. abstract syntax, semantics, and type systems) will be defined mathematically as well as through the implementation in metalanguages.
The focus of this class is thus on the following three areas.
0. Basic Info [pdf] (Version 01/05/18) [Rationale for laptop policy] 1. Introduction [pdf] (Version 01/17/18) 2. Idris [pdf] (Version 01/25/18) [Solutions] [Idris.idr] 3. Inference Rules [pdf] (Version 01/29/18) [Solutions] [Bool_Syntax.idr Imp_Syntax.idr InfRules.idr] 4. Operational Semantics [pdf] (Version 02/02/18) [Solutions] [Bool_SmallStep.idr Bool_BigStep.idr Imp_State.idr Imp_BigStep.idr ] 5. Language Properties, Proofs, and Induction [pdf] (Version 02/22/18) [Solutions] [Properties.idr ]
Back to the table of contents
Types and Programming LanguagesA thorough introduction to Idris can be found in the following book. In particular, chapters 4, 6, 8, and 9 are relevant for this course.
By Benjamin C. Pierce. MIT Press, 2002
- Inference rules: Section 3.2
- Operational semantics: Sections 3.5, 5.3
- Language properties: Sections 3.5, 5.3
- Induction and proofs: Sections 2.4, 3.3, 3.5
- Typing: Chapter 8
- Type inference and unification: Chapter 22
Type-Driven Development with Idris
By Edwin Brady. Manning, 2017
- Type functions: Section 6.1
- Dependent (data) types and vectors: Section 4.2
- Equality type and proofs: Chapter 8
- Inference rules/relations as dependent data types: Chapter 9
- Negation and falsity: Section 8.3
I have put both books on reserve in the Valley Library.
Further documentation (including a tutorial and a reference manual), information about downloading and installing Idris, and other information about Idris is collected on the
Idris Language Home Page.
Another tutorial can be found here. A very good introduction to the use of dependent types for expressing and proving program properties is provided in the following free online book.
Software FoundationsA detailed introduction into type theory, which is the basis for Idris and other dependently typed programming languages, is given in the following book, which is also freely available online.
By Benjamin C. Pierce et al. 2015
Type Theory and Functional Programming
By Simon Thompson, Addison-Wesley, 1991 online version
Back to the table of contents
CS 582 on Piazza
The Piazza Q&A platform is geared toward students helping other students. Anybody can post or answer a question, and you can even do so anonymously if you're shy. The instructor can then revise (if needed) and endorse student answers so you can be confident in the quality of the response. Students are strongly encouraged to post questions (about lectures, quizzes, or anything class-related) to Piazza first, rather than email the instructor. Students should also frequently check in to answer other students' questions. Not only will this enable everyone to get help quickly, but teaching someone else is the best way to learn something, so you'll be improving your understanding of the material as well.
The concept of peer instruction is based on the idea that students discuss class material with each other during class after having answered a particular question differently. These individual discussions help clarify specific misunderstandings and contribute to a solid understanding of the class material.
Back to the table of contents
I will hand out corrected quizzes and exams in class. Should you miss that lecture, please contact me during the office hours.
Quiz/Exam Grade Distribution A B or better Median Quiz 1 33% 83% 87 Quiz 2 50% 100% 88.5 Midterm 33% 100% 86
Back to the table of contents
last change: February 22, 2018 | Martin Erwig erwig@oregonstate.edu |