Вы находитесь на странице: 1из 31
RollNo = [8701] Printed Pages : 2 BT-7/M-17 COMPILER DESIGN Paper—CSE—401 Time allowed : 3 hours] [Maximum marks : 100 Note : Attempt five questions in all selecting at least one question from each unit. All questions carry equal marks, . Unit-1 1. Distinguish between Assemblers, Linkers, Loaders, and Compilers bringing out the situations in which each of these is suitable to be used. Also describe the function of the syntax analysis and code optimization phases of the compiler. Isthere any relationship between Intermediate Code Generation and Code Optimization ? Justify. 2. Describe the role of Lexical Analysis in the design of acompiler. What is a Regular Expression ? What is its significance in the Lexical Analysis phase ? Construct NFA for the regular expression a (ab) * a. Unit-I 3. Whyis three address code preferred in compilers ? What do you mean by quadruple and triple representation of three- address statements. [Tum over (2) What are the contents of a symbol table ? Give a brief account of the data structures that can be efficiently used for representing symbol tables. Uniti Describe the memory organization of a'C' program to illustrate stack allocation scheme. Also show howa'C' Activation record is organized. Depict a plan of an activation record for a'C' procedure. What are the various stages in a compiler where errors can occur ? Give an example ofa mistake that can lead toa lexical error as well as a syntactic and semantic error. UnitIv Discuss the necessity of optimization in compilation. Distinguish between local and loop optimization. (@) _ Discuss the factors that affect target code generation. _ (b) What are the approaches for register allocation and assignment? Roll No. ........ Printed Pages : BT-7 / M-17 STATISTICAL MODELS FOR COMPUTER SCIENCE Paper—CSE - 405 Time allowed : 3 hours] [Maximum marks : 100 Note :- Attempt five questions, selecting at least one. Question from each unit. Unit-I 1. (@) Deriveanexpression for inclusion and exclusion principle when number of events are four. 10 (b) Using Bernoulli trial, derive the expression for reliability of parallel system. 10 2. (@) Withthehelp of Venn diagram, explain the various operations which can be applied on events. 8 (b) Inanswering a Question ona multiple choice test, a student either knows the answer or guesses. Let 0.4 be the probability that student knows the answer and 0.6 be the probability that student guesses. Assume that a student who- guesses an answer will be correct with probability 0.2, where 5 are the number of multiple choice altematives. What is the probability that student knew the answer to a Question given that student answered it correctly. Unit 3. (a) Prove that geometric distribution possess the Markov property. 10 18703 [Tum over

Вам также может понравиться