Theory of compilation (2)

RSS

Aim of the course

The lecture continues "theory of compilation (part 1)". It presents a theoretical and practical basis for the building of the compiler back-end, in particular optimizing compilers. Special attention is payed to the issues of memory allocation, translation into intermediate code, and optimization using the principles of flow analysis, as well as final code generation.

Lecture programme

Type control. System of types, equivalence of types, overloadable operators, polymorphic functions. Organization of memory. Memory allocation strategies. Access to non-local names. Passing Parameters. Intermediate code generation. Three-address code. Translation of typical language constructs. Generation of intermediate code using example code for logical expressions. Intermediate code optimization. Basic blocks and flow charts. Loops in flow graphs. Global analysis of data flow. Iterative solving of data flow equations. Optimization of flow graphs. Transformations to improve the code. Support for synonyms. Peephole optimization. Target code generation. Generating code based on syntactic trees and directed acyclic graphs. Allocation and setting of records. Code generation algorithms.

Overview of the course elements

Projects are aimed to teach the students to define a formal language for a selected problem (usage), to design and implement relevant functional modules of a language compiler, to test and properly document project.

Reading list

1. Aho A. V., Sethi R., Ullman J. D.: Kompilatory. Reguły, metody i narzędzia, WNT, 2002
2. Waite W., Goos G.: Konstrukcja kompilatorów, WNT, 1989.
3. Hopcroft J. E., Motwani R., Ullman J. D.: Wprowadzenie do teorii automatów, języków i obliczeń, PWN, 2005
4. Hopgood F.R.A. – Metody kompilacji. 1982.

Copyright © 2010 Department of Computer Science   |   AGH University of Science and Technology   |   Created by Creative Bastards