|Module Name||Introduction to Functional Programming|
|ECTS Weighting ||5 ECTS|
|Semester Taught||Semester 1|
|Module Coordinator/s||Dr Andrew Butterfield|
Module Learning Outcomes
On successful completion of this module, students will be able to:
- Develop programs in a high level functional language;
- Analyse and structure programs using Strong Typing;
- Demonstrate the use of higher-order programming inherent in functional languages;
- Use logical proof techniques to reason about functional programs;
- Use appropriate software development tools.
Functional programming languages present a powerful, abstract, and important direction in programming languages. The high level of abstraction and the expressive syntax makes program decomposition and composition unusually easy, while the close connections to the underlying semantics make formal reasoning tractable. Systems such as Google’s “Map/Reduce” framework demonstrate the influence of this approach, and the importance to a computer scientist of understanding it.
This modules uses the functional programming language called “Haskell” to introduce key concepts such as how to compute using functions, and how these languages can easily support powerful features such as pattern-matching, recursion, strong typing, type polymorphism, higher-order functions, laziness, and type classes. Practical exercises are based around the use of software development tools (Haskell “stack”) that support test automation. We also study the theoretical and formal underpinnings of such languages (lambda calculus), and how much easier it is to do formal reasoning regarding program properties using logical proofs.
Teaching and Learning Methods
The course is delivered through a mix of (live online, recorded) lectures and (live face2face/online) tutorials, with regular short graded exercises being given to assess learning outcomes. There are no formal laboratory slots, and any instruction on how to setup and use tools will be done in on-line lectures.
|Assessment Component||Brief Description||Learning Outcomes Addressed||% of Total||Week Set||Week Due|
|Examination||In person (2 hours)||LO1, LO2, LO3, LO4|
|Exercise 1||Tool Setup/Usage||LO1, LO5||2%||Week 1||Week 2|
|Exercise 2||Basic FP Programming||LO1, LO2, LO5||4%||Week 2||Week 3|
|Exercise 3||Symbolic Programming||LO1, LO2, LO5||4%||Week 5||Week 6|
|Exercise 4||Program Reasoning||LO1, LO4, LO5||5%||Week 8||Week 9|
|Exercise 5||Higher-Order Programming||LO1, LO3, LO5||5%||Week 10||Week 11|
In person Exam (2 hours, 100%).
Contact Hours and Indicative Student Workload
|Contact Hours (scheduled hours per student over full module), broken down by:||31 hours|
|Lecture (online)||22 hours (*)|
|Seminar (face-to-face, CV19 restrictions permitting, online otherwise)||9 hours (*)|
|Independent Study (outside scheduled contact hours), broken down by:||72 hours|
|Preparation for classes and review of material (including preparation for examination, if applicable)||36 hours|
|Completion of assessments (including examination, if applicable)||36 hours|
|Total Hours||103 hours|
Recommended Reading List
Prerequisite modules: N/A
Other/alternative non-module prerequisites: Familiarity with a main-stream (imperative) programming language, such as Java, C, python, or similar, and some experience in programming with that language. No prior experience with functional programming languages such as Haskell, ML, OCaml, Scheme, LISP, etc., is required.
Guest Links for Online Lectures: