1What are the four major language evaluation criteria?
Readability, Writability, Reliability, Cost
2What does readability mean?
The ease with which programs can be read and understood
3What does writability mean?
The ease with which a language can be used to create programs
4What does reliability mean?
Conformance to specifications and correct execution
5What does cost include in programming languages?
Training, writing, execution, reliability, and maintenance costs
6What is orthogonality?
A small set of primitive constructs that can be combined in many legal ways
7What language is famous for orthogonal design?
ALGOL 68
8What computer architecture influenced imperative languages?
Von Neumann Architecture
9What are the main characteristics of imperative languages?
Variables, assignment statements, and iteration
10What are the four major language categories?
Imperative, Functional, Logic, Markup/Programming Hybrid
11Which language is associated with AI and symbolic computation?
LISP
12Which language is associated with scientific computing?
FORTRAN
13Which language is associated with business applications?
COBOL
14Which language is associated with systems programming?
C
15What is the von Neumann bottleneck?
The speed limitation caused by data transfer between memory and CPU
16What are the three implementation methods?
Compilation, Interpretation, Hybrid Implementation
17Which implementation method has slow translation but fast execution?
Compilation
18Which implementation method executes programs directly without translation?
Pure Interpretation
19Which implementation method uses intermediate code?
Hybrid Implementation
20What is lexical analysis?
The compiler phase that converts characters into lexical units
21What is syntax analysis?
The compiler phase that converts lexical units into parse trees
22What is semantic analysis?
The compiler phase that checks meaning and generates intermediate code
23What is code generation?
The compiler phase that produces machine code
24What is linking and loading?
Combining system program units with user code into an executable
25What is JIT compilation?
Compiling intermediate code into machine code when subprograms are called
26What is a preprocessor?
A program that processes macros before compilation
27What does #include do?
Includes code from another file before compilation
28What does #define do?
Creates macro substitutions before compilation
29What is syntax?
The form or structure of expressions, statements, and program units
30What is semantics?
The meaning of expressions, statements, and program units
31What is a lexeme?
The smallest syntactic unit of a language
32What is a token?
A category of lexemes
33Give an example of a lexeme and token pair.
sum is a lexeme and identifier is its token
34What is a recognizer?
A device that accepts or rejects strings in a language
35What compiler component acts as a recognizer?
The parser or syntax analyzer
36What is a generator?
A device that generates valid sentences of a language
37What does BNF stand for?
Backus-Naur Form
38Who invented BNF?
John Backus
39Who developed context-free grammars?
Noam Chomsky
40What is a metalanguage?
A language used to describe another language
41What is the left hand side of a BNF rule?
The nonterminal being defined
42What is the right hand side of a BNF rule?
The definition of the nonterminal
43What is a nonterminal symbol?
An abstraction used in grammar rules
44What is a terminal symbol?
A token or lexeme that cannot be expanded further
45What is the start symbol?
The special nonterminal where derivation begins
46What symbol represents OR in BNF?
|
47What is recursion in a grammar?
When the LHS appears in its own RHS
48What is a derivation?
Repeated application of grammar rules
49What is a sentential form?
Any intermediate string in a derivation
50What is a sentence in grammar terminology?
A sentential form containing only terminals
51What is a leftmost derivation?
A derivation that expands the leftmost nonterminal first
52What is a parse tree?
A hierarchical representation of a derivation
53When is a grammar ambiguous?
When a sentence can have multiple parse trees
54How can ambiguity be removed?
By using precedence and associativity rules
55What does associativity determine?
The order operators of the same precedence are evaluated
56What does precedence determine?
The order different operators are evaluated
57What does [] represent in EBNF?
Optional components
58What does {} represent in EBNF?
Zero or more repetitions
59What does () with | represent in EBNF?
Alternative choices
60What is static semantics?
Rules that cannot be described by context free grammars alone
61Give an example of static semantics.
Variables must be declared before use
62What is an attribute grammar?
A CFG extended with semantic information
63What are synthesized attributes?
Attributes computed from child nodes upward
64What are inherited attributes?
Attributes passed from parent nodes downward
65What is operational semantics?
Describing meaning through machine execution steps
66What is denotational semantics?
Describing meaning using mathematical functions
67What is axiomatic semantics?
Describing meaning using logic assertions
68What is a precondition?
An assertion that must be true before execution
69What is a postcondition?
An assertion that is true after execution
70What is the weakest precondition?
The least restrictive condition guaranteeing a postcondition
71What language introduced classes and inheritance?
SIMULA 67
72What language introduced the first pointer data type?
PL/I
73What language introduced exception handling?
PL/I
74What language introduced packages and concurrency?
Ada
75What language introduced object-oriented programming?
Smalltalk
76What language introduced formal syntax definition with BNF?
ALGOL 60
77What language first used time sharing widely?
BASIC
78What language popularized functional programming?
LISP
79What language was designed for teaching structured programming?
Pascal
80What language introduced references and dynamic arrays?
ALGOL 68
81What language introduced applets and concurrency support?
Java
82What language is based on formal logic?
Prolog
83What does PL/I stand for?
Programming Language One
84What does LISP stand for?
LISt Processing
85What does PHP stand for?
PHP Hypertext Preprocessor
86What does JVM stand for?
Java Virtual Machine