smart-robin-5472
Edited
• 3 Credit Hours
Key adjectives used by students — color intensity reflects sentiment
smart-robin-5472
Edited
kind-pigeon-1426
Edited
vital-cheetah-2034
Edited
cool-falcon-1145
Edited
bold-condor-3375
Edited
fearless-otter-2112
Edited
cool-finch-6745
Edited
loyal-finch-0896
Edited
cosmic-badger-7223
Edited
golden-squirrel-4160
Edited
This course was by far the most challenging I've taken so far at OMSCS.
I came in with decent antlr knowledge from work experience .... I can only imagine what someone coming without that felt like.
The final phase of the project was pretty brutal, I started early but still came down to the end. If you do not start early, you will certainly fail, the amount of hours to design/implement a solution is steep. You also often need to significantly refactor previous iterations of the project to accomplish the next step I found, which ate up a bunch of time.
** Took the course in 2025 Fall, not Summer **
[Background]
6-th course in program, avg GPA 3.0 before the course. Got C because didn't finish proj 3 and proj 4 (you hardly catch up later phases because projects are continuous).
[Summary]
This is a good course, it really teaches you how compiler works with clear objective in syllabus, and a well-phased project (but not well designed for student project, will explain later). Course is well-run, and is harder than average OMSCS courses
[Video]
Course videos are well paced. Total length is OK. Videos are quite interesting to watch
[Assignment]
4 typed homeworks. Average difficulty, each taking 2-4 hours to complete. Graded very fair and detailed.
[Exam]
Only one exam, 35% grade, close book. Felt medium difficulty but did not get good grades, losing points on many details (again, fair and detail graded).
[Project]
4 Phase projects that teach you to build a compiler from scratch. I really liked the idea and enjoyed quite some part of it. There is also a well programmed auto grader.
You need to code at least 2,000 - 4,000 lines for the whole project.
The reason I don't think the project is a good design is that:
You are almost doing everything from scratch with no guideline, no sample codes, no framework. If you design the framework badly, you will suffer a lot
Each phase builds on the prior phase. If you don't finish the previous block (say you are sick/family/work and miss proj 3), you can't start fresh on the next (proj 4). Even if you have some bug in your prior phase (eg, your parser/semantic didn't handle array well), it will bite you in all subsequent phases.
I don't personally like the idea of this kind of continuous project. I feel it would be better to provide checkpoints and fresh start for each project.
[Suggestion to Course]
Background: Non-CS undergrad, but work professionally in math/computational science, 3rd course after GIOS and RAIT. I was a beginner-intermediate C++ programmer before so this course doubled as both a large-scale programming course + compiler course. I did not meet the recommended pre-reqs e.g., AOS, computer architecture etc. but I was very motivated. I would say this was 1.5x to 2x the effort of GIOS and 3x the effort of RAIT.
I did not have a partner. I expect to get a solid A.
4 homeworks (Scanner, Parser, IR, CodeGen/Optimization): 4 questions each of which tested a compiler workflow or concept. Each HW took 2-3 days to complete.
4 projects (Scanner/Parser, SymbolTable/Semantic Analysis, IR Gen, CodeGen):
The 1st project was trivial. The 2nd and 4th were incredibly challenging. The 2nd because I had to level-up my programming ability and I needed to understand how the Antlr4 visitor interface worked, and the 4th because it was a huge amount of work with a lot of requirements and edge cases. I also was burnout by this stage.
Tip on project 4: Fully understand the MIPS function calling conventions and work out on paper what the function stack will look like before implementing it. Figure out a clear way to map a variable to its register or to its stack position. Also it pays to have a good IR data structure from Project 3, starting from fresh IR for project 4 would have been a lot more work.
The grade on gradescope was effectively the final grade, there were no hidden tests.
I ended up taking 2 full weeks from my day job to write the compiler and I effectively spent most weekends on the course. I ended up with around ~4000 lines of fairly compact code.
Final exam: A large fraction (~80%) of the final exam was quite mechanical: there are about 8 "workflows" you need to memorize from the home works and apply to problems under time pressure. 20% involved tricky questions that tested precise understanding of compiler techniques (e.g., when does this particular optimization apply, when does it not apply etc.).
I prepared using lecture notes and homeworks and skimming through the textbook, except for the chapter on optimization where I read through the textbook in detail.
Tip: Skim through the end of section questions in the textbook to prep for the final.
Takeaways:
This was an enjoyable and interesting course. The TAs were friendly and helpful. They answered questions quickly on Ed and held weekly office hours (though not many people attended them) to answer questions live or to discuss questions posed on Ed. Overall, the course filled in a lot of gaps in my knowledge of compilers though there is still a lot more depth to the material than what was explored in the course.
I'd recommend this to anyone interested in the subject, though if you took an upper level (4xxx level) compilers course you may not find it as satisfying. If you only had a lower level compilers course in your undergraduate program or none it will introduce you to the subject or expand your understanding.
The course consists of a four-part project, four homework assignments, and the final exam.
Exam:
For me, this is the weakest part of the course. It is one cumulative final exam with material drawn from all the readings, homework, and lectures. This made studying for it difficult as a lot of material was not fresh in mind after wrapping up the project. Studying the homework assignments helps a lot but there's still a lot of material to review.
I'd suggest that they split this material across the semester with multiple graded quizzes or exams to make it easier to prepare or at least reduce its weight in the final grade.
Homework:
The homework assignments were challenging but followed the book and the lectures. Three weeks were available to complete each set which was enough time. Don't procrastinate on them, they can be tedious if you do them entirely by hand and you may need to reread some of the book or rewatch lectures to understand the tasks. They also overlap with the projects for their release and due dates. Try not to focus on the homework to the exclusion of the project, it'll eat up your time. To prepare better for the exam, I'd suggest reviewing the completed homework assignments every few weeks.
Project:
The project is completed in either Java or C++. I chose C++ as I have more familiarity with it (professionally, academically, and for hobby programming).
Each phase of the project was given three weeks except for the last which ran for five weeks. I tracked my time and spent about 10 hours on the first phase, 20 hours on then next two, and 30 on the last phase. Those weren't perfectly focused hours, but a rough upper bound of how much time each took for me.
As mentioned in other reviews, no starter code was supplied. At some point they provide an ANTLR grammar file that can be used instead of your own in case you had issues creating it in Phase 1. However that's just barely enough to get started on the later phases. Each phase builds on the prior phases so the structure of your code is important. Poorly structured code will make the next phase harder.
The ANTLR book is a good resource, but it is slightly outdated. It will lead to subtle errors or grammars that don't work if you rely entirely on the book, check out the online documentation for more current documentation.
They offer unlimited submissions to Gradescope, I recommend taking advantage of that. For Phases 2 through 4 I leaned heavily on it to test my code and incrementally develop my solutions. I got my program working and then refactored it using Gradescope and a local test suite to verify my changes didn't break anything. This helped a lot in Phase 3 and Phase 4, I didn't have to change my old code except for a few edge cases that hadn't been caught in earlier testing.
This is easily the best course I've taken so far. I would highly recommend this course to everyone who is taking systems specialization. It's a shame that it isn't a core course.
Content:
As with most OMSCS courses, this one is about breadth. It emphasizes both - theory and practice. I knew very little about compilers and came away with a solid understanding of various components. I think the only part that is outdated is the attribute grammar framework. The third edition of the textbook doesn't even mention it. Lectures are okay, although they mostly follow the textbook.
TAs:
The TAs are the primary reason why this course is outstanding. They are highly knowledgeable about the subject and are genuinely enthusiastic about teaching. Most of the questions are resolved very quickly. There is a fast turnaround time for grading - one week at the most and even shorter around institute deadlines like withdrawal and grading dates.
Homework:
Don't take this one lightly. The questions are quite challenging. I recommend writing code to solve them, and verify answers. For the liveness analysis, the code you write will also be helpful for Project.
Project:
In summer there are three phases - 1) Generate Parse Tree 2) Generate IR 3) Generate MIPS assembly. The difference from a full semester is that you don't have to handle floats, and you don't have to handle one register allocation algorithm. In hindsight I should have taken this course in a full semester. But I'm interested in some other high workload courses that aren't offered in the summer.
The great thing about the project is that all the tests are given to you up front. If you pass the autograder tests, and don't do anything obviously incorrect to bypass them, you will know how you perform right away. There is no submission limit, you get feedback in under a minute, and you're actually encouraged to submit early and frequently while you implement various functionalities.
There is zero starter code and a single dependency - ANTLR4. Other than that it's up to you how to implement the compiler. You don't get this level of design and implementation freedom often.
Final:
The final was a bit difficult for me. There was one significantly challenging question that I just didn't have enough time for. Also, given the amount of effort one has to put in the homework and project, the final has way too much weight. I think 25% would be a fair amount. I would recommend completing the extra credit portion in the Project, even though I didn't do it. It's worth 5 points in the finals, and gives you enough leeway for a grade.
Final grade: A. I took GIOS + AI in my first Spring semester 2024, which averaged 15-20 hrs/week together.
Compilers in Summer semester 2024 was more challenging than those two courses combined, needing 25 hrs/week, especially in phases 2 and 3. Phase 1 was much lighter in comparison.
This was my first time using Java for a project, but I had a few years of coding experience prior. You'll be forced to get good at Java fast (or C++). My compiler project totaled 5k lines (not counting autogenerated ANTLR4 code): ~200 for phase 1, 2000 for phase 2, and 2800 for phase 3.
Tip: Code your liveness analysis for phase 3 and use it to check homework 3 answers. Do not do it manually.
The final exam was okay, difficulty-wise. I highly recommend this course. You learn theory and apply it in the project to build a compiler from scratch.
This course is very difficult, but totally worthwhile.
I found Distributed Systems to be significantly easier than this course, though if I had to pick between the two I'd probably pick Compilers since it was so much fun. I paired this class with Software Analysis and the two worked well together. Software Analysis goes over some of the same concepts like dataflow analysis. Software Analysis also tapers off in difficulty around the last two phases of Compilers which is nice.
You'll build a compiler from scratch in either C++ or Java. You use ANTLR to handle scanning/parsing, but everything else is totally your design.
The project is split up into phases. Each phase you build upon your compiler to add some new functionality. The auto-grader on Gradescope gives you a very good idea of where you're at.
My compiler was ~9,000 lines in the end. The first two phases were very easy, while the last two phases I spent at least 100 combined.
The lectures are good. The textbook was interesting, but it went much more in depth than the rest of the course, so it didn't feel particularly useful. The homework is very disconnected from the project and focuses on the theory.
The final is a very large portion of your grade, but the questions are similar to the homework
I was interested in this subject, and the class did not disappoint. Really interesting content that makes you realize how applicable theory can actually be for something software engineers use on a daily basis. While previous reviews from years ago seem to indicate TAs gave ambiguous answers and the assignments are vague with requirements, that was not the case this semester (and is probably no longer the case); TAs were absolutely fantastic and the grading for the project was very fair - you could have a very good idea of your score with the autograder.
While many may understand the general phases of a compiler, there was a lot more to them than I expected; things like NFA/DFA conversions and minimizations, liveness analysis, (super)local value numbering/other optimizations, and NP-complete graph coloring problem for register allocation are examples of things I had never heard of.
This class does not delve too much into compiler optimizations because there is so much content to cover to just to explain what a compiler does at a high level. In the summer, the content is reduced even further (less requirements for the project). Unfortunately, the continuation of this class that dives into advanced optimizations is only offered in person, but I hope to see it for OMSCS in the future.
General advice:
Read the textbook if you want to maximize learning (and get the 2nd edition if they're still requesting that, since there is some content that has been removed/rearranged in the 3rd).
The homework and exam questions were honestly more difficult than the project. Building a compiler is a long process, but after you know what to do and as long as you manage your time it's fairly straightforward (and I think the LOC in other reviews are somewhat of an exaggeration; the amount of code I wrote didn't total to be over 5000 lines, and that includes very inefficient modularity). Free response questions are human error prone and most of the points I lost were from careless mistakes.
Ways this class could be improved:
I feel like making the final exam 35% of the grade put a lot of stress on me; potentially giving more weight to the homework (which are similar to the exam) could alleviate some of that pressure.
Perhaps the timing is made a little off in the summer just because of the shortened term, but there were cases where I had to watch/read ahead of schedule to finish homework at a comfortable pace. If the homework is opened earlier (or there was at least corresponding sections explicitly stated that we should read/watch before completing it) I think it would've improved the experience.
Probably the most interesting/fun class I've taken so far, but I think you kind of have to be interested in the topic to begin with. This class made me more interested in this topic.
I'm really glad I took this course. I'm really glad it's over now.
This does what it says on the tin. You build an end-to-end compiler with generated scanner/parser, semantic checking, IR generation, a limited amount of optimisation, register allocation, and instruction selection. From scratch, with no starter code. You also have chunky homework due every other week. And an exam that does actually take the three hours they give you.
I learned an absolute ton. It demystified some big topics. It helped me understand how some of the people at work had approached some interesting issues. And it's very satisfying when your compiler makes the code run as intended at the end.
The downside is that this class is a full time job. I only stayed sane because my team was laid off earlier this year and I'm not working at the moment. It ate my life, especially the last month. I'm usually sceptical of reported timings on OMSCentral because they seem to be skewed by less experienced candidates. As far as I can tell, those people don't tend to take this class. I was a senior SWE at FAANG and it took me 25-30 hours a week. And it won't be much better in spring/fall because you could see several points where they stripped out big requirements to fit the summer semester.
Broadly speaking, this course is a good introduction to how a compiler works. Implementing one from beginning to end (kind of, you still leverage a parsing framework) is a great way to learn the broad stages of compilation and should help you feel a bit more connected to what's happening under the hood when you type make.
That said, my biggest gripe with the course is that it didn't really get into any of the interesting meat of modern compilers. For example, a compiler frontend isn't particularly complex - yes it's nice to cover how a compiler might traverse a parse tree to perform semantic checking, build a symbol table, and emit corresponding IR instructions, but these are just not that difficult and are pretty well-solved problems. 2 of the 3 project phases focused on the frontend, when it really should have just been 1. These can be condensed just by simplifying the language a bit - the (relative) complexity of the current Tiger language adds a lot of tedious work without much learning benefit.
Meanwhile, the project barely covered what modern compilers really focus a lot of energy on - optimization! The only degree to which the project covered optimization was in implementing a register allocator (which is really only an optimization relative to...not using registers). I really think the project's phase 3 (implementing the backend) should have been phase 2, and phase 3 should have focused on optimization in much more depth. It should have at least covered things like live range splitting, dead code elimination, constant propagation, and perhaps inlining. The grading should have a minimum performance requirement. Currently, the only degree to which performance is evaluated is in an optional class competition (with the winner receiving some extra credit).
Ultimately, if you've been a software engineer for some amount of time, you've likely been exposed to and made aware of many compiler optimizations to keep in mind as you write code. This course will not actually teach you much about how to implement these optimization as I had hoped. If you're a bit earlier in your career, or just have not really been exposed to a compiler aside from clicking "build", then it's a solid introduction.