|
BIL7151 | Functional Programming | 3+0+0 | ECTS:7.5 | Year / Semester | Spring Semester | Level of Course | Third Cycle | Status | Elective | Department | DEPARTMENT of COMPUTER ENGINEERING | Prerequisites and co-requisites | None | Mode of Delivery | Face to face | Contact Hours | 14 weeks - 3 hours of lectures per week | Lecturer | Doç. Dr. Hüseyin PEHLİVAN | Co-Lecturer | None | Language of instruction | | Professional practise ( internship ) | None | | The aim of the course: | This course aims to introduce the functional programming paradigm via the Haskell language, developing a broad understanding of the benefits of the functional programming style and the construction of functional programs as a process of mathematical calculation, together with an understanding of implementation issues for functional languages. |
Programme Outcomes | CTPO | TOA | Upon successful completion of the course, the students will be able to : | | | PO - 1 : | use basic functional techniques to solve simple problems. | 3,10 | 1,3 | PO - 2 : | define and use higher order functions. | 3,5,10 | 1,3 | PO - 3 : | define any kind of functions over lists. | 3,5 | 1,3 | PO - 4 : | apply Haskell primitives for defining new datatypes. | 3,5,10 | 1,3 | PO - 5 : | understand the main features of a lazy functional language. | 3,5 | 1,3 | PO - 6 : | manage input/output operations in a functional style. | 3,5,10 | 1,3 | CTPO : Contribution to programme outcomes, TOA :Type of assessment (1: written exam, 2: Oral exam, 3: Homework assignment, 4: Laboratory exercise/exam, 5: Seminar / presentation, 6: Term paper), PO : Learning Outcome | |
Introducing functional programming: Haskell programs, using Hugs, program syntax, expressions, standard libraries, modules, error and error messages. Data types: Basic types and definitions, tuples, lists, list comprehensions, polymorphism, overloading, guards. Defining functions: Pattern matching, lists and list patterns, primitive recursion over lists, function-level definitions, function composition, currying and uncurrying, local definitions. Generalization: Patterns of computation over lists, higher-order functions, folding and primitive recursion, splitting up lists. Checking types: Monomorphic type checking, polymorphic type checking, type checking and classes. Algebraic types: Introducing algebraic types, recursive algebraic types, polymorphic algebraic types. Abstract data types: Type representations, queues, design, simulation, search trees, sets, relations and graphs. Lazy programming: Lazy evaluation, calculation rules, data-directed programming, parsing expressions, infinite lists. Case studies: Huffman codes, coding and decoding, building Huffman trees. Programming with actions: The basics of input/output, iteration and recursion, the do construct, monads, monadic computation over trees. |
|
Course Syllabus | Week | Subject | Related Notes / Files | Week 1 | Introducing Functional Programming | | Week 2 | Data Types | | Week 3 | Tuples and Lists | | Week 4 | Defining Functions | | Week 5 | Recursion and List Comprehension | | Week 6 | Higher-order Functions | | Week 7 | Generalization | | Week 8 | Checking Types | | Week 9 | Mid-term exam | | Week 10 | Algebraic Types | | Week 11 | Abstract Data Types | | Week 12 | Lazy Programming | | Week 13 | Case studies: Huffman Trees | | Week 14 | Programming with Actions | | Week 15 | Case studies: Parsers | | Week 16 | End-of-term exam | | |
1 | Thompson, S. 2001; Haskell: The Craft of Functional Programming, 2nd ed., Addison Wesley, 600 p. | | 2 | Rabhi, F.A., Lapalme, G. 1999; Algorithms: A Functional Programming Approach, 1st ed., Addison Wesley, 256 p. | | |
1 | Bird, R. 1998; Introduction to Functional Programming using Haskell, 2nd ed., Prentice Hall, 448 p. | | 2 | Cousineau, G., Mauny, M., Callaway, K. 1998; The Functional Approach to Programming, .English ed., Cambridge University Press, 460 p. | | |
Method of Assessment | Type of assessment | Week No | Date | Duration (hours) | Weight (%) | Mid-term exam | 9 | 18/04/2024 | 2 | 30 | In-term studies (second mid-term exam) | 13 | 16/05/2024 | 2 | 20 | End-of-term exam | 16 | 06/06/2024 | 2 | 50 | |
Student Work Load and its Distribution | Type of work | Duration (hours pw) | No of weeks / Number of activity | Hours in total per term | Yüz yüze eğitim | 3 | 14 | 42 | Sınıf dışı çalışma | 5 | 14 | 70 | Arasınav için hazırlık | 15 | 1 | 15 | Arasınav | 2 | 1 | 2 | Ödev | 30 | 1 | 30 | Dönem sonu sınavı için hazırlık | 20 | 1 | 20 | Dönem sonu sınavı | 2 | 1 | 2 | Total work load | | | 181 |
|