====== Software Compilers @ ALaRI ====== __**[[teaching:alari:blog|News]]**__ This is the home page for the laboratory activity in the Software Compilers course held at [[http://www.alari.ch|ALaRI]] by Prof. [[http://www.dei.polimi.it/personale/docentidettaglio.php?id_docente=67&id_sezione=&lettera=C&idlang=ita| Stefano Crespi Reghizzi]]. ===== Teaching Materials ===== A full {{teaching:software-compilers.tar.gz|package}} with all the necessary materials. ==== Older Materials ==== Lexical Analysis: {{teaching:lexicalanalysis.pdf|slides}} and {{teaching:esercizi_flex.zip|examples}}. Syntax Analysis: {{teaching:syntacticanalysis.pdf|slides}} and {{teaching:esercizi_bison.zip|examples}}. {{teaching:acse_v1.0.0.zip|ACSE}} (latest version): several bug fixes, including major ones in the register allocation phase. {{teaching:acse.tgz|Advanced Compiler System for Education}}: a realistic (but still not as complex as real world) compiler system used in the course. Includes source code, documentation and slides. ==== Exercises with ACSE ==== * Complete implementation of the {{teaching:acse-shift.tgz|Shift}} operations, with a minimal test file. * Simple implementation of a {{teaching:acse-for.tgz|C-like For}} statement, with a minimal test file. * Simple implementation of a {{teaching:acse-forall.tgz|Python-like For statement}}, with a minimal test file. * {{teaching:acse-arrays.tgz|Array initialization}}, with the usual test file. In this patch you can also find some additional comments to the register allocation. The files provided above are patches (obtained with ''diff -Naur ACSE ACSE-new''); apply them to the distribution using the Unix [[wp>Patch_(Unix)|patch]] command. The patch are pure ASCII, so you can also read them to understand the changes. They are incremental, so you only need to apply the last one. Here you can find the {{teaching:acse-ext.tgz|ACSE package with the latest patch}} applied. ==== Recommended Readings ==== The papers listed here, while not necessary for the course, are still recommended to get a more complete view of the main topics in compiler techniques. [[http://citeseer.ist.psu.edu/582165.html|Compiler Transformations for High-Performance Computing]]: a good, if old, survey of compiler optimizations for high performance by D. Bacon //et al.// [[http://citeseer.ist.psu.edu/poletto99linear.html|Linear Scan Register Allocation]]: a relatively simple register allocation algorithm by Poletto and Sarkar. ACSE implements this algorithm. [[http://citeseer.ist.psu.edu/wilson92uniprocessor.html|Uniprocessor Garbage Collection Techniques]]: a complete survey of Garbage Collection by P. Wilson. ==== Links ==== [[http://ildjit.sourceforge.net/|ILDJIT]], our dynamic compiler for CIL bytecode. The //special// projects are based on ILDJIT rather than on ACSE. ===== Calendar ===== (obsolete) ^ Topic ^ Type ^ Day ^ Time ^ |Introduction to Compiler Systems | Intro | 29/11 | 8:45-12:00 | |Front-end design laboratory | Lab | 13/12 | 8:45-13:00 | |Back-end design laboratory | Lab | 21/12 | 8:45-13:00 | |Project tutoring | Tut | 29/01 | 8:45-12:00 | ===== Project Assignments ===== {{teaching:alari-projects-2011.tgz|Projects assignments}} have been presented on 13/12. You were supposed to choose your own project by the end of the following week. === Old projects page === The [[teaching:alariprojects|projects]] for years 2009 and 2010. ===== Old Exam Texts ===== * {{teaching:alari2008-1.pdf|2008, version 1}} * {{teaching:alari2008-2.pdf|2008, version 2}}