ID2202 Compilers and Execution Environments 7.5 credits

Kompilatorer och exekveringsmiljöer

Show course information based on the chosen semester and course offering:

Offering and execution

No offering selected

Select the semester and course offering above to get information from the correct course syllabus and course offering.

Course information

Content and learning outcomes

Course contents *

The course covers technologies for implementation of programming languages by means of compilers, both for real and virtual execution environments, technologies to read, understand, translate, improve as well as execute programs:

  • To read programs: lexical analysis and syntax analysis. Finite state machines, regular expression context free grammars, LL and LR-parsing.
  • To understand programs: semantic analysis, type checking.
  • To translate programs: machines and instructions.
  • Intermediary code, choice of instructions, conventions for procedure calls.
  • To improve programs: machine independent optimisations; computer-oriented optimisations (register allocation, scheduling of instructions).
  • To execute programs: virtual execution environments and runtime systems. Memory management, garbage collection, to load and link programs, just-in-time compilation.

Intended learning outcomes *

Having passed the course, the student should be able to:

  • explain the general structure of a compiler
  • use methods for lexical, syntactic and semantic analysis
  • use methods for generation of machine code
  • use methods for optimizing programs
  • explain common components in execution environments

in order to

  • obtain an understanding of how a programming language is implemented as well as for the general theories that are used and how these can be applied.

Course Disposition

No information inserted

Literature and preparations

Specific prerequisites *

  • Completed course in basic computer engineering/architecture equivalent to IS1200 Computer Hardware Engineering.
  • Completed course ID1020 Algorithms and Data Structures or the equivalent.

Recommended prerequisites

IS1200 Computer Hardware Basics,
ID1218 Applied Programming or equivalent.


No information inserted


Modern Compiler Implementation in Java, Andrew W. Appel

Upplaga: Second Förlag: Cambridge University Press År: 2002


Examination and completion

Grading scale *

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

Examination *

  • INL1 - Assignments, 1.5 credits, Grading scale: P, F
  • TEN1 - Examination, 6.0 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.

In agreement with KTH´s coordinator for disabilities, it is the examiner who decides to adapt the examination for students in possession of a valid medical certificate. The examiner may permit other examination forms at the re-examination of few students

Opportunity to complete the requirements via supplementary examination

No information inserted

Opportunity to raise an approved grade via renewed examination

No information inserted


David Broman

Further information

Course web

Further information about the course can be found on the Course web at the link below. Information on the Course web will later be moved to this site.

Course web ID2202

Offered by

EECS/Computer Science

Main field of study *

Computer Science and Engineering

Education cycle *

Second cycle

Add-on studies

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.

Supplementary information

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