28 Questions
Who is the course instructor for 'Introduction to Compilation'?
Dr. Xiaoyin Wang (Sean)
What are the course topics covered in 'Introduction to Compilation'?
Formal Languages and Automaton, Lexical Analysis, Parsing, Code Generation, Compiler Optimization, Functional Languages
What is the grading percentage for the 'Course participation' in 'Introduction to Compilation'?
10%
How many points is the 'Parser' phase worth in the course project of 'Introduction to Compilation'?
10 points
What was the first real compiler mentioned in the lecture?
FORTRAN compilers of the late 1950s
How many person-years were required to build the first FORTRAN compilers?
18 person-years
What is the difference in the format of target machine code between compilers?
Assembly or other source format vs Re-locatable binary vs Absolute binary
What is the main goal of an interpreter?
To produce the results of executing a program
Explain the difference in program execution between interpreters and compilers.
Interpreters execute program interleaved with analysis, while compilers analyze the entire program before translating it.
Why is a linkage step required for re-locatable binary in compilers?
Because it uses relative address which needs to be linked to the correct memory locations.
What is the tradeoff involved in the compilation process?
Compile time overhead vs execution performance
What is the difference in how compilers and interpreters handle the source program?
Compilers translate the program to another language, while interpreters directly execute it.
What is the main function of a compiler?
Transforming human-oriented programming languages into computer-oriented machine languages
Name three types of code that compilers may generate.
Pure Machine Code, Augmented Machine Code, Virtual Machine Code
What is Pure Machine Code?
Machine instruction set without assuming the existence of any operating system or library
What is Augmented Machine Code?
Code with OS routines and runtime support routines
What is Virtual Machine Code?
Virtual instructions that can be run on any architecture with a virtual machine interpreter or a just-in-time compiler
How does a compiler help programmers?
By ignoring machine-dependent details for the programmer
What are some examples of interpreters mentioned in the text?
PERL, Python, awk, sed, sh, csh, postscript printer, Java VM
What is the purpose of a Just-In-Time (JIT) compiler in Java?
To compile some or all byte codes to native code, particularly for execution hot spots.
What is the structure of a compiler according to the text?
Front end (analysis) and Back end (synthesis).
What is the role of the Front End in a compiler?
To read the source program and understand its structure and meaning.
What is the purpose of Static Semantic Analysis in a compiler?
To perform type checking, check for language requirements like 'declare before use', and preliminary resource allocation.
What kind of code does Intermediate Code Generation typically produce?
Three address code where instructions have one operator and up to three arguments.
What are the responsibilities of the Back End of a compiler?
Translate IR into target machine code, produce fast, compact code, and use machine resources effectively.
What does the intermediate code optimization phase focus on?
Code improvements to produce better quality code.
What is the purpose of the Assembly code in the compilation process?
To translate high-level language code into low-level machine code instructions.
What is the main goal of the Compilation process?
To translate source code into an executable image efficiently.
Explore the differences between compilers and interpreters in Java 13. Learn about the target machine code generation and the functionalities of compilers. Understand how interpreters read a source program and produce execution results.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free