Pierre Flener, PhD, senior lecturer, docent at Uppsala University, IT Department, room 1336 in building 1 of MIC
Personal webpage: http://user.it.uu.se/~pierref/, email: Pierre.Flener at it.uu.se, phone 018 / 471-1028
The main objective is to make you familiar with some of the fundamental principles and methodologies of algorithm and data-structure design in (pure) functional programming languages, using Standard ML (SML) as the teaching medium. The lectures are in English, by the instructor, and have a slight theoretical flavour, but with many examples.
More practice of functional programming (in SML) is acquired through labs and assignments. Several assignments are to be prepared at home, then tried and improved on the computer in labs under assistant supervision, then submitted, and finally graded by an assistant.
Either of the following textbooks is suitable:
- R. Bosworth: Functional Programming Using Standard ML, McGraw Hill, 1995
- M. Felleisen, D.P. Friedman, D. Bibby, and R. Milner: The Little MLer, MIT Press, 1998
- P. Henderson: Functional Programming: Application and Implementation, 1980
- Ch. Reade: Elements of Functional Programming, Addison-Wesley, 1989
- Å. Wikström: Functional Programming Using SML, Prentice Hall, 1987
- Riccardo Pucella: Notes on Programming SML/NJ
- Stephen Gilmore: Programming in Standard ML'97: An On-line Tutorial
- Standard ML of New Jersey User's Guide
- Standard ML Basis Library
- MLton, an open-source, whole-program, optimising SML compiler
- Moscow ML, a light-weight implementation of SML
- Philip Wadler: Functional Programming Column at ACM SIGPLAN Notices
- Frequently Asked Questions about ML
- IT Dept: On-line Documentation
- IT Dept: Nya Datorhandboken
To be able to follow the course productively, get practice, and work on the programming assignments, you should have an easily accessible Internet-connected computer with the following software installed:
The theory is taught in English in 5 Friday sessions of 2 three-hour-lectures each (09:15-12:00 and 13:15-16:00), all in room 1311 in building 1 of MIC.
For administrative reasons, the first three-hour-lecture is mandatory: contact the instructor if you cannot make it for some reason.
Attendance at the other lectures is highly recommended, as the essential aspects (in the eyes of the instructor) will be pointed out and as the slides are not self-contained at all: they are only a support for the lectures, but not equivalent to their content.
Free printed copies of the slides are handed out in the classroom. The lectures include adapted material from Yves Deville, Chris Okasaki, and Justin Pearson.
- Session 0: 29 Oct 2004 (Introduction) (SML and Programs) (Recursion and Programs)
- Session 1: 12 Nov 2004 (Lists and Programs) (Datatypes and Programs) (Abstract Datatypes and Programs)
- Session 2: 26 Nov 2004 (Higher-Order Functions and Programs) (Modules and Programs) (plus mid-course evaluation)
- Session 3: 10 Dec 2004 (Sorting and Programs) (Heaps and Programs)
- Session 4: 17 Dec 2004 (Greedy Algorithms and Programs) (Constraint Processing and Programs) (Conclusion) (plus course evaluation and exam preparation through questions & answers)
The assistant Rafal Somla (office hours: Thursdays 14-16) supervises 4 Saturday labs of 3 hours each (9:15-12:00), all in Unix lab 1515 in building 1 of MIC. He can be reached by email via fp-course at it.uu.se. There will be no lessons.
The initial lab aims at familiarisation with the SML/NJ language and programming environment. The last 3 labs each aim at personal support while completing and improving solutions to one of the mandatory 3 assignments.
Attendance at the labs is highly recommended. Also, without significant, constant practice and feedback, it is provably very hard to prepare properly for any exam.
Here are the rules about submitting solutions to the assignments:
- Lab 0: 30 Oct 2004 (Tasks)
- Lab 1: 13 Nov 2004 (Assignment 1)
- Lab 2: 27 Nov 2004 (Assignment 2)
- Lab 3: 11 Dec 2004 (Assignment 3)
These rules are effective as of 8 Nov 2004. The instructor reserves the right to modify them at any moment, should special circumstances call for this.
- All solutions must be submitted via the online course manager system. Use your UpUnet password A. Emailed and printed solutions will be ignored.
- The submission of a solution until the specific deadline of an assignment guarantees grading by 23:59 on the next Friday of any answers to the mandatory (sub-)questions; the other answers will be graded as soon as possible. Grading will only start after the specific deadline, so you can submit multiple times until then and overwrite previous solutions. A first solution submitted after the specific deadline is only graded when an assistant finds the time.
- The submission of an acceptable solution to an assignment earns you a godkänd (G) grade for that assignment. Otherwise, you earn a komplettering (K) grade for that assignment. The acceptability threshold is at the discretion of the instructor and the assistants. It is much higher than at the exam, as the aim is to learn and to prepare for the exam. It includes at least completeness and compliance with the coding convention of this course. Even correctness may be insufficient: some compliance with functional programming style is expected, rather than just transcribing programs thought out in imperative or object-oriented style.
- If you get a K grade for an assignment, then you may submit an improved solution during the period where the course takes place, at most 2 more times if you submitted your first solution by the specific deadline, and at most 1 more time otherwise: it is recommended that you show your solution to an assistant in person before submitting any last solution. An improved solution is only graded when an assistant finds the time. To avoid wasting one of your solution attempts, it is recommended that you wait until getting a grade for that assignment.
- All submitted solutions must be prepared by yourself: see the ethics rules of this course.
- The ultimate deadline for the submission of any solutions is at 07:59 on Monday 17 January 2005. Solutions submitted later than that will not be graded.
- Students from previous years who have not collected all the G grades for their assignments should contact the instructor, with complete details about their case. Some assignments of the current year will be given to them, under the same rules as for the students of the current year.
Assignments from previous years: Autumn 2003.
This course has a total of 5 credit points, distributed over the exam and the assignments:
The next exam is on Fri 8 Apr 2005.
- We have individual, closed-book, written exams. Submitted answers must comply with the coding convention and ethics rules of this course. The 4 credit points for the exam are awarded if your exam points are in the interval 50%..100% of the maximum. Furthermore, a väl godkänd (VG) grade is earned for the interval 85%..100%, while a godkänd (G) grade is earned for the interval 50%..84%. In all other cases, an underkänd (U) grade is earned.
- The 1 credit point for the assignments is awarded upon collection of G grades for all the assignments.
Old Exams (by the current instructor): December 2004, January 2004, December 2003 (slightly revised, for better practice).
Also see the old exams by the instructor in the related PM1 and PK1 courses.
Old Exams (by another instructor!): January 2000, December 1999.
Course evaluations are important and should include all opinions, including those of students who have no complaints:
Urgent, constructive feedback on the course or staff is welcome any time, including anonymous notes in the instructor's mailbox (129) on the 4th floor of building 1 of MIC.
- An informal, anonymous, intermediate evaluation of the course will be conducted in the classroom on Fri 26 Nov 2004 (Session 2) at 11:45. If you cannot attend, then please fill out the opinion-poll form and send it to the instructor or drop it in the instructor's mailbox (129) on the 4th floor of building 1 of MIC.
- A formal, anonymous, final evaluation of the course will be conducted in the classroom on Fri 17 Dec 2004 (Session 4) at 11:45. If you cannot attend, then please fill out the evaluation form and send it to the instructor or drop it in the instructor's mailbox (129) on the 4th floor of building 1 of MIC.
The instructor will answer all questions other than software infrastructure issues, for which the assistants are responsible. Preferably ask the instructor in person during the breaks of a lecture session, otherwise meet him Wednesdays 10-12 in his office. Email is not an effective medium for discussing programming issues, and the instructor cannot guarantee a fast turn-around on emailed questions.