edited by
14,263 views
29 votes
29 votes
Match the pairs in the following questions:$$\begin{array}{ll|ll} (a) & \text{Lexical analysis} & (p) & \text{DAG's} \\\hline  (b) & \text{Code optimization} & (q) & \text{Syntax trees} \\\hline   (c) & \text{Code generation} & (r)  & \text{Push down automaton} \\\hline (d) & \text{Abelian groups} & (s)  & \text{Finite automaton}  \\ \end{array}$$
edited by

3 Answers

Best answer
55 votes
55 votes
$$\small \begin{array}{ll|ll} (a) & \text{Lexical analysis} & (s) & \text{Finite automaton (DFA creation for finding tokens)} \\\hline  (b) & \text{Code optimization} & (p) & \text{DAG's (Common subtree minimization)} \\\hline   (c) & \text{Code generation} & (q)  & \text{Syntax trees (one can construct a derivation and }\\&&& \text{from it a parse tree that can be
used for code generation)}  \\\hline (d) & \text{Abelian groups} & (r)  & \text{ Push down automaton}   \end{array}$$
edited by
3 votes
3 votes
lexical analysis related to regular expression ( finite auotomata)

code optimization related to DAGs

as i know code generation is done on parse tree ( syntax tree + semantic meaning )

hence

A : S

B : P

C: Q

D : R ( dont sure about this option )
2 votes
2 votes

  a) lexical analysis   is related to     Syntax trees

lexical analysis generates tokens Tokens are frequently defined by regular expressions, which are understood by a lexical analyzer generator such as lex..and  regular expressions,are used in  Syntax analysis for genearating..syntax tree.

b)code optimization    is related to      p)DAG's

http://web.cecs.pdx.edu/~harry/compilers/slides/Optimize2.pdf

c)code generation   is related to   Push down automata

from the run of the push-down automaton, one can construct a derivation and from it a parse tree that can be used for code generation

d)abelian group          is related to        s)Finite automata

http://eiche.theoinf.tu-ilmenau.de/kuske/LOGINF/abstractStruengmann.pdf

Related questions

17 votes
17 votes
3 answers
1
makhdoom ghaya asked Nov 19, 2016
8,353 views
Match the pairs in the following questions:$$\begin{array}{ll|ll}\hline (a) & \text{Pointer data type} & (p) & \text{Type conversion} \\\hline (b) & \text{Activation rec...
39 votes
39 votes
5 answers
3
Madhav asked Feb 14, 2017
9,515 views
Match the following according to input (from the left column) to the compiler phase (in the right column) that processes it:$$\begin{array}{|l|l|}\hline \text{P. Syntax t...
22 votes
22 votes
1 answer
4
Akash Kanase asked Feb 12, 2016
5,021 views
Match the following:$$\begin{array}{ll|ll}\hline \text{(P)} & \text{Lexical analysis} & \text{(i)} & \text{Leftmost derivation} \\\hline \text{(Q)} & \text{Top down pars...