Skip to content
Norsk A A A
Course INF121

Programming Paradigms

Course offered :

Number of credits 10
Course offered (semester) Autumn
Subject overlap

I121: 10 ECTS, INF121A: 5 ECTS

Schedule Schedule
Reading list Reading list

Aim 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)

Learning Outcomes

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.

Course offered (semester)

Autumn

Language of Instruction

Norwegian

Pre-requirements

INF100, INF109 or equivalent programming course

Recommended previous knowledge

INF101 and MNF130

Subject Overlap

I121: 10 ECTS, INF121A: 5 ECTS

Assessment methods

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.

Grading Scale

The grading scale used is A to F. Grade A is the highest passing grade in the grading scale, grade F is a fail.