CS 582 Programming Languages II (Winter 2017)


Course Description

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.


Quick Links


Slides and Code

I will try to make the slides available online before each lecture, but be aware that there might be some last-minute changes.

0.Basic Info [pdf] (Version 01/07/17) [Rationale for laptop policy]
1.Introduction [pdf] (Version 01/09/17)
2.Idris [pdf] (Version 01/17/17) [Solutions] [Idris.idr]
3.Inference Rules [pdf] (Version 01/23/17) [Solutions] [Bool_Syntax.idr Imp_Syntax.idr InfRules.idr]
4.Operational Semantics [pdf] (Version 02/09/17) [Solutions] [Bool_SmallStep.idr Bool_BigStep.idr Imp_State.idr ]
5.Language Properties, Proofs, and Induction [pdf] (Version 02/20/17) [Solutions] [Properties.idr Bool_Prop.idr ]
6.Typing [pdf] (Version 03/06/17) [Solutions]
7.Type Inference [pdf] (Version 03/09/17) [Solutions]

Back to the table of contents


Background Reading

Here is some background reading material that provides additional information on some of the topics discussed in class. The following book explains operational semantics and type systems. I have put the book on reserve in the Valley Library.

Types and Programming Languages
By Benjamin C. Pierce. MIT Press, 2002

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 Foundations
By Benjamin C. Pierce et al. 2015
A 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.

Type Theory and Functional Programming
By Simon Thompson, Addison-Wesley, 1991 online version

Back to the table of contents

Piazza

In this class we will be using the Piazza platform for: You should sign up for Piazza and join the class page ASAP so that you don't miss any important announcements!

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

Grading Policy

Grades will be roughly computed as follows. (I might decide later to adjust the weights in cases in which that would lead to a better overall total grade.) For 90% or more, you will receive an A; for less than 30% you will receive an F. The remaining grades in between are assigned linearly. I might lift individual grades if clustering of points achieved by students suggests so (but I won't assign grades worse than indicated by the above linear schema). If you are too lazy to calculate, you can look up grades in this table.

Grading Results

I will hand out corrected quizzes and exams in class. Should you miss that lecture, please contact me during the office hours.

Quiz/ExamGrade Distribution
    A       B or better     Below B  
Quiz 133%78%22%
Quiz 244%67%33%
Midterm22%67%33%
Quiz 322%67%33%
Final22%67%33%
Course44%89%11%

As promised, as a reward for their active contributions in the class and on Piazza, two students' grades were lifted from an A- to an A.

Back to the table of contents

Important Dates and Times

Until specifically noted otherwise, all classes, quizzes, and exams take place in the classrron KEAR 112.

Class Time: TR 10:00am - 11:20am
Quizzes: Thursday, Jan 19 10:00am - 10:20am
Thursday, Feb 2 10:00am - 10:20am
Midterm Exam: Thursday, Feb 16 10:00am - 11:00am
Quizzes: Thursday, Feb 23 10:00am - 10:20am
Thursday, Mar 2 10:00am - 10:20am
Final Exam: Wednesday, Mar 22 2pm - 3:50pm

Back to the table of contents


IMPORTANT NOTE! This class is a continuation of the class CS 581, Fall 2016, which is a prerequisite for CS 582. To successfully participate in CS 582 it is imperative that you have a solid understanding of the following concepts.


last change: March 23, 2017 Martin Erwig  erwig@oregonstate.edu