CSCI-291: Programming Language Paradigms

Fall 2019

Instructor

Instructor: Brad Richards
Lectures: TH 374 — MWF 2:00-2:50
Phone: 879-3579
Email: brichards@pugetsound.edu
Office: Thompson 401
Office Hours: MWF 11-11:50, Th 10:10-10:50
Tutor Schedule: See online schedule

Contents

Resources:

Code and transcripts from class.

Other miscellaneous documents from class.

Haskell:

Logic Programming:

Schedule:

Week Topic Reading  
9/2 Intro to Haskell: Expressions, fn definitions, lists.
No class Monday
Chapters 1, 2 Research Paul Graham. Read this, and then this. This article is worth reading too.
9/9 More on defining functions, lists; Types
No class Wednesday
Chapters 3, 4 Assignment 1 (solns)
9/16 More on types and typeclasses, Recursion, Functions as values. Chapters 5, 6 Assignment 2 (solns)
9/23 Applicative programming, Returning functions Chapter 6 Assignment 3 (solns)
9/30 More on returning functions, Defining types Chapter 8 Assignment 4 (solns)
10/7 More types, Larger examples Chapter 8  
10/14 Lazy Evaluation Lazy, Example Assignment 5
10/21 More laziness, Cyclic Programming
No class Monday or Tuesday
  Assignment 6
10/28 Managing state: Monads
Exam Friday
Chapter 12, other Old Exam, Old solns
11/4 Prolog intro, Facts, Rules, and Queries Section 1  
11/11 Matching & binding, Proof Search Section 2  
11/18 Recursion, Lists, Arithmetic Section 3, 4, 5  
11/25 Search Trees, Cuts and Negation
No class Wed or Fri
Section 9, 10  
12/2 Collecting solutions Section 11  
12/9 Short week    

Background:

Declarative programming languages are an important alternative to languages (such as C, C++, and Java) that use the more familiar imperative programming paradigm. This course introduces the functional, dataflow, and logic programming paradigms in depth through assignments in the programming languages Haskell and Prolog. These languages are based on models of computation that are fundamentally different from the von Neumann model underlying imperative programming languages, and exposure to these new paradigms provides valuable perspective on programming and problem solving in general.

This course builds progressively on previously covered material. Therefore, it is essential to attend all classes and keep up with the reading and the assignments. Students are expected to attend all lectures, with exceptions permitted in case of illness and family emergencies, and should do the assigned readings before each class.

The assignments form a crucial part of the course, and students are required to work on them individually. Collaboration with other students is not permitted and will be subject to severe penalties. Please review the Academic Integrity section in The Logger and ask me if you have any questions regarding its application to this course.

Academic accommodations are available for students with disabilities who are registered with the Office of Disability Services. Please schedule an appointment with the instructor early in the semester to discuss any accommodations for this course which have been approved by the Disability Services Coordinator as indicated in your accommodation letter.

Learning Objectives:

By the end of the semester, successful students should:

Grading:

Homework for this class will be submitted electronically, and must be turned in by class time on the due date for full credit (unless the assignment explicitly states otherwise). Late homework will be penalized 5% per day, and will not be accepted more than one week late. The following grade cutoffs are upper bounds — they might come down, but will not be set higher: A = 95, A- = 90, B+ = 88, B = 83, B- = 80, C+ = 77, C = 73, C- = 70, D+ = 67, D = 64, D- = 60, F = <60. Your overall grade is composed as follows: Participation: At the end of the semester you will receive a score of 0 through 5 for participation. The "default" grade will be a 2.5, meaning you were generally physically present and mentally engaged. A higher score will be given to students whose engagement is noteworthy. Examples include: answering and asking relevant questions, noticing mistakes (in a polite and productive manner), active engagement in class activities. A score of lower than 2.5 will be given for students with multiple absences, minor class disruptions, or being mentally absent.

Emergency Response

Please review university emergency preparedness, response procedures and a training video posted at www.pugetsound.edu/emergency/. There is a link on the university home page. Familiarize yourself with hall exit doors and the designated gathering area for your class and laboratory buildings.

If building evacuation becomes necessary (e.g. earthquake), meet your instructor at the designated gathering area so she/he can account for your presence. Then wait for further instructions. Do not return to the building or classroom until advised by a university emergency response representative.

If confronted by an act of violence, be prepared to make quick decisions to protect your safety. Flee the area by running away from the source of danger if you can safely do so. If this is not possible, shelter in place by securing classroom or lab doors and windows, closing blinds, and turning off room lights. Lie on the floor out of sight and away from windows and doors. Place cell phones or pagers on vibrate so that you can receive messages quietly. Wait for further instructions.