SubjectsSubjects(version: 901)
Course, academic year 2021/2022
Non-procedural Programming - NPRG005
Title: Neprocedurální programování
Guaranteed by: Department of Software and Computer Science Education (32-KSVI)
Faculty: Faculty of Mathematics and Physics
Actual: from 2020
Semester: summer
E-Credits: 5
Hours per week, examination: summer s.:2/2 C+Ex [hours/week]
Capacity: unlimited
Min. number of students: unlimited
Virtual mobility / capacity: no
State of the course: taught
Language: Czech, English
Teaching methods: full-time
Additional information:
Guarantor: doc. RNDr. Tomáš Dvořák, CSc.
RNDr. Jan Hric
Class: Informatika Bc.
Informatika Mgr. - učitelské studium informatiky
Classification: Informatics > Programming
Incompatibility : NPRX005
Interchangeability : NPRX005
Is incompatible with: NPRM046, NPRX005
Is pre-requisite for: NAIL024, NPFL049
Is interchangeable with: NPRX005
Annotation -
Last update: T_KSVI (18.04.2012)
An introduction to the principles of logical and functional programming, explained in terms of programming languages Prolog and Haskell. The course also provides a basic knowledge of LISP (Scheme).
Course completion requirements -
Last update: doc. RNDr. Tomáš Dvořák, CSc. (24.03.2018)

The course is concluded with a credit and a final exam. The credit is awarded upon successfully completing the following requirements:

  • submitting a programming project including the user and developer documentation on a topic assigned by the instructor
  • obtaining the required score from homework assignments or tests assigned in tutorials

The final exam consists of a written and an oral part. The grade is based on results of both parts. Problems assigned in the written part correspond to the syllabus and the material covered in tutorials. Questions posed in the oral part explore the topics included in the syllabus to the extent that these topics are covered in lectures.

Literature -
Last update: doc. RNDr. Tomáš Dvořák, CSc. (12.02.2022)

Richard Bird, Jeremy Gibbons, Algorithm Design with Haskell, Cambridge University Press, 2020

Ivan Bratko, Prolog Programming for Artificial Intelligence, 4th ed., Pearson, 2012

William F. Clocksin, Christopher S. Mellish, Programming in Prolog: Using the ISO Standard, 5th ed., Springer, 2003

Michael Genesereth, Vinay K. Chaudhri, Introduction to Logic Programming, Morgan & Claypool Publishers, 2020

Graham Hutton, Programming in Haskell, 2nd ed., Cambridge University Press, 2016

Hector J. Levesque, Thinking as Computation: A First Course, The MIT Press, 2017

Miran Lipovaca, Learn You a Haskell for Great Good!: A Beginner's Guide, No Starch Press, 2011

Syllabus -
Last update: doc. RNDr. Tomáš Dvořák, CSc. (09.09.2011)

1. Syntax of Prolog programs and their interpretation, unification, backtracking. Declarative and operational semantics of program.

2. Lists and recursive data structures. Built-in predicates and their uses.

3. Arithmetic in Prolog. Input and output. Definition of operators.

4. Cut and negation.

5. Efficiency of Prolog programs, incomplete data structures.

6. Functional programming, basics of LISP (Scheme).

7. Haskell: basic syntax, 2D layout, lazy evaluation.

8. Function definition, recursion, pattern matching. List comprehensions.

9. User-defined types and data structures, polymorphism, type classes.

10. Higher-order functions. Infinite data structures.

11. Input and output, monads.

Charles University | Information system of Charles University |