IT-Universitetet i København
 
  Tilbage Kursusoversigt
Kursusbeskrivelse
Kursusnavn (dansk):Programming Language Concepts and Implementation, Master 
Kursusnavn (engelsk):Programming Language Concepts and Implementation, Master (Professional education) 
Semester:Forår 2018 
Udbydes under:Master i it, Software Engineering (sen) 
Omfang i ECTS:7,50 
Kursussprog:Engelsk 
Kursushjemmeside:https://learnit.itu.dk 
Min. antal deltagere:15 
Forventet antal deltagere:
Maks. antal deltagere:20 
Formelle forudsætninger:Programming experience and mastering of Java.

Knowledge of discrete mathematics as taught in Foundations of
Computing - Discrete Mathematics (SGDM). 
Læringsmål:After this course you should be able to

* Write small programs in C# using delegates and generics and using type constraints and variance. Analyse Java and C# programs for typing

* Describe the C# machine model, in particular the use of the heap and the stack, and illustrate how memory develops during execution of programs.

* Explain the ideas and principles behind the use of virtual machines on the .NET platform and in the implementation of Java

* Explain the principles behind the implementation of the programming languages Java and C# using virtual stack machines, in particular the principles behind implementation of method calls and generics. Compile (by hand) small example programs from high level languages (both declarative and imperative) using functions, pointers and simple data structures to stack machine code. Show how programs are executed on a stack machine.

* Use recursion for analysis and transformation of abstract syntax, e.g. in type analysis, translation or reduction of logical or arithmetic expressions.

* Compare expressiveness of programming languages (in particular Java and C#) and explain how their properties follow from design decisions and implementation techniques.

* Describe and compare different memory management and garbage collection techniques. 
Fagligt indhold:Changes to the course description can occur until semester start

Programming languages are the most important tools in a software developer's tool box. Knowing the basic principles behind their implementation is crucial for constructing correct and efficient programs.

Building on knowledge of Java the first part of the course focuses on learning C# and in particular advanced concepts such as generics and delegates. We study the machine model, in particular we learn how memory is managed and how parameters are passed to methods. We study the basic principles behind the virtual machines JVM and CLR used in the implementations of C# and Java, and a large part of the course is devoted to the compilation process, i.e., the process of transforming a source program (which is initially just a string of characters) to a program that can be executed on a virtual machine. In the mandatory exercises the student will be asked to extend a compiler from a small toy source language with further programming language features.

In the final lecture we study memory management (including garbage collection algorithms).

In more details the program is as follows.

* The programming language C#, delegates, generics, enumerables, machine model, argument passing and data representation. Differences between C# and Java

* Lexical analysis, regular expressions, finite automata, deterministic and non-deterministic automata, lexers and lexer generators.

* Syntactical analysis, top-down vs bottom-up, LL versus LR, parser generators. Context free grammars.

* Stack machines, evaluation of expressions, post script, intermediate languages for stack machines

* Translation of imperative languages with loops and references

* The machine model behind Java and C# (the heap and the stack), translation from source code to stack machine code

* The intermediate languages of the Java Virtual Machine and the Common Language Infrastructure and their implementation

* Memory management and garbage collection 
Læringsaktiviteter:

14 weeks of teaching consisting of lectures and exercises. The exercise sessions and mandatory assignments focus on programming exercises but include also theoretical exercises. As part of the
mandatory assignments, students will extend a given compiler with new programming features.
The abstract syntax of these extensions will be given.

As preparation for the mandatory exam, lectures will include interactive elements such as exercise solving in plenum. The last
lecture will be dedicated to exam preparation, and students will be expected to prepare presentations at the board.

Be aware: The student will receive the grade NA (Not Approved) at the ordinary exam, if the mandatory activities are not approved and the student will use an exam attempt. 

Obligatoriske aktivititer:There are 5 mandatory assignments, out of which 4 must be approved for the student to qualify for the exam.
The deadlines are evenly distributed over the semester (approximately one every 3 weeks), exact dates will be posted on learnit the first week of the semester.

If a mandatory assignment is not approved the first time, the student will be allowed to resubmit exactly one week after the first deadline.
If this also fails, one more resubmission the following week is allowed.

Be aware: The student will receive the grade NA (not approved) at the ordinary exam, if the mandatory activities are not approved and the student will use an exam attempt. 
Eksamensform og -beskrivelse:B1I Mundtlig eksamen med forberedelse. På ITU, (7-scale, external exam)

The duration of the oral examination is 30 minutes with 30 minutes preparation.

At the exam students will draw a question and prepare a solution to be presented orally. The presentation will be followed by questions that may be in any topic of the curriculum. Questions on design of abstract syntax (a topic for the MSc version of this course) will not be asked at the exam.  

Litteratur udover forskningsartikler:P. Sestoft and Henrik I. Hansen, C# Precisely, second edition, The MIT Press 2012. ISBN 978-0-262-51686

P. Sestoft: Programming Language Concepts, Springer Undergraduate Texts in Computer Science. ISBN 978-1-4471-4155-6. July 2012.