University of Haifa
Theory of Compilation
Winter 2010
Announcements
- 09/03/10 12:00 - final grades (before Moed B appeals) are now published.
Unhide the columns to drill in and reveal your test and hw grades.
May the Lord be with you.
- 08/03/10 15:20 - Homework assignments final final grades (after appeals) are now published,
Check your grades to see that it's the same as you expect it to be.
Pay Attantion- We were asked to deliver final grades by tomorrow, so please, if you have any unfinished business, contact me today!.
That includes appeals for HW3, you must send your challanges on HW3 grades by this night!,
I will examin it tomorrow in the early morning, before I deliver the final grades to the faculty.
Please leave your phone numbers so I can contact you if something is unclear to me.
(expect a call at 08:00-09:00 AM :))
- 02/03/10 15:20 - Homework assignments final grades are now published, it is better to save the file and only then to open it...
Everyone has to read this document (even if you don't want to challenge the grades).
The files needed for challenging the 3rd HW grades: here are,
Please use the PMulator version which is provided with HW3TestFiles.zip.
- 22/02/10 00:33 - Assignment 3 grades are now published
in case your work did not compile you must solve whatever problem you have and send it to me ASAP.
you can send me the fixed code until Wednesday when I publish the testcases.
after I publish the testcases I will not recieve any fixes to uncompiled projects and the grade will stay 0.
Everyone else- Don't send me questions about the grades until I publish the testcases,
then you will be able to see for yourselves what was the problem and to appeal, assuming you have a reason.
- 19/02/10 11:15 - The HW2 grades were updated I added 5 points that were deducted because
of a good reason that will take me a lot of words to explain. believe me, it was a good reason, but I also have a good reason to give those 5 points back.
If you want to understand how and why you lost points- here are the testcases, Please read into all of the files and understand them, and only then try to run them and check your work.
Students whom their work did not compile, can meet me on the 25 and the 26 in the university, please send an email in advance.
- 12/02/10 22:30 - Here is the Recording of today's Tigbur.
The Tirgul started with Loop Unrolling (sorry, no slides), continued with some optimizations and with passing procedures as parameters
and ended with passing arrays as parameters
- 12/02/10 17:00 - Here is some more info about passing arrays as parameters.
Students who had been in my class today, please check out the clarifications and changes I made in the pdf, hope it's clear enough now.
- 08/02/10 02:00 - assignment 2 grades are now available
If your program did not compile, please send me an email so we can discuss what to do next.
- 08/02/10 01:30 - The Submission of Assignment 3 has been postponed (once again)
till the 15/02/10 23:59, a day after the Moed Bet, so you can study peacefully.
- 05/02/10 22:40 - Moed A` question 2 (lex and yacc) solution pdf
- 30/01/10 16:00 - Assignment 3 submission date had been postponed to the 08/02/10 23:59.
FYI: 1.) I do not have, yet, the approval of the faculty for this late submission.
2.) this is the last date for submission, submitting the work after this date will cost...
- 22/01/10 00:20 - I updated the optimization riddles pdf with some fixes.
- 21/01/10 20:20 - Here is a solution for Question 1,assignment 1 for the ID 118490508.
- 21/01/10 19:20 - I uploaded the List Scheduling material in the Tutorials Section
in addition, some of you asked me about the article I was talking about in the lex and YACC
question pdf,
I was talking about this article...
- 21/01/10 14:20 - Lex And YACC Question
- 21/01/10 12:40 - Reception Hours (Shaat Kabala):
Tomorrow morning (the 22/01/10), between 10:00 - 12:00 Am , I will be at the University (Room 5006) answering your questions
regarding the test, please send me questions (or at least topics) in advance so I can come prepared.
- 19/01/10 14:20 - Procedures Descriptor Example:
Procedures Descriptor Example was added to the Lecture slides "Handling Procedures" section.
- 14/01/10 22:20 - Assignment 3 submission date had been postponed to the 01/02/10 23:59.
Also, A student claimed that there is a visitor function missing inside the visitors (ByValueParameter),
I will check it ASAP, and assuming it's true, I will add instructions on how to add it to the files.
in the mean time you are instructed to add it yourself.
- 08/01/10 19:30, There is a minor problem with Assignment 3
Some students had noticed that inside the .p files I gave you as an example, there is a new instruction: "str i p q"
which is used to store a value in the following way:
*assuming x is a local variable located at address 5:
x=8; //in mini pascal is transformed to:
ldc i 8;
str i 0 5;
You are advised not to use this instructions (although you can),
instead you should use "lda p q" similar to what we learned in class:
*assuming x is a local variable located at address 5:
x=8; //in mini pascal is transformed to:
lda 0 5
ldc i 8;
sto i;
- 05/01/10 19:30,
Assignment one grades are now published
, to find out why you got such a
low grade, please come to me (Gil) after the Tirgul,
mind that you only have two weeks left to do so
Assignment One Grades
- Course lectures
will take place every Tuesday and Thursday between 10:00 to 12:00 AM:
- Tuesday - room
712 in main building
- Thursday - room
715 in main building
- The assignments
will make 30% of the final grade.
- The exam will make
70% of the final grade.
Staff
Lecturer: Dr. Gadi Haber
TA: Gil Kulish
Times & Locations
Lectures: Tuesday 10-12, Main
712 -AND- Thursday 10-12, Main 715
Tutorials: Tuesday 16:00-18:00, Main 622 -OR- Wednesday 8-10, Rabin 6013
Reception hour: Thursday 12-13, near CS secretary
TA's Reception hour: Tuesday
18:00-19:00 (after class) at room 622 or Wednesday right after class, wherever
available
Regulations
- The final grade
will be 30% homework assignments, 70% final exam
- Failing the exam
(51) is failing the course, regardless of homework grades
- The grade for late
submissions will be reduced by 4*N, where N is the number of days late
- Homework submission
must be in triples or pairs, and sent by email to the TA
- All submitted files
must be in one ZIP file named comp#_id1_id2_id3.zip where # is the
homework number, and id1/id2/id3 are the submitters ID numbers. The
subject of the email should be the same (without the .zip). For example:
if my ID is 1234 and my partner's ID is 9999, and we are submitting the
second assignment, our file name will be comp2_1234_9999.zip and the
subject will be comp2_1234_9999
- Homework bonuses
account only for the homework grade, not the grade of the exam
Material & Links
Syllabus: here
Sample exam: here
Lecture slides:
- Introduction and
Optimizations (foils from MIT)
- Compiling
Simple Assignments
- Compiling Control Flow Statements
- Memory
Allocation
- Handling Procedures
- Instruction Scheduling
Tutorial slides:
Note: please print a lot of slides per page, double sided - to avoid waste of
paper! Thank you.
- Introduction and
Optimization: 4pp, 1pp, Optimization Riddles
- Formal languages: 4pp, 1pp
- Grammers:
4pp, 1pp, Lex
and YACC - Assignment 1 Overview: 1pp, another case study: 1pp
- lex
example, bison example.
- Homework assignment
2 overview; Control flow (if, while, case): see lecture 2 above "Pre lecture"
- Homework assignment
2, continue:
09.12.09 recording: Full Lecture: The
second example in the second assignment (While) + Starting to code
16.12.09 recording: The third
example in the second assignment (Case)
16.12.09 recording: Starting to
code
- Static arrays (Winter09_T06.pdf)
·
Static Arrays Recording
- Arrays Bound
Checking, Dynamic arrays, Records, Pointers, Complex Pointers Expressions
(Winter09_T07.pdf)
Recordings:
·
Arrays Bound Checking
·
Dynamic Arrays
·
Records
·
Pointers
·
Complex Pointer Expressions
- Procedures/Functions Lecture
Drawings from the first Recording
-
Drawing #1, Drawing #2
- Drawings from the second recording:
please send me the minute in the recording and I will
upload the drawing
- by the way, somewhere in the recordings you can hear me say that the new ep of a function
is the EP from the previous function + the expected required stack size, this is of-course incorrect
and should be the SP + the expected required stack size (look at the PDF to find a formal definition of SEP).
- List scheduling
- The presentation from the tirgul, I think it's similar to the presentation from Gadi's Class (Save The Rain Forests)
- recodring
Links:
Tools:
Homework Assignments
·
Assignment 3 pdf
·
Assignment 3 examples
·
SEP
Visitor Files, copy them to your existing project, mind that in order for the project
to compile, you need to change the file visitor.h.
You can find instructions inside the file, notes.txt inside the attached files.
SEPVisitor files
submit
until the 15/01/10
Submission
Information:
- Send your mail
to gil.kulish+HW3@gmail.com
- Send only the
files you added or changed. The changed files can be only from the list
of files that are allowed to be changed, meaning "SEPVisitor, codeVisitor.h,
codeRVisitor.h, codeLVisitor.h,
codeVisitor.cpp, codeLVisitor.cpp,
codeRVisitor.cpp and visitor.h"
- Please send me
your files inside a a zip file, named as
described in the "Regulations" section above. Make sure that
the subject is the same as the filename without the .zip.
- If your label
prefix is other than L(or l), please specify the label prefix inside the
body of your mail, this is an essential input for the PMulator in order to run correctly.
- Add a text file
called notes.txt ( notes.pdf/ notes.doc) if
you have some notes for the examiner.
·
Assignment 2 pdf
·
Assignment 2 source code
submit until the 19/12/09 to get 20 pts bonus for early submition
+ regular bonuses
Or until the 26/11/09 at 23:59 to get the regular bonuses (more information
inside the assignment).
Submission
Information:
- Send your mail
to gil.kulish+HW2@gmail.com
- Send only the
files you added or changed. The changed files can be only from the list
of files that are allowed to be changed, meaning "codeVisitor.h, codeRVisitor.h,
codeLVisitor.h, codeVisitor.cpp,
codeLVisitor.cpp, codeRVisitor.cpp
and visitor.h"
- Please send me
your files inside a a zip file, named as
described in the "Regulations" section above. Make sure that
the subject is the same as the filename without the .zip.
- If your label
prefix is other than L(or l), please specify the label prefix inside the
body of your mail, this is an essential input for the PMulator in order to run correctly.
- Add a text file
called notes.txt ( notes.pdf/ notes.doc) if
you have some notes for the examiner.
- Assignment 1: To be submitted until 28/11/09 at
23:59 without the bonuses,
Or 21/11/09 at 23:59 with bonuses (more info inside the assignment pdf)
·
submition
information:
Please send a zip, as described in the "Regulations" section above,
add a text file called notes.txt if you have some notes for the examinar, zip each question inside a seperate
folder, such that when the zip is decompressed, there will be two (or three) seperate folders, one for each excersize.
inside that zip, insert all relevant files, including the .l or .y .c .h and
.exe.
- Please submit the
assignment files to: gil.kulish+HW1@gmail.com