CS 510 - Advanced Functional Programming - Daily Record - Winter Term 2016

Instructor: Tim Sheard
CRN: 45741 (undergrad) 45742 (grad)
Section 034 (undergrad) 031 (grad)
Title: CS 410 (undergrad) 510 (grad) TOP: ADV FUNCTIONAL PROGRAMMING
Meeting time: Monday and Wednesday 11:30-13:20
Classroom: Fourth Ave Building 171
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 and 2014. Here are the Of course, much has changed in the last 10 years, even in the last 2 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.

The schedule below lists a few topics. Other possible Choices.


  1. Monday January 4, 2016
    Due Today:
    Announcements:
    	Class Cancelled due to snow
    

  2. Wednesday January 6, 2016
    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:
    
    

  3. Monday January 11, 2016
    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:
            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 Wednesday January 20, 2016.
    
    
    

  4. Wednesday January 13, 2016
    Due Today:
    Announcements:
    	CS department Town Hall, Thursday Jan 14, 3:00-4:00PM, Room 86-01, News and Q.A witht the Dept. Head.
    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)
            Install the GLFW library by using "cabal install GLFW"
            notes in preparation for FRP (Shapes and Regions).
                    code in notes.
    Assigned today:
    
    
    

  5. Monday January 18, 2016
    Due Today:
    Announcements:
    	No class today, Martin Luther King's birthday.
    Readings:
    Class Topic:
    Assigned today:
    

  6. Wednesday January 20, 2016
    Due Today:
            Homework #1.  Due today.
    Announcements:
    	Tomorrow! 	CS department Town Hall, Thursday Jan 14, 3:00-4:00PM, Room 86-01, News and Q.A witht the Dept. Head.
    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 Monday January 25, 2016.
    

  7. Monday January 25, 2016
    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.
                    Some example code.
    Class Topic:
            Monads and language interpretors.
            The haskell code with the examples
    Assigned today:
            Homework #3.  Due via D2L by class time on Monday February 1, 2016.
    
    

  8. Wednesday January 27, 2016
    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:
    
    
    

  9. Monday February 1, 2016
    Due Today:
            Homework #3.  Due  today.
    Announcements:
            Midterm will be held February 10, 2016.
    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 Monday February 8, 2016.
    

  10. Wednesday February 3, 2016
    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:
    
    

  11. Monday February 8, 2016
    Due Today:
    Announcements:
    	I hope to return comments on project proposal today.
    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 arrow basics, and circuits as arrows.
                    Code from the lecture.
                    An arrow bibliography.
                    Code that describes circuits as arrows.
    Assigned today:
    
    
    

  12. Wednesday February 10, 2016
    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 Monday February 15th, 2016.
    
    
    

  13. Monday February 15, 2016
    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 just typed "cabal install smallcheck"  and "cabal install lazysmallcheck"
    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. Wednesday February 17, 2016
    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 February 8th. Due in the drop box
            by Midnight. You are honor bound to spend only 2 hours on the exam.
    
            A copy of the 2014 midterm exam is posted here for reference.
            Here is a link to the actual midterm for Feb 17, 2016.
            Don't forget to put your name and email on the exam!
            Place the completed exam in the D2L dropbox when done.
    Assigned today:
            Homework #6.  Project proposal. Due via D2L by class time on Monday February 22th, 2016.
    
    
    

  15. Monday February 22, 2016
    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.
    
    

  16. Wednesday February 24, 2016
    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. Monday February 29 , 2016
    Due Today:
    Announcements:
    Readings:
    	Quasi quotation on the Haskell wiki.
    	Quasi quotation on the School of Haskell.
    ClassTopic: QuasiQuoting
    	The code discussed in class (as a zip file).
    

  18. Wednesday March 2, 2016
    Due Today:
    Announcements: Summer Intern opportunity.
    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:
    

  19. Monday March 7, 2016
    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:
    

  20. Wednesday March 9, 2016
    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:
    
    
    

  21. 
    Thursday March 17, 2016
    Final Exam period 1230-1420
    The University scheduled final exam period is not the same day or time as normal class hours!
    See here.
    We will use this time to schedule Final Project reports.
    

Back to the class web-page.