Türkçe | English
GRADUATE INSTITUTE of NATURAL and APPLIED SCIENCES / DEPARTMENT of COMPUTER ENGINEERING
Doctorate
Course Catalog
http://ceng.ktu.edu.tr/
Phone: +90 0462 3773157
FBE
GRADUATE INSTITUTE of NATURAL and APPLIED SCIENCES / DEPARTMENT of COMPUTER ENGINEERING / Doctorate
Katalog Ana Sayfa
  Katalog Ana Sayfa  KTÜ Ana Sayfa   Katalog Ana Sayfa
 
 

BIL7151Functional Programming3+0+0ECTS:7.5
Year / SemesterSpring Semester
Level of CourseThird Cycle
Status Elective
DepartmentDEPARTMENT of COMPUTER ENGINEERING
Prerequisites and co-requisitesNone
Mode of DeliveryFace to face
Contact Hours14 weeks - 3 hours of lectures per week
LecturerDoç. Dr. Hüseyin PEHLİVAN
Co-LecturerNone
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 OutcomesCTPOTOA
Upon successful completion of the course, the students will be able to :
PO - 1 : use basic functional techniques to solve simple problems.3,101,3
PO - 2 : define and use higher order functions.3,5,101,3
PO - 3 : define any kind of functions over lists.3,51,3
PO - 4 : apply Haskell primitives for defining new datatypes.3,5,101,3
PO - 5 : understand the main features of a lazy functional language.3,51,3
PO - 6 : manage input/output operations in a functional style.3,5,101,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

 
Contents of the Course
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
 WeekSubjectRelated Notes / Files
 Week 1Introducing Functional Programming
 Week 2Data Types
 Week 3Tuples and Lists
 Week 4Defining Functions
 Week 5Recursion and List Comprehension
 Week 6Higher-order Functions
 Week 7Generalization
 Week 8Checking Types
 Week 9Mid-term exam
 Week 10Algebraic Types
 Week 11Abstract Data Types
 Week 12Lazy Programming
 Week 13Case studies: Huffman Trees
 Week 14Programming with Actions
 Week 15Case studies: Parsers
 Week 16End-of-term exam
 
Textbook / Material
1Thompson, S. 2001; Haskell: The Craft of Functional Programming, 2nd ed., Addison Wesley, 600 p.
2Rabhi, F.A., Lapalme, G. 1999; Algorithms: A Functional Programming Approach, 1st ed., Addison Wesley, 256 p.
 
Recommended Reading
1Bird, R. 1998; Introduction to Functional Programming using Haskell, 2nd ed., Prentice Hall, 448 p.
2Cousineau, G., Mauny, M., Callaway, K. 1998; The Functional Approach to Programming, .English ed., Cambridge University Press, 460 p.
 
Method of Assessment
Type of assessmentWeek NoDate

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 workDuration (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 load181