CS 510 - Advanced Functional Programming - Daily Record - Spring Term 2014

Instructor: Tim Sheard
CRN: 64726
Section 019
Title: CS 510 TOP: ADV FUNCTIONAL PROGRAMMING
Meeting time: Tuesday and Thursday 1400-1550
Classroom: FAB 40-07
Office: FAB 120-04
phone: 503-725-2410
email:


This course is about advanced topics in functional programming. The class covers advanced features of the Haskell programming language. Topics to be covered will be partially decided by the interests of the class members.

I taught a similar coures in 2004. Here are the Lecture Notes I used then. Of course, much has changed in the last 10 years, so I suspect we will cover somewhat different material this term.

Here is a list of some papers we might read as background material.

The class will be based on lecture notes, and on writing and reading Haskell programs. A basic understanding of functional programming, as found in the class CS410/510 is assumed.


  1. Tuesday April 1, 2014
    Due Today:
    Announcements:
    Readings:
            A Gentle Introduction to Haskell.
                    Chapter 5: "Type classes and Overloading"
                    Chapter 8: "Standard Haskell Classes"
            Research Papers about Type Classes
                    Please skim the following 2 papers. Reachable from the background material web page.
            Implementing Type Classes John Peterson and Mark P. Jones (PLDI'93)
            A theory of qualified types. Mark Jones
    Class Topic:
            Take the class survey.
            notes on type Classes.
            Code for todays lecture.
    Assigned today:
    
    

  2. Thursday April 3, 2014
    Due Today:
    Announcements:
    Readings:
            Wikipedia page on kinds and higher order types.
            A blog entry on higher order types (includeing type and data families).
            A system of constructor classes: overloading and implicit higher-order polymorphism.   Mark Jones
    Class Topic:
            Choices of stuff to study.
            Higher order types and type classes.
            code for today's lecture.
            Functional Dependencies.
            code for today's lecture.
    Assigned today:
            Homework #1.  Due via D2L by class time on Thursday April 10, 2014.
    
    
    

  3. Tuesday April 8, 2014
    Due Today:
    Announcements:
    Readings:
            The Haskell School of Expression
                    Read Chapters 5,6,8  Shapes and Regions
                    Read chapter 13 - A Module of Simple Animations
                    Read Chapter 15 - A Module of Reactive Animations
                    Read Chapter 17 - Rendering Reactive Animations
    Class Topic:
            Today we start our examination of Functional Reactive Programming.
                    We will follow the path set down in the text book The Haskell School of Expression.
                    This path studies FRP in the context of reactive animations
                            (Pictures that change in response to user input).
                    This will definitely take at least 2 days (perhaps 3)
            notes in preparation for FRP (Shapes and Regions).
                    code in notes.
    Assigned today:
    
    
    

  4. Thursday April 10, 2014
    Due Today:
            Homework #1.  Due today.
    Announcements:
    Readings:
    Class Topic:
            notes on simple animations.
                    code in notes.
            notes on reactive animations.
                    code in notes.
    Assigned today:
            Homework #2.  Due via D2L by class time on Thursday April 17, 2014.
    

  5. Tuesday April 15, 2014
    Due Today:
    Announcements:
    Readings:
            A link to many monad tutorials
    Class Topic:
            Notes on monads.
            A simple reader library CSVReader.hs.
            A reader library with line and col information CSVReader2.hs.
            A third try at a reader with a simpler interface CSVReader3.hs.
            The Excell.hs Library
            The CSV.hs Library (comma separated values)
            In class exercise. Write a program to import an Excell table
                    Get the excell table DemoMajors.csv to practice on.
    Assigned today:
    
    
    

  6. Thursday April 17, 2014
    Due Today:
            Homework #2.  Due today.
    Announcements:
    Readings:
            How to build a monadic interpreter in one day.
            A language and its interpreter.
            Monad Transformers and Modular Interpreters. Hudak, Liang and Jones.
            Monad Transformers
                    haskell wiki.
                    Real World Haskell.
                    Wiki books.
                    The Control.Monad.Trans library.
    Class Topic:
            Monads and language interpretors.
            The haskell code with the examples
    Assigned today:
            Homework #3.  Due via D2L by class time on Thursday April 24, 2014.
    
    

  7. Tuesday April 22, 2014
    Due Today:
    Announcements:
    Readings:
            Haskell wiki on Parsec.
            The Parsec package on Hackage.
            Using Parsec. Real world Haskell chapter 16.
            Text Parsing on the School of Haskell.
    Class Topic:
            Parsec Parsing notes.
            Code for a trivial parser.
            Code for parsing a simple imperative language.
    Assigned today:
    
    
    

  8. Thursday April 24, 2014
    Due Today:
            Homework #3.  Due  today.
    Announcements:
            Midterm will be held May 6, 2014.
    Readings:
            Pretty printing documantation.
            The Design of a Pretty-printing Library. by John Hughes
            A prettier printer. By Phil Wadler.
    Class Topic:
            Controling Parsec parsing error reporting.
            Layout parsing. Example code and the library.
            Pretty printing using the Hughes pretty printing library.
                    Example code that does pretty printing.
    Assigned today:
            Homework #4.  Due via D2L by class time on Thursday May 1, 2014.
    

  9. Tuesday April 29, 2014
    Due Today:
    Announcements:
            MCECS and the Women's Resource Center are hosting a focus group event
            on Friday May 1st. 5:00-6:30 at the Women's Resource Center. Register at
            bit.ly/MCECSFocusGroup
    We want to hear from
    Readings:
            Programming with arrows.  By John Hughes
    Class Topic:
            Ted will introduce us to Arrows. Read the paper above to prepare.
                    A picture of the world of arrows.
                    Lecture notes.
                    Code from the lecture.
                    An arrow bibliography.
                    Code that describes circuits as arrows.
    Assigned today:
    
    
    

  10. Thursday May 1, 2014
    Due Today:
            Homework #4.  Due
    Announcements:
    Readings:
            Bart Jacobs and Jan Rutten A Tutorial on (Co)Algebras and (Co)Induction
    Class Topic:
            Programming with algebras and co-algebras.
                    The code discussed in the notes.
                    The code we developed in class.
    Assigned today:
            Homework #5.  Due via D2L by class time on Thursday May 8th, 2014.
    
    
    

  11. Tuesday May 6, 2014
    Due Today:
    Announcements:
    Readings:
            Documentation on GHC Profiling.
            Haskell wiki on debugging.
            An article on using the GHCI debugger (The Monad Reader Issue 10).
    Class Topic:
            General notes on strategies for debuggin in Haskell.
            Notes on using the GHC profiling tools.
            The directory where all the files mentioned in the notes are kept.
    Assigned today:
    
    
    

  12. Thursday May 8, 2014
    Due Today:
            Homework #5.  Due today.
    Announcements:
    Readings:
    Class Topic:
            Midterm exam today. The exam is a take home exam. You have two hours to finish.
            It will be posted here early in the morning on May 8th. Due in the drop box
            by Midnight. You are honor bound to spend only 2 hours on the exam.
    
            The midterm exam is now posted. Place in the D2L dropbox when done.
    Assigned today:
            Homework #6.  Project proposal. Due via D2L by class time on Thursday May 15th, 2014.
    
    
    

  13. Tuesday May 13, 2014
    Due Today:
    Announcements:
    Readings:
            Hunit on the Haskell wiki.
            SmallCheck and Lazy SmallCheck.
              automatic exhaustive testing for small values
            Most recent version of small check
            LazySmallCheck on Hackage. I had trouble with this.
    Class Topic:
            Testing in Haskel using HUnit.
                    Using HUnit to develop programs, an example.
                    A larger case study.
            Testing using SmallCheck (by Matt Naylor).
    Assigned today:
    
    
    

  14. Thursday May 15, 2014
    Due Today:
            Homework #6.  Project proposal. Due today.
    Announcements:
    Readings:
            The lambda calculator.
            Rank-N types on the free online dictionary.
            Rank-N types on the Haskell wiki.
    Class Topic:
            Polymorphism, rank2 polymorphism, Hindley-Milner polymorphism,
                    Church encodings notes.
            Code from the notes.
    Assigned today:
            No homework assigned today. Get started on projects.
    
    

  15. Tuesday May 20, 2014
    Due Today:
    Announcements:
    Readings:
            GADTs on the GHC users guide.
            An interresting discussion about GADTs on Haskell for all.
    Class Topic:
            GADTs in Haskell notes.
            code from the notes.
    Assigned today:
    
    

  16. Thursday May 22, 2014
    Due Today:
    Announcements:
    Readings:
            Template Haskell syntax documentation
    Class Topic:
            Notes on Staging in Haskell.
            Two files used in the notes above. UTI.hs and Staging.hs
    Assigned today:
    
    
    

  17. Tuesday May 27, 2014
    Due Today:
    Announcements:
            Course on logic and programming languages.
    Readings:
            The lens package on Hackage.
            An overview page.
            The lens wiki.
    Class Topic:
            Lenses: compositional data access and manipulation.
                    A lecture by Simon Peyton Jones at skillsmatter.com.
            Some example code that uses Lenses.
    Assigned today:
    
    

  18. Thursday May 29, 2014
    Due Today:
    Announcements:
    Readings:
            Continuations on the Haskell wiki.
            Parallel programing library documentation.
            Documentation for Control.Parallel and Control.Parallel.Strategies
            Using SMP parallelism on GHC.
            Examples from Real World Haskell, Chapter 24.
    Class Topic:
            Continuations in Haskell notes.
                    code from the lecture.
            Programming a multi-core machines. Slides about Control.Parallel (thanks to Mark Jones).
                    Haskell code for SillyPar.hs a simple program using parallel annotations.
    Assigned today:
    
    
    

  19. Tuesday June 3, 2014
    Due Today:
    Announcements:
    Readings:
    Class Topic:
            Independent work on Final Projects
    Assigned today:
    
    

  20. Thursday June 5, 2014
    Due Today:
    Announcements:
    Readings:
    Class Topic:
            Final Class Projects Presentations.
    Assigned today:
    
    
    

  21. 
    Monday June 9, 2014
    Final Exam period 10:15 -> 12:05.
    The University scheduled final exam period is not the same day or time as normal class hours!
    We will use this time to schedule Final Project reports.
    

Back to the class web-page.