Instructor: Prof. Seth Fogarty
Email: sfogarty@trinity.edu
Office Hours: Posted on webpage
Office: CSI 270M
Meets: CSI 257 TuTh 3:35-4:50
Textbook: Engineering a Compiler, 2nd Edition by Keith D. Cooper & Linda Torczon (optional)
This is a systems course for computer science majors, designed for to introduce students to the practical issues that arise in compiling. Topics include parsing, syntactic analysis, intermediate representations, and the basics of code optimization.
Reasonable Solutions: Compilers frequently encounters NP-hard optimization problems that must be solved in low-order polynomial time. Algorithms must be correct in all cases and produce effective solutions.
Low-Level Programming: A great deal of computer science is about abstracting away the details of a system. By contrast, in this course students will solve difficult problems using a non-garbage collected language, in order to expose the underlying complexity of the solution. Similarly, by focusing on assembly code as an object language, students will confront the reality of performing computation.
Applications of Theory: Compilers demonstrate the application of theory to practical problems: automata, greedy algorithms, and graph theory all play a role.
Students are expected to abide by the Trinity University Honor code. Collaboration on the projects is allowed with the expectation that every student will take responsibility for understanding and implementing their code. The following guidelines are a non-exhaustive list of the intent of this policy. Further, the use of laptops, tablets, or cell phones during class for non-class-related purposes is prohibited.
You may always discuss the algorithmic components of the homework, material covered in class, how to use tools or debugging environments, or techniques, constructs, or libraries useful for the project.
You may always provide/receive assistance to/from other students when debugging: for instance in interpreting error messages, running valgrind or debugging tools, or writing code to print meaningful output from intermediate representations.
When two students have not completed a portion of an assignment, you may collaborate on a single code base. You may not directly copy code from one code base to another, but you can consult the co-created code base if you get stuck re-implementing that component.
If you have completed a portion of the assignment that another student has not, you may provide assistance but should not write code for them nor solve the problem for them. The student you are helping should fully understand both the code they wrote and have designed the logic behind the code. For example:
Pointing out where a logic flaw in the code occurs is permissible, but dictating a solution to is not;
Walking through the logic to solve a problem is permissible, but providing the answer is not;
Explaining how to implement their design is permissible, but providing a solution they did not come up with is not.
Two students who have not started an assignment may pair-program the assignment together. In this case, one student should submit the solution, and both should document the group work at the top of their README.md files. For Project 1 in specific, students who have begun the project separately but are at a similar point may pair-program for the remainder of the assignment.
Students are expected to attend class regularly. Students who will miss class should contact me before their absence, and complete all homework assignments ahead of time.
In line with the Trinity University policy on equal access and equal opportunity, this course will be made accessible to all students. Any student who feels they may need accommodations based on the impact of a disability or long illness should contact me and the office of Disability Student Services to discuss your specific needs.
This course meets two times a week, and will comprise both lectures and in-class activities. Assessment is broken down into the following categories.
There are four extensive projects for this course. Projects 1 and 3 are relatively simple, and thus worth less of the grade. Project 4 may be simplified, depending on time constraints. These projects are deep investigations into a specific component of a compiler, and should not be underestimated. A lab write-up is required for some projects.
There is a single out-of-class midterm, to be scheduled, that will be worth 40% of the exam grade. The final exam will be from 12:00-3:00pm on Monday, December 12th, and will be worth 60% of the exam grade. The final will be cumulative, but focus on material from the second half of the course.
Class participation accounts for 10% of the course grade. This includes attendance, participation, and completion of in-class activities.
The following grade cutoffs apply for this course. Grading will be stringent to reflect these cutoffs.
This course is heavily influenced by Dr. Cooper's course at Rice University.