CSE 131
Quiz 1 Review
Read, sign, and return your CSE131 Integrity of Scholarship Agreement
Reading: Chapter 1 in the Dragon Book
CUP Manual
starterCode/rc.cup
Phase 0 in Project 1
Phase I in Project 1
SDT vs. AST
Translator vs. Interpreter
Typical compilation sequence for C/C++/Java (src code -----> execution)
Front-end -- Back-end -- Symbol Table
Lexical analyzer -- Parser -- Code Generation
Syntax analysis vs. semantic analysis
Optimization - local/global - machine independent - machine specific
Intermediate Representations (IR) for passing infomation between front end
and back end of the compiler.
Structural
Linear
Hybrid
C/C++ Runtime Environment
Text
Data
BSS
Heap
Stack
Names, Scope, Binding
Language features that increases implementation complexity for the compiler
Binding time
Static/Compile time vs. Dynamic/Run time
Lifetime of the binding vs. lifetime of the object the name binds/refers to
Static storage -- Text/Data/BSS
Heap storage -- Dynamic Memory Allocation
Stack storage -- Stack Frames (local variables & parameters)
Memory management
Explicit deallocation
Automatic garbage collection
Dangling references
Memory leaks
Scope of name
Statically scoped environments
Nested subroutines
Static links (Access links)
Displays
Nested blocks -- C/C++
Problems/Complications
Aliases
Redeclaration of names in inner scope/block { ... }
Internal static variables
Scope
Initialization at run time (C++) vs. load time