Objectives and Content
Imperative programming (including object-orientation) is based on the transitions between states. Declarative programming comprises a series of paradigms in which program can be given also another interpretation: not only as a series of intructions to a machine, but also as a formula with a declarative meaning independent from any program states. Execution of a program corresponds always to this declarative interpretation which contributes to the development and maintenance of correct software.
The imperative pradigm (e.g., Java, C, Pascal) is confronted with distinct declarative pradagims:
1. functional languages based on algebra (ML, Lisp)
2. logical languages based on first-order logic (Prolog), and possibly
3. query languages for databases (Datalog)
I121: 10 ECTS, INF121A: 5 ECTS
Semester of Instruction
After completing the course INF121, the student shall be able to
- read the grammar of a large programming language and write a grammar for a small language,
- understand concrete and abstract syntax, as well as simple parsing,
- program in Haskell with functions
- understand and use recursion, recursive datatypes (lists, trees), types, type inference, higher-order and polymorphy,
- program in Prolog with relations, construct datastructures (lists, trees) with first-order terms,
- use recursion and unification as compuational devices.
- construct small deductive databases in Datalog.
Forms of Assessment
Written exam. It is opportunity for grades on exercises, which can be included in the final grade. If less than 20 students are taking the course, it can be oral exam.
The grading scale used is A to F. Grade A is the highest passing grade in the grading scale, grade F is a fail.