Course Overview
Lecture 1

Table of Contents


What do you want to get out of this course?

  • Intros
  • Why are you taking this course?
  • What do you hope to learn?
  • about me, research, positions
    • favorite course
    • program analysis and transformation, tool engineers
    • use course project to gauge interest

What I hope you will get out of thi

  • Some discrete math background (formal prereq)
  • Good programming
  • Command-line competence
  • Can install software on your own



  • go over syllabus
    • topics, course structure
      • focusing a lot of front-end, higher-level language constructs, transformation, and analysis
    • class structure
    • webcourses
    • slack
    • attendance, quizzes (one question, we go over same day)
    • homeworks (short, not graded strictly, just to keep up with course)
    • compilers project, design together in class, implement on your own
    • personal project, pick own project, implementation and present on your own
    • readings, summaries for homework
      • tentative list of papers
      • if you have topics of interest now or during semester let me know

Special topics

  • Technical content of some of my research
  • Guest lecture from a PhD student doing research
  • What would you like to see?
    • Functional languages?
    • Program analysis?
    • Transformation?
    • Code generation?
    • Optimization?
    • Compiler back-end

Course software

  • Linux OS
  • git, make, java
  • ANTLR parser framework
    • apt install antlr4
    • (I'll also provide the ANTLR lib with the projects)

Compiler Intro

What is a compiler?

What makes compiler-writing hard?

  • Three different programs
    • Input program
    • Ouput program
    • The compiler itself

Compiler vs. interpreter





Interpreter (with source)


Compiler (with source)


Compiler phases


  • Language-processing
    • Remember regexes, grammar from discrete? (If you took it)
  • Type checking
    • Did I assign an array to a float?


  • Code generation
    • Equivalent machine code for any valid input program
  • Optimization
    • Choose equivalent machine code that's faster, smaller, etc.


  • Intermediate code
    • Like machine code
    • Without machine specifics
    • Lots of different designs

Symbols vs. meaning

1 + 2 * 3

6 / 2(1 + 2)


What gives symbols meaning?

  • the compiler itself defines meaning
  • defines input language in terms of output language
  • (why does output language have meaning?)

ASCII vs. machine code


  • Join slack (see webcourses)
  • Setup your git repo (see webcourses)
    • Submit the webcourses assignment where you submit your class project repo
  • Setup your environment (vagrant as needed, java, git, etc.)

Author: Paul Gazzillo

Created: 2023-04-13 Thu 14:59