|Module Name||Introduction to Functional Programming|
|ECTS Weighting||5 ECTS|
|Semester taught||Semester 1|
|Module Coordinator/s||Dr Andrew Butterfield|
Guest Links for Online Lectures:
Module Learning Outcomes
On successful completion of this module, students will be able to:
LO1. Develop programs in a high level functional language
LO2. Analyse and structure programs using Strong Typing
LO3. Demonstrate the use of higher-order programming inherent in functional languages
LO4. Use logical proof techniques to reason about functional programs.
LO5. 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 Examination (2hrs)||LO1, LO2, LO3, LO4|
|Exercise 0||Tool Setup/Usage||LO1, LO5||2%||1||2|
|Exercise 1||Basic FP Programming||LO1, LO2, LO5||4%||2||3|
|Exercise 2||Symbolic Programming||LO1, LO2, LO5||4%||5||6|
|Exercise 3||Program Reasoning||LO1, LO4, LO5||5%||8||9|
|Exercise 4||Higher-Order Programming||LO1, LO3, LO5||5%||10||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:||33 hours|
|Lecture (online)||30 hours|
|Seminar (face-to-face, CV19 restrictions permitting, online otherwise)||3 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||115 hours|
Recommended Reading List
- https://www.haskell.org/ [parts required]
- http://learnyouahaskell.com/ [recommended]
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.