Introduction Flashcards
What is an imperative language?
Imperative languages tell the computer how it should be done
What is a declarative language?
what the computer is to do
Which type of language is higher level? Imperative or declarative?
Declarative
What is abstraction and why is it so powerful?
Abstractionis the ability to control the complexity of a program including
- high level programming
- names
- functions/procedures/methods
- objects
- functional programming
What is compilation?
The compiler translates the high-level source program into an equivalent target program (typically in machine language), and then goes away:
What is interpretation?
Interpreter stays around for the execution of the program
Interpreter is the locus of control during execution
Basically a line-by-line compiler
What is the difference between compilation and interpretation?
What is the job of the preprocessor?
Remove comments and white space
Group characters into tokens
Expands abbbreviations
What is just-in-time compilation?
Delaying compilation until the last possible moment
Review the phases of interpretation
What is scanning?
Dividing a program into tokens
Semantic analysis is concenered with what?
The discovery of meaning within a program
Detecting occurences of the same identifier
Tracking types of identifiers and expressions
Building and maintaining a symbol table
What is the difference between static and dynamic semantic analysis?
Static: before the program runs, usually done by the compiler
Dynamic: what must be checked during the run time of the program
What is the difference between a parse tree and a syntax tree?
What is another name for code improvement?
Optimization