retagged by
7,050 views
10 votes
10 votes

In the context of compilers, which of the following is/are $\text{NOT}$ an intermediate representation of the source program?

  1. Three address code
  2. Abstract Syntax Tree $\text{(AST)}$
  3. Control Flow Graph $\text{(CFG)}$
  4. Symbol table
retagged by

4 Answers

Best answer
16 votes
16 votes

Correct Answer: D

Symbol table
is a data structure created and maintained by compilers in order to store info about occurrences of various entities like variable names, function names, objects, classes and interface.

Various forms of intermediate representation of code include Postfix Notation, Three address code ( x = y op z), Syntax Tree, DAG.
Abstract Syntax Tree
is a condensed version of syntax tree/parse tree more to with program than the compiler.

Parse Tree and Syntax Tree:

Control Flow Graph is used in optimization phase of compiler,each basic block consists of linear code, the next block to access is determined by the last instruction of the current block.

An Example,

     goto L2
L1:
     t0 := 3 >> x
     t1 := y / t0
     x := t1
     if y == 0 goto L3
     t2 := x - 3
     print t2
L3:
L2:
     t4 := 4 * y
     x := t4 < t5
     if t5 != 0 goto L1

See:

  1. https://cs.lmu.edu/~ray/notes/ir/
  2. https://www2.cs.arizona.edu/~collberg/Teaching/453/2009/Handouts/Handout-15.pdf
  3. http://pages.cs.wisc.edu/~fischer/cs536.s06/course.hold/html/NOTES/4.SYNTAX-DIRECTED-TRANSLATION.html
edited by
4 votes
4 votes
Symbol table is not an intermediate representation
2 votes
2 votes

As it is given in the Ullman

8.4 Basic Blocks and Flow Graphs

This section introduces a graph representation of intermediate code.

so OPTION D is correct.

Answer:

Related questions

17.9k
views
7 answers
21 votes
Arjun asked Feb 18, 2021
17,867 views
Consider the following $\text{ANSI C}$ program:int main () { Integer x; return 0; }Which one of the following phases in a ... phase $C$ compiler will throw an error?Lexical analyzerSyntax analyzerSemantic analyzerMachine dependent optimizer
6.7k
views
3 answers
27 votes
Arjun asked Feb 18, 2021
6,704 views
Consider the following sets, where $n \geq 2$:$S_1$: Set of all $n \times n$ matrices with entries from the set $\{ a, b, c\}$ ... a bijection from $S_1$ to $S_2$There does not exist an injection from $S_1$ to $S_2$
10.2k
views
2 answers
19 votes
Arjun asked Feb 18, 2021
10,214 views
Let $L_1$ be a regular language and $L_2$ be a context-free language. Which of the following languages is/are context-free?$L_1 \cap \overline{L_2} \\$\overline{\overline ... \overline{L_2}) \\$(L_1 \cap L_2) \cup (\overline{L_1} \cap L_2)$
11.0k
views
2 answers
25 votes
Arjun asked Feb 18, 2021
11,016 views
Which of the following statement(s) is/are correct in the context of $\text{CPU}$ scheduling?Turnaround time includes waiting timeThe goal ... of the processes is not known aprioriImplementing preemptive scheduling needs hardware support