Week 1 (1.1) Flashcards
What is a programming language?
A notation for describing computations to people and machines.
Why are programming languages crucial in the modern world?
Because all the software running on computers was written in some programming language.
What must happen before a program can be executed by a computer?
It must be translated into a form executable by the computer.
What is a compiler?
A software system that translates a program from a source language into a target language.
What are some domains influenced by compiler design principles?
Programming languages, machine architecture, language theory, algorithms, and software engineering.
What is the difference between a compiler and an interpreter?
A compiler translates a source program into a target program, while an interpreter executes the source program directly.
What are bytecodes in Java processing?
An intermediate form that Java source code is compiled into before being interpreted by a virtual machine.
What is a just-in-time (JIT) compiler?
A compiler that translates bytecodes into machine language immediately before running the program.
Why might a compiler produce assembly language as its output?
Because assembly language is easier to produce and debug compared to machine language.
What is the role of a preprocessor in language processing?
It collects source program modules, expands macros, and generates a modified source program.
What does an assembler do in a language-processing system?
Converts assembly-language programs into relocatable machine code.
What is the purpose of a linker?
To combine relocatable object files and library files into executable machine code.
What is a loader in the context of language processing?
A program that places executable object files into memory for execution.
What is a source-to-source translator?
A compiler that translates a high-level language into another high-level language.
What is an advantage of using C as a target language in a compiler?
C is widely supported and allows compilers to leverage existing tools and libraries.
What advantages does a compiler have over an interpreter?
Faster execution of the translated target program.
What advantages does an interpreter have over a compiler?
Better error diagnostics as it executes the program statement by statement.