CSE 423 — Compiler Writting

Fall 2015

Class Meeting Times: Cramer 239 - MW 9:30am - 10:45am
Prerequisites: CSE 324, 326, 342, 344, and 331 (coreq)

Course Contacts

Instructor: Dr. Abdelmounaam Rezgui
Office: Cramer 224
Email: rezgui at cs.nmt.edu
You may expect a response to your email within a few hours. For more immediate assistance cc the class TA.
Phone: (575)835-6036
Office Hours:
  • Monday: 11am – 1:50pm
  • Monday: 3:30pm – 4:50pm
  • Wednesday: 11am – 1:50pm
  • Wednesday: 3:30pm – 4:50pm
  • By Appointment
Teaching Assistant: Tyler I. Cecil
Office: Cramer 232
Email: tcecil at nmt.edu
Phone: (913)403-6230
Office Hours:
  • Tuesday: 11am – 1:50pm
  • Thursday: 3:30pm – 4:50pm
  • Individual team meetings will be scheduled.
  • By Appointment
For more information, visit my personal page.



  • Engineering A Compiler, K. Cooper and L. Torczon, 2nd Edition, 2011
  • C - A Reference Manual, 5th edition, by S. Harbison & G. Steele, ISBN: 0-13-0895-92-X
  • Essentials of 80x86 Assembly Language, by R.C. Detmer, 2006


  • Essentials of 80x86 Assembly Language, by R.C. Detmer, 2006

Course Objectives

Introduce compiler writing at a level that provides the necessary tools for the student to design and implement a simple compiler.


  • Understand the essential concepts, mechanisms, and algorithms used in compilers
  • Determine tradeoffs between algorithms for compilers for different settings
  • Analyze a language, architecture, and application triple to determine which optimizations are important
  • Determine which intermediate representations are needed for a set of optimizations
  • Implement lexical analysis, parsing, semantic analysis, code generation, and basic optimizations
  • Demonstrate ability to apply software engineering process
  • Demonstrate ability to program substantial software systems
  • Demonstrate ability to manage substantial group projects


  • Overview and introduction to the organization and function of compilers
  • Lexical analysis, regular languages, and regular expressions
  • Parsing, context-free grammars (ambiguity, precedence, associativity), bottom-up parsing, grammar transformations (left factoring and removal of left recursion), top-down parsing
  • Abstract syntax and intermediate tree representations
  • Semantic analysis, syntax-directed translation, and type checking
  • Activation records and the program stack
  • Intermediate code generation
  • Code generation, basic blocks and flow graphs, instruction selection, and register allocation
  • Code optimization, global data flow analysis of structured programs, loop optimizations
In addition to the specific topics listed above, student interests will drive the selection of other topics to be studied in the course


Instructor Discretion: The instructor reserves the right to modify policies to improve the execution of this course.
Midterm Exam 15%
Final Exam 15%
Quizzes & Participation 15%
Homework and Labs 15%
Projects 40%

Project Information