Skip to content


Declarative Languages 7.5 credits

Deklarativa språk
Second cycle, D7012E
Course syllabus valid: Spring 2022 Sp 3 - Present
The version indicates the term and period for which this course syllabus is valid. The most recent version of the course syllabus is shown first.

Education level
Second cycle
Grade scale
G U 3 4 5
Computer Science
Subject group (SCB)
Computer Technology
Main field of study
Computer Science and Engineering

Entry requirements

Knowledge of imperative programming (D0009E Introduction to Programming) and object-oriented programming & design (D0010E Object-oriented Programming and Design). Functions and relations, combinatorics, set theory, state automata (M0009M Discrete Mathematics). Searching and sorting, common data structures like queues, stacks, lists, trees and graphs (D0012E Algorithms and Data Structures). Good knowledge in English equivalent to English 6.

More information about English language requirements


The selection is based on 20-285 credits

Course Aim
The student should
  1. Demonstrate knowledge of best practices for software development in functional and logic-based languages and its scientific foundation.
  2. Demonstrate the ability to critically, independently analyze and model complex problems and use appropriate methods to plan and solve problems through declarative software and analyze and evaluate the results.
  3. Demonstrate the ability to create technological solutions using polymorphic type systems in functional languages ​​ , and to critically evaluate and analyze them.
  4. Demonstrate the ability to create technological solutions, using the declarative search algorithms in logic-based languages ​​ , and to critically evaluate and analyze them.
  5. Demonstrate the ability to identify the need for and acquire further knowledge by solving problems that require acquisition of considerable body of knowledge on their own.
  6. Show awareness of research and development by understanding the limitations and possibilities of declarative programming.
  7. Show profound knowledge of functional programming and broad knowledge of it including the application of functional programming in traditional languages .

Expressions vs. commands, functional programming, pattern matching, higher order functions, recursion over lists and trees. Static type safety, polymorphic types, overloading with type classes, type inference, type abstraction, introduction to expressive module systems. Declarative programming of effects, monads. Relations vs. functions from an operational view, logic programming, unification and back-tracking. Properties of declarative programs, evaluation semantics, referential transparency. Declarative programming in classic languages.

Each course occasion´s language and form is stated and appear on the course page on Luleå University of Technology's website.
The first half of the course is devoted to functional programming using Haskell while the second part focuses on logic programming using Prolog. Instruction consists of lectures and laboratory work. Lab assignments are reported in writing and by demonstration, and may be associated with a deadline. Homework assignments that render credit marks on the subsequent written exam may also occur during the course.

If there is a decision on special educational support, in accordance with the Guideline Student's rights and obligations at Luleå University of Technology, an adapted or alternative form of examination can be provided.
Written exam as well as written and oral lab assignment reports. Passing the lab assignment part of the course requires a passed grade on all individual assignments.

The course goals are examined as follows:

Goals 1, 2, and 6: Written exam.
Goals 2, 3, 4, 5, 6, and 7: Lab assignments.

Håkan Jonsson

Literature. Valid from Spring 2019 Sp 3 (May change until 10 weeks before course start)
Simon Thompson: Haskell - The Craft of Functional Programming, 2/E
ISBN-10: 0201342758, ISBN-13: 9780201342758

Paul Brna: Prolog Programming

Ivan Bratko. PROLOG Programming for Artificial Intelligence, 3rd ed. Addison-­Wesley, Harlow, 2001

Course offered by
Department of Computer Science, Electrical and Space Engineering

CodeDescriptionGrade scaleCrStatusFrom periodTitle
0002Laboratory workU G#3.00MandatoryA07
0003Written examG U 3 4 54.50MandatoryS22

Study guidance
Study guidance for the course is to be found in our learning platform Canvas before the course starts. Students applying for single subject courses get more information in the Welcome letter. You will find the learning platform via My LTU.

Syllabus established
by Department of Computer Science and Electrical Engineering 28 Feb 2007

Last revised
by Jonny Johansson, HUL SRT 17 Feb 2021