IT-Universitetet i København
 
  Tilbage Kursusoversigt
Kursusbeskrivelse
Kursusnavn (dansk):Programmeringssprog, fortolkere og oversættere 
Kursusnavn (engelsk):Programming Languages, Interpreters and Compilers 
Semester:Forår 2004 
Udbydes under:cand. it, softwareudvikling (swu) 
Omfang i ECTS:7,50 
Kursussprog:Engelsk 
Kursushjemmeside:https://learnit.itu.dk 
Min. antal deltagere:
Forventet antal deltagere:20 
Maks. antal deltagere:40 
Formelle forudsætninger:Introductory Programming plus another programming-oriented course, such as Object-Oriented Programming, Distributed Systems, or Introduction to Algorithms and Data Structures.

It is a considerable advantage to know more than one programming language beforehand. It is an advantage but not a requirement to have taken the course Functional Design and Programming. 

Læringsmål:The course will give you these skills:


  • You will be able to read and construct lexical and syntactic descriptions of source languages. You will know about regular expressions, grammars, and grammar classes.

  • You will be able to construct parsers (syntax analysers) from a grammar, using relevant tools. You will know about abstract syntax (that is, internal representations of source code) and you will be able to instrument a generated parser so that it can build abstract syntax trees.

  • You will be able to describe program execution (dynamic semantics) using the concepts of value, environment, store, continuation, and exception.

  • You will be able to formalize program execution by construction of an interpreter.

  • You will be able to describe the well-formedness of programs (static semantics) using the concepts of type and type checking.

  • You will be able to describe simple abstract computers using the concepts of instruction, register, evaluation stack, reverse Polish notation, call stack, and activation record.

  • You will be able to compile programs to machine code for such abstract stack machines.
 
Fagligt indhold:In technologically innovative project one may have to invent, describe and handle non-trivial data formats, such as specialized Web scripts, configuration data, and similar. The more meaning is associated with such a format, the more it resembles a specialized programming language, sometimes called a domain specific language. The first main theme of the course covers: the use of grammars to describe the textual representation (concrete syntax) of domain specific languages; the use of abstract syntax for internal representation of programs; and the use of syntax analysis to systematically convert textual representation to internal representation.

There are different kinds of programming languages: imperative languages (such as C), object-oriented languages (such as Java, Smalltalk, C#), and functional languages (such as Lisp, Scheme, Standard ML); statically typed languages (Java, C#, Standard ML) and dynamically typed languages (Lisp, Scheme, JavaScript, Perl). The second main theme of the course is to illustrate the different kinds of languages using interpreters, that is, programs that execute other programs.

A program written in e.g. C, Java, C# or Standard ML must be translated to machine code before it can be executed on the computer. This translation, or compilation, typically happens in several phases: syntax analysis, static checks (such as type checks), and generation of machine code. The third main theme of the course is static checks and the generation of machine code for abstract machines, including the Java Virtual Machine or Microsoft\'s Intermediate Language (part of the .Net platform).

The course uses the functional language Standard ML to present the various subject, because it is particularly well-suited for this purpose. Hence in the course you must also learn Standard ML. 

Læringsaktiviteter:

Lectures, weekly assignments (homework), and computer exercises.

After the course it makes good sense to do a four-week project, for instance the construction of a compiler for domain specific programming language. 

Eksamensform og -beskrivelse:X. experimental examination form (7-scale; external exam), 13-skala, Ekstern censur

 

Litteratur udover forskningsartikler:Lecture notes: Programming Language Concepts, by Peter Sestoft, ITU 2003.

Lecture notes: Basics of Compiler Design, by Torben Mogensen, DIKU 2003.

A good introductory book about Standard ML is Hansen and Rischel, Introduction to Programming Using SML, Addison-Wesley 1999.