DM546 - Compiler Construction
 
Spring 2019
Kim Skak Larsen

Home

Weekly Notes
The weekly notes are listed in reverse chronological order. They can be shown and printed separately.

Note, DM546, fall 2019

Note 11, DM546, fall 2019

Exercises March 22

Note, DM546, fall 2019

Note 10, DM546, fall 2019

Lecture March 14

The core of the optimization techniques covered in the lecture is described in Supplementary Notes for DM546.

Exercises March 19

Note, DM546, fall 2019

Note 9, DM546, fall 2019

Lecture March 13

Background material: Appel Chapter 3.

Exercises March 14

Note, DM546, fall 2019

Note 8, DM546, fall 2019

Lecture March 5

Background material: Appel Chapter 13.

Exercises March 8

Note, DM546, fall 2019

Note 7, DM546, fall 2019

Lecture February 26

Background material: Appel Chapters 10 and 11. It is recommended that you first skim over the material in the book and read in detail later based on the focus in the lecture.

Supplementary literature: A note on lattices and fixed points (not part of the curriculum).

Exercises March 6

Note, DM546, fall 2019

Note 6, DM546, fall 2019

Lecture February 21

Background material: Appel Chapters 5, 7, 8, 9. In this course, we have a slightly different focus from that in the textbook. As a consequence, we will take a simpler and more direct approach to code generation. Thus, it is recommended that you merely skim over the material in the book before the lecture and read after the lecture to the extent that you need the material. You can find support for my approach at the lecture in the Supplementary Notes for DM546.

Exercises March 1

IMADA's Computer Lab has been reserved and is used for this exercise slot, so show up there.

As announced previously, this exercise session is a continuation of previous. Work on problems from that note, get things actually running, implement variations to get hands-on experience with concepts you find unclear. Among other things, work on getting the example developed at the previous exercises on nested scope and static link running. You can also develop your own examples. For instance, a variation of the factorial example where you place the factorial function in an inner scope of another function, and have factorial modify a variable in its parent scope before returning a value.

Announcements

As also pointed out in the above, the exercises on February 27 and March 1 take place in IMADA's Computer Lab.

Note, DM546, fall 2019

Note 5, DM546, fall 2019

Lecture February 19

Background material: program examples, Appel Chapter 6.

Exercises February 27

IMADA's Computer Lab has been reserved and is used for this exercise slot, so show up there.

These are the exercises for this date and also for the next exercise session. It is important to get things to work in practice as a means of understanding all the underlying principles. Using two exercise sessions, you can try things out, get questions cleared up, and try again.

Assembly programs should be on a file with suffix s (small s) and an executable (a.out) can be produced using gcc, by writing gcc -no-pie file.s on command line; writing ./a.out then executes the program.

Background material: GAS program examples on the literature page.

Announcements

As also pointed out in the above, the exercises on February 27 and March 1 take place in IMADA's Computer Lab.

Note, DM546, fall 2019

Note 4, DM546, fall 2019

Lecture February 14

Background material: Appel Chapters 4 and 5. You can find support for my approach at the lecture with regards to symbol tables in the Supplementary Notes for DM546; see the literature page.

Exercises February 22

With regards to literature and material on flex, bison, and tiny expressions, see the literature page.

Note, DM546, fall 2019

Note 3, DM546, fall 2019

Lecture February 11

Background material: Appel Chapters 4, Bison documentation. With regards to literature and material on bison, see the literature page.

Exercises February 15

Note, DM546, fall 2019

Note 2, DM546, fall 2019

Lecture February 8

Background material: Appel Chapter 3.

Exercises February 12

With regards to literature and material on C, flex, etc., see the literature page.

Note, DM546, fall 2019

Note 1, DM546, fall 2019

Lecture February 5

Background material: Appel Chapter 1 and 2, Flex-documentation.

With regards to literature and material on flex, see the literature page. The tool flex is used in combination with the programming language C. If you have not programmed much in C before, then it would be a good idea to read about it and try to write a few small programs. References to material on C can be found via the literature page.

Exercises February 7

Only one hour is scheduled for the first exercise session. It will primarily be used to review material you already know and that we need in the course. With regards to literature and material on C and make, see the literature page.

 


   Data protection at SDUDatabeskyttelse på SDU