Language design and translation: paradigms, binding times, syntax, stages in translation and formal models. - Question Bank
1. In programming languages, 'static binding' (early binding) occurs:
2. The translation process of a compiler can be broadly divided into two main phases: analysis and synthesis. Which of the following belongs to the synthesis phase?
3. Which formal language model is typically used to describe the syntax recognized by a lexical analyzer?
4. What is 'late binding' (dynamic binding) primarily concerned with?
5. The paradigm that models computation as the evaluation of mathematical functions is:
6. Which of the following is an example of a binding that occurs at Language Definition Time?
7. What is the role of 'code generation' in a compiler?
8. A 'lambda expression' is a feature commonly found in:
9. Which binding time is associated with the allocation of memory for global variables?
10. What is a common representation for the output of a syntax analyzer?
11. The 'declarative' programming paradigm focuses on:
12. Which stage of translation is responsible for converting the program into a format that is closer to machine code?
13. What is 'inheritance' in object-oriented programming?
14. The binding of a constant's value occurs at:
15. Which type of grammar is powerful enough to describe most programming language syntaxes but not all possible computer programs?
16. What is the primary goal of semantic analysis?
17. In functional programming, 'immutability' means:
18. Which binding time is generally the earliest?
19. What is the role of a 'parser' in a compiler?
20. The concept of 'state' is central to which programming paradigm?
21. Which phase of translation is responsible for generating optimized code?
22. What does 'polymorphism' mean in the context of object-oriented programming?
23. The binding of a variable to a specific memory location typically occurs at:
24. Which programming language paradigm is closely associated with lambda calculus?
25. A 'recursive descent parser' is a type of:
26. What is the purpose of a symbol table in a compiler?
27. Which binding time is associated with the resolution of function calls to their definitions?
28. In object-oriented programming, 'encapsulation' refers to:
29. What is the main advantage of using an intermediate representation like an AST?
30. Which of the following is a common method for defining the syntax of programming languages?
31. The binding of a variable's scope to its declaration typically occurs at:
32. What is an 'abstract syntax tree' (AST)?
33. Which stage of translation involves checking for type compatibility and other consistency rules not covered by syntax?
34. What is the primary characteristic of the 'imperative' programming paradigm?
35. When is the binding of a variable's value to its identifier typically performed in an imperative language?
36. The process of converting an abstract syntax tree (AST) into a sequence of machine instructions is called:
37. Which paradigm uses 'if-then' rules and logical inference as its core mechanism?
38. A context-free grammar is a formal system used to describe:
39. What is the primary purpose of intermediate code generation in a compiler?
40. Which of the following is an example of a binding that typically occurs at execution time?
41. What is a 'token' in the context of lexical analysis?
42. Semantic analysis in a compiler focuses on:
43. Which programming paradigm is characterized by the evaluation of functions and avoiding side effects?
44. The binding of a variable's type to its identifier can occur at which of the following times?
45. Which formal model is commonly used to describe the syntax of programming languages using a set of production rules?
46. What is the main role of a lexical analyzer (scanner) in a compiler?
47. Which stage of translation is primarily responsible for checking the grammatical correctness of the source code according to the language's syntax rules?
48. What is the primary goal of defining the syntax of a programming language?
49. In programming language design, what does 'binding time' refer to?
50. Which programming paradigm emphasizes the concept of 'objects' with associated data and methods?