Course detail
Functional and Logic Programming
FIT-FLPAcad. year: 2017/2018
Practical applications and broader introduction into lambda calculus and predicate logic within the context of functional and logic programming languages. Within functional programming, abstract data types are discussed, as well as the use of recursion and induction, manipulation of lists and infinite data structures in language Haskell. Experience in logic programming is gained in programming languages Prolog (cut operator, state space search, database modification), CLP, and Goedel. Moreover, principles of their implementation are mentioned too.
Language of instruction
Number of ECTS credits
Mode of study
Guarantor
Department
Learning outcomes of the course unit
Use and understanding of recursion for expression of algorithms.
Prerequisites
Co-requisites
Planned learning activities and teaching methods
Assesment methods and criteria linked to learning outcomes
Course curriculum
- Syllabus of lectures:
- Introduction to functional programming
- Lambda calculus
- Programming language Haskell, introduction, lists
- User-defined data types, type classes, and arrays in Haskell
- Input/Output in Haskell - type classes IO and Monad
- Proofs in functional programming
- Denotational semantics, implementation of functional languages
- Introduction to logic programming, Prolog
- Lists, cut operator, and sorting in Prolog
- Data structures, text strings, operators - extensions of SWI Prolog
- Searching state space, clause management, and parsing in Prolog
- Goedel - logic programming language not using Horn clauses
- Implementation of logic languages, CLP, conclusion
- Haskell - basic language features, recursion, lists, partial application, higher-order functions (map, filter, foldX), infinite lists, partial evaluation
- Haskell - data types, monads, I/O
- Haskell - demonstration - construction of a simple interpreter using library Parsec
- Prolog - program structure, recursion, lists
- Prolog - dynamic predicates, advanced example on dynamic predicates
- Prolog - more advanced examples, tests on variable instantiation, state space search
- A simple program in Haskell programming language (Hugs, GHC, GHCi).
- A simple program in Prolog/Gödel/CLP(R) (SWIPL, Gödel, CiaoProlog).
Syllabus of computer exercises:
Syllabus - others, projects and individual work of students:
Work placements
Aims
Specification of controlled education, way of implementation and compensation for absences
- Mid-term exam - written form, questions and exercises to be answered and solved, no possibility to have a second/alternative trial - 20 points.
- Projects realization - 2 projects, implementation of a simple program according to the given specification - one in a functional programming language the other in a logic programming language - 20 points all projects together.
- Final exam - written form, questions and exercises to be answered and solved, 2 another corrections trials possible (60 points - the minimal number of points which can be obtained from the final exam is 25, otherwise, no points will be assigned to a student).
Recommended optional programme components
Prerequisites and corequisites
Basic literature
Recommended reading
Classification of course in study plans
- Programme IT-MSC-2 Master's
branch MMI , 1 year of study, summer semester, compulsory
branch MBI , 0 year of study, summer semester, elective
branch MSK , 0 year of study, summer semester, elective
branch MMM , 0 year of study, summer semester, compulsory
branch MBS , 1 year of study, summer semester, compulsory
branch MPV , 0 year of study, summer semester, compulsory-optional
branch MIS , 1 year of study, summer semester, compulsory
branch MIN , 1 year of study, summer semester, compulsory
branch MGM , 0 year of study, summer semester, compulsory-optional
Type of course unit
Lecture
Teacher / Lecturer
Syllabus
- Introduction to functional programming
- Lambda calculus
- Programming language Haskell, introduction, lists
- User-defined data types, type classes, and arrays in Haskell
- Input/Output in Haskell - type classes IO and Monad
- Proofs in functional programming
- Denotational semantics, implementation of functional languages
- Introduction to logic programming, Prolog
- Lists, cut operator, and sorting in Prolog
- Data structures, text strings, operators - extensions of SWI Prolog
- Searching state space, clause management, and parsing in Prolog
- Goedel - logic programming language not using Horn clauses
- Implementation of logic languages, CLP, conclusion
Exercise in computer lab
Teacher / Lecturer
Syllabus
- Haskell - basic language features, recursion, lists, partial application, higher-order functions (map, filter, foldX), infinite lists, partial evaluation
- Haskell - data types, monads, I/O
- Haskell - demonstration - construction of a simple interpreter using library Parsec
- Prolog - program structure, recursion, lists
- Prolog - dynamic predicates, advanced example on dynamic predicates
- Prolog - more advanced examples, tests on variable instantiation, state space search