- Type
- Quiz
- Course
- CS606 Compiler Construction
- Size
- PDF 25 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2 of 2. Download the file for all 2 pages.
Lecture 3
A parse can be represented by a tree: parse tree or syntax tree. For example, here is the parse tree for the expression x+2-y
The parse tree captures all rewrite during the derivation. The derivation can be extracted by starting at the root of the tree and working towards the leaf nodes.
Abstract Syntax Trees
The parse tree contains a lot of unneeded information. Compilers often use an abstract syntax tree (AST). For example, the AST for the above parse tree is
This is much more concise; AST summarizes grammatical structure without the details of derivation. ASTs are one kind of intermediate representation (IR).
The back end of the compiler translates IR into target machine code. It chooses machine (assembly) instructions to implement each IR operation. The back end ensure conformance with system interfaces. It decides which values to keep in registers in order to avoid memory access; memory access is far slower than register access.
The back end is responsible for instruction selection so as to produce fast and compact code. Modern processors have a rich instruction set. The back end takes advantage of target features such as addressing modes. Usually, instruction selection is viewed as a pattern matching problem that can be solved by dynamic programming based algorithms. Instruction selection in compilers was spurred by the advent of the VAX-11 which had a CISC (Complex Instruction Set Computer) architecture. The VAX-11 had a large instruction set that the compiler could work with.
Related CS606 files
All CS606 files →- CS606 Highlighted Handouts Set 3 by Masters Highlighted PDF 4.8 MB
- CS606 Midterm Solved File 2 by Team Hadi Midterm PDF 4.1 MB
- CS606 Short Notes Lecture 17 Quiz PDF 16 KB
- CS606 Short Notes Lecture 14 Quiz PDF 35 KB
- CS606 Short Notes Lecture 11 Quiz PDF 41 KB
- CS606 Short Notes Lecture 19 Quiz PDF 28 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.