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.

**Language Concepts**(Elements of programming languages)**Language Aspects**(Ways to define and understand languages)**Metalanguages**(How to define the aspects of language concepts)

- Slides and Code
- Background Reading Material and Idris
- Syllabus
- Piazza
- Grading
- Important Dates and Times (Quizzes, Exams, etc.) (see syllabus)

0. Basic Info [pdf] (Version 01/07/19) 1. Introduction [pdf] (Version 12/07/18) 2. Idris [pdf] (Version 01/09/19) [Solutions] [Idris-1.idr] [Prolog Slides] [Solution to Prolog Exercises]

Back to the table of contents

A thorough introduction to Idris can be found in the following book. In particular, chapters 4, 6, 8, and 9 are relevant for this course.Types and Programming Languages

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

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

*Asking and discussing questions*about the class material- Short in-class
*polls*and*ungraded quizzes*for initiating*peer instruction*

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

- 10% Class participation (during class and on Piazza)
- 20% Quizzes
- 30% Midterm Exam
- 40% Final Exam

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

Back to the table of contents

**Haskell**(data types, higher-order functions, writing interpreters)**Abstract Syntax**(how to represent abstract syntax as Haskell data types)**Denotational Semantics**(domains and how to represent them as Haskell data types)**Lambda Calculus**(syntax, free variables, beta-reduction, normal forms, reduction strategies)