UW, COSC 3015, Fall 2009

Department of Computer Science
University of Wyoming


COSC 3015:
Functional Programming

Fall 2008
SYLLABUS


Professor: CaldwellE-mail: jlc@cs.uwyo.edu
Office: 4074 Engineering BuildingPhone:766-4913
Office hours: Tuesday and Thursday 10:50-11:20, 2:35-3:35, Wednesday 11-12, 11-2
Class: meets Tuesday and Thursday from 1:20 to 2:35 in EN 2101.
Web Page: http://www.cs.uwyo.edu/~jlc/courses/3015/
Grader: Sunil Kothari E-mail: skothari@uwyo.edu
Office:4093 Engineering BuildingPhone:766-5147

Prerequisites: COSC 2030

Textbooks:

  • Required:
    Programming in Haskell  
    by Graham Hutton Cambridge University Press, 2007
  • Recommended:
    Haskell: The Craft of Functional Programming (2nd Edition)  
    by Simon Thompson Addison Wesley, 1999
    This book is widely used for teaching Haskell based functional programming courses.
    Purely Functional Data Structures
    by Chris Okasaki,Cambridge University Press, 1999
    An excellent reference on efficient data structures and algorithms in a functional setting. Not required but highly recommended.
    Introduction Functional Programming using Haskell
    by Richard Bird, Prentice Hall, 1998
    The classic text introducing functional programming n Haskell. There are some newer titles (e.g.Hutton) but I believe this is the best book currently out there.
    errata sheet
    Higher-Order Perl: Transforming Programs with Programs
    by Mark Jason Dominus, Morgan Kaufmann, 2005
    This highly praised book applies techniques of function programming in the setting of the Perl programming language.

    Abstract: Functional programming languages are distinguished from the "ordinary" imperative programming languages you already know ( e.g. Java, C++) by

    In this course we will cover the techniques of functional programming and will discuss applications of these techniques in other contexts of programming and software design.

    Grading and Other Policies: Grades will be based on written homework, an in-class midterm exam and a final exam. A standard grading scale will be used, where an overall average of 90%-100% earns an A, 80%-89% a B, 70%-79% a C, 60%-69% a D and 0%-59% an F. Work is due at the beginning of class, and late work is accepted for a few days, or until a solution is distributed, at a substantial reduction in credit each day. Returned work should be kept for verification of records.

    Midterm Exam

    25%
    Homework
    45%
    Final Exam
    30%

    100%

    The professor reserves the right to alter the grading scheme or to take extenuating circumstances into account when assigning grades. Discussion of the course material among students is encouraged, although students are expected to write up their own homework. Academic dishonesty will be treated in accordance with university standards. Students are urged to read University regulation 802 , section 3 defines academic dishonesty. University regulation 203 describes students rights to appeal and the appeal process.

    Homework:

    >
    No. Due Date Assignment Remarks
    1 Thursday: August 28 Read the following articles: To get a leg up, you should install Hugs on your own computer. Then, Try running the quicksort code given in class. Also, there is a new (currently) free online book real World Haskell by Bryan O'Sullivan, Don Stewart and John Goerzen -- it looks pretty good.  
    2 Tuesday: September 1 If you have not already done so, install HUGS on your computer.
    Do the following assignment hw2.
    Email your homework to cosc3015@cs.uwyo.edu
    Note: product is defined in the prelude so in doing problem 3 you'll get a name clash, rename your version to be something else like myproduct.
    Also: qsort must be formatted as shown in the text -- if you're having trouble getting you programs to run, see "The layout rule" on page 15 of the Hutton text.
    3 Thursday: September 3 hw3.pdf Wednesday 5:53 PM -- some typos in the homework problems were fixed.
    4 Tuesday: September 8 hw4.pdf  
    5 Thursday: September 10 hw5.pdf To stay ahead ... read chapter 7 as well -- this one is a bit more difficult.
    6 Tuesday: September 15 hw6.pdf  
    7 Thursday: September 17 hw7.pdf  
    8 Thursday: September 24 hw8.pdf Interactive session from class today.
    The code from the book: Parsing.lhs
    9 Tuesday: September 29 hw9.pdf Parsing.lhs , Expr.hs
    10 Tuesday: October 6 hw10.pdf Parsing.lhs , Lexp.hs
    This is a bit harder than previous exercises.
    Some documentation on the Haskell layout rule (with special attentaion to do-notation.)
    11 Fiday: October 9 Do problems 3 and 4 on page 115 of the Hutton text using the following
    data Tree a = Leaf a | Node (Tree a) (Tree a) deriving Show
     
    12 Thursday: October 9 hw12.pdf Checker.hs
    13 Thursday: October 22 hw13.pdf Lists.hs, Sets.hs
    14 Thursday: October 29 hw14.pdf
    Wikipedia: Fixed point combinator
    Wikipedia: Evaluation Strategy
    Base code: Lambda.hs
    Some test code: Lambda_test.hs
    Some output hw14_expected.txt
    15 Tuesday: November 3 Read Chapter 13 of Hutton, do problem 2 and 3 on pp. 154
    16 Thursday: November 5 hw16.pdf  
    17 Tuesday: November 10 hw17.pdf  
    18 Thursday: November 12 hw18.pdf  
    19 Tuesday: November 24 hw19.pdf Type_inference.hs
    Some test cases
    Thursday's lecture will cover unification, this could be difficult to complete before then.

    Exams: