UP | HOME

Course Overview
Lecture 1

Table of Contents

Overview

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

Syllabus

http://www.cs.ucf.edu/~gazzillo/teaching/cop5621spring23/

  • 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

interpreter.jpg

Compiler

compiler.jpg

Interpreter (with source)

interpreter-with-source.jpg

Compiler (with source)

compiler-with-source.jpg

Compiler phases

Front-end

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

Back-end

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

"Middle-end"

  • 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

Homework

  • 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