Skip to main content

DD2481 Principles of Programming Languages 7.5 credits

Choose semester and course offering

Choose semester and course offering to see current information and more about the course, such as course syllabus, study period, and application information.


For course offering

Spring 2025 popl25 programme students

Application code


Headings with content from the Course syllabus DD2481 (Autumn 2021–) are denoted with an asterisk ( )

Content and learning outcomes

Course contents

Formal languages, finite automata, context free grammars.

State, scope, extent, static and dynamic information, effects, mutability.

Basic operational semantics.

Abstraction mechanisms, modularity, contracts.

Types, invariants, program equivalence.

Tools for program analysis.

Examples of advanced features of programming languages.

Intended learning outcomes

After completion of the course, the student should be able to:

  • formally describe languages and program behavior,
  • precisely reason about state, effects, and mutation,
  • reason about and use mechanisms for abstraction and modularization,
  • define type systems formally,
  • prove type soundness,
  • reason about program equivalence,
  • define and reason about contracts,
  • discuss open questions about advanced language features and reflect critically over them,
  • write programs that implement various formalisms, mechanisms and language features

in order to

  • be able to take part in deeper discussions about principles of programming languages,
  • be prepared for courses in compiler construction.

Literature and preparations

Specific prerequisites


Recommended prerequisites

Programming, algorithms and datastructures correspoding  to one of the courses DD1320, DD1321, DD1325, DD1327, DD1338, DD1339, DD1340, DD1341, DD1346 or ID1020.


No information inserted


No information inserted

Examination and completion

If the course is discontinued, students may request to be examined during the following two academic years.

Grading scale

A, B, C, D, E, FX, F


  • LAB1 - Laboratory assignments, 3.5 credits, grading scale: P, F
  • TEN1 - Examination, 2.5 credits, grading scale: A, B, C, D, E, FX, F
  • UPP1 - Essay, 1.5 credits, grading scale: A, B, C, D, E, FX, F

Based on recommendation from KTH’s coordinator for disabilities, the examiner will decide how to adapt an examination for students with documented disability.

The examiner may apply another examination format when re-examining individual students.

Other requirements for final grade

Passed laboratory assignments, thesis and examination

Opportunity to complete the requirements via supplementary examination

No information inserted

Opportunity to raise an approved grade via renewed examination

No information inserted


Ethical approach

  • All members of a group are responsible for the group's work.
  • In any assessment, every student shall honestly disclose any help received and sources used.
  • In an oral assessment, every student shall be able to present and answer questions about the entire assignment and solution.

Further information

Course room in Canvas

Registered students find further information about the implementation of the course in the course room in Canvas. A link to the course room can be found under the tab Studies in the Personal menu at the start of the course.

Offered by

Main field of study

Computer Science and Engineering

Education cycle

Second cycle

Add-on studies

DD2489 Compiler construction


Philipp Haller (

Supplementary information

Grading criteria will be announced at the start of the course.

In this course, the EECS code of honor applies, see: