Question 1 |

Consider the control flow graph shown.

Which one of the following choices correctly lists the set of live variables at the exit point of each basic block?

Which one of the following choices correctly lists the set of live variables at the exit point of each basic block?

B1: {}, B2: {a}, B3: {a}, B4: {a} | |

B1: {i, j}, B2: {a}, B3: {a}, B4: {i} | |

B1: {a, i, j}, B2: {a, i, j}, B3: {a, i}, B4: {a} | |

B1: {a, i, j}, B2: {a, j}, B3: {a, j}, B4: {a, i, j} |

Question 1 Explanation:

Question 2 |

For a statement S in a program, in the context of liveness analysis, the following sets are defined:

USE(S) : the set of variables used in S

IN(S) : the set of variables that are live at the entry of S

OUT(S) : the set of variables that are live at the exit of S

Consider a basic block that consists of two statements, S1 followed by S2. Which one of the following statements is correct?

USE(S) : the set of variables used in S

IN(S) : the set of variables that are live at the entry of S

OUT(S) : the set of variables that are live at the exit of S

Consider a basic block that consists of two statements, S1 followed by S2. Which one of the following statements is correct?

OUT(S1) = IN (S2) | |

OUT (S1) = IN (S1) \cup USE (S1) | |

OUT (S1) =IN (S2) \cup OUT (S2) | |

OUT (S1) = USE (S1)\cup IN (S2) |

Question 2 Explanation:

Question 3 |

Consider the following statements.

S1: The sequence of procedure calls corresponds to a preorder traversal of the activation tree.

S2: The sequence of procedure returns corresponds to a postorder traversal of the activation tree.

Which one of the following options is correct?

S1: The sequence of procedure calls corresponds to a preorder traversal of the activation tree.

S2: The sequence of procedure returns corresponds to a postorder traversal of the activation tree.

Which one of the following options is correct?

S1 is true and S2 is false | |

S1 is false and S2 is true | |

S1 is true and S2 is true | |

S1 is false and S2 is false |

Question 3 Explanation:

Question 4 |

Which of the following comparisons between static and dynamic type checking incorrect?

Dynamic type checking slows down the execution | |

Dynamic type checking offers more flexibility to the programmers | |

In contrast to Static type checking, dynamic type checking may cause failure in runtime due to type errors | |

Unlike static type checking dynamic type checking is done during compilation |

Question 4 Explanation:

Question 5 |

simple two-pass assembler does which of the following in the first pass:

Checks to see if the instructions are legal in the current assembly mode | |

It allocates space for the literals. | |

It builds the symbol table for the symbols and their values. | |

All of these |

Question 5 Explanation:

There are 5 questions to complete.

Complier design runtime environment question 12 confused correct option between a and d

In Question number 5 …options are incorrect.(P-iii,Q-iii,R-i,S-iv)

Thank You Rashmi,

We have updated the option.