Skip to content

Latest commit

 

History

History
75 lines (44 loc) · 1.69 KB

lecture-Aug-25.md

File metadata and controls

75 lines (44 loc) · 1.69 KB

August 25

Welcome to Compilers! (P423, P523, E313, E513)

  • Instructors: Jeremy and Caner

  • Roll call

  • What's a compiler?

  • Table of Contents of Essentials of Compilation

  • Assignments, Quizzes, Exams, Grading, Academic Integrity

  • Technology

  • What to do when technology fails

    • Zoom fails during lecture: communicate on slack, switch to Google Meet
    • Github: communicate on slack, wait
    • Technology glitches will not impact grades
  • Concrete Syntax, Abstract Syntax Trees, Racket Structures

    • Programs in concrete syntax and in ASTs

        42
      
        (read)
      
        (- 10)
      
        (+ (- 10) 5)
      
        (+ (read) (- (read)))
      
    • Racket structures

        (struct Int (value))
        (struct Prim (op arg*))
      
    • Grammars

      • Concrete syntax

          exp ::= int | (read) | (- exp) | (+ exp exp) | (- exp exp)
          R0 ::= exp
        
      • Abstract syntax

          exp ::= (Int int) | (Prim 'read '()) 
              | (Prim '- (list exp))
              | (Prim '+ (list exp exp))
          R0 ::= (Program '() exp)
        
  • Pattern Matching and Structural Recursion R0-height.rkt