Title:  Functional and Logic Programming 

Code:  FPR 

Ac.Year:  2005/2006 

Sem:  Summer 

Curriculums:  

Language of Instruction:  Czech, English 

Private info:  http://www.fit.vutbr.cz/study/courses/FPR/private/ 

Credits:  5 

Completion:  credit+exam (written) 

Type of instruction:  Hour/sem  Lectures  Seminar Exercises  Laboratory Exercises  Computer Exercises  Other 

Hours:  26  0  0  12  14 

 Exams  Tests  Exercises  Laboratories  Other 

Points:  60  20  0  0  20 



Guarantor:  Kolář Dušan, doc. Dr. Ing. (DIFS) 

Lecturer:  Kolář Dušan, doc. Dr. Ing. (DIFS) 
Instructor:  Kolář Dušan, doc. Dr. Ing. (DIFS) 

Faculty:  Faculty of Information Technology BUT 

Department:  Department of Information Systems FIT BUT 

Substitute for:  

 Learning objectives: 

  Obtaining a basic knowledge and practical experience in functional and logic programming. Introduction into formal concepts used as a theoretical basis for both paradigms.
 Description: 

  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), and Goedel. Moreover, principles of their implementation are mentioned too.  Knowledge and skills required for the course: 

  Processing (analysis, evaluation/interpretion/compilation) of programming languages, predicate logic.
 Subject specific learning outcomes and competencies: 

  Students will get basic knowledge and practical experience in functional and logic programming (two important representatives of declarative programming). Moreover, they will get basic information about theoretical basis of both paradigms and implementation techniques.  Generic learning outcomes and competencies: 

  Use and understanding of recursion for expression of algorithms.
 Syllabus of lectures: 


 Introduction to functional programming, lambda calculus
 Programming language Haskell, introduction, lists
 Userdefined data types, type classes, and arrays in Haskell
 Input/Ouput in Haskell  type classes IO and Monad
 Simple applications/programs in Haskell
 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
 Syllabus of computer exercises: 


 Introduction to Haskell environment (Hugs), simple functions, recursion, lists
 Infinite data structures
 User defined data types, input/output
 Practical problem
 Introduction to Prolog environment (Hugs), lists
 Practical problem
 Syllabus  others, projects and individual work of students: 


 A simple program in Haskell programming language (Hugs, GHC, GHCi).
 A simple program in Prolog/Gödel/CLP(R) (SWIPL, Gödel, CiaoProlog).
 Fundamental literature: 


 Thompson, S.: Haskell, The Craft of Functional Programming, ADDISONWESLEY, 1999, ISBN 0201342758
 Nilsson, U., Maluszynski, J.: Logic, Programming and Prolog (2ed), John Wiley & Sons Ltd., 1995
 Hill, P., Lloyd, J.: The Gödel Programming Language, MIT Press, 1994, ISBN 0262082292
 Jones, S.P.: Haskell 98 Language and Libraries, Cambridge University Press, 2003, p. 272, ISBN 0521826144
 Study literature: 


 Thompson, S.: Haskell, The Craft of Functional Programming, ADDISONWESLEY, 1999, ISBN 0201342758
 Nilsson, U., Maluszynski, J.: Logic, Programming and Prolog (2ed), John Wiley & Sons Ltd., 1995
 Hill, P., Lloyd, J.: The Gödel Programming Language, MIT Press, 1994, ISBN 0262082292
 Controlled instruction: 

 
 Midterm exam  written form, questions and exersises to be answered and solved (there are even questions with selection of one from several predefined answers), 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 together.
 Final exam  written form, questions and exersises to be answered and solved (there are even questions with selection of one from several predefined answers), 2 another corrections trials possible  60 points.
 Progress assessment: 

 
 Midterm exam, for which there is only one schedule and, thus, there is no possibility to have another trial.
 Two projects should be solved and delivered in a given date during a term.
 Exam prerequisites: 

  At the end of a term, a student should have at least 50% of points that he or she could obtain during the term; that means at least 20 points out of 40.  
