Save as PDF
Opens your browser print dialog — select "Save as PDF" to download.
Roll No. ...................................
CS/SD-603 (C) (GS)
B.Tech., VI Semester
Examination, June 2025
Grading System (GS)
Compiler Design
Note: i) Attempt any five questions.
किन्हीं पाँच प्रश्नों को हल कीजिए।
ii) All questions carry equal marks.
सभी प्रश्नों के समान अंक हैं।
iii) In case of any doubt or dispute the English version question should be treated as final.
किसी भी प्रकार के संदेह अथवा विवाद की स्थिति में अंग्रेजी भाषा के प्रश्न को अंतिम माना जायेगा।
-
1.
a) Explain the various phases of a compiler with a neat sketch.
एक साफ स्केच के साथ एक कम्पाइलर के विभिन्न चरणों की व्याख्या करें।
7b) Discuss with the functionality of pre-processing and Input buffering.
प्री-प्रोसेसिंग और इनपुट बफरिंग की कार्यक्षमता के साथ चर्चा करें।
7 -
2.
a) List and explain the advantages and disadvantages of frontend and backend model of compiler.
कम्पाइलर के फ्रंटएंड और बैकएंड मॉडल के फायदे और नुकसान को सूचीबद्ध करें और समझाएँ।
7 -
3.
a) Construct a LALR parsing table for the given grammar:
दिए गए व्याकरण के लिए एक LALR पार्सिंग टेबल का निर्माण करें।
7E→ E+T/T, T→F/F, F→(E)id
b) Write the differences between synthesized attributes and inherited attributes.
संश्लेषित विशेषताओं और विरासत में मिली विशेषताओं के बीच अंतर लिखें।
7 -
4.
a) Explain an SDT to convert infix to postfix expression.
इन्फिक्स को पोस्टफिक्स अभिव्यक्ति में परिवर्तित करने के ��िए एक SDT की व्याख्या करें।
7b) Explain in detail the role of a type checker in compiler.
कम्पाइलर में टाइप चेकर की भूमिका को विस्तार से समझाए।
7 -
5.
a) What is an Activation record? Explain the model of activation record.
एक सक्रियण रिकॉर्ड क्या है? सक्रियण रिकॉर्ड के मॉडल की व्याख्या करें।
7b) Discuss about the register allocation and assignment with examples.
रजिस्टर आवंटन और असाइनमेंट के बारे में उदाहरणों के साथ चर्चा करें।
7 -
6.
a) Define a flow graph, and construct a flow graph for the given program:
प्रवाह ग्राफ को परिभाषित करें तथा दिए गए प्रोग्राम के लिए प्रवाह ग्राफ का निर्माण करें।
prod = 0 i = 1 t₁ = 4*i t₂ = a[t₁] t₃ = 4*j t₄ = b[t₃] t₅ = t₂*t₄ t₆ = prod + t₅ prod = t₆7b) Construct a DAG for the following basic block:
निम्नलिखित मूल ब्लॉक के लिए DAG का निर्माण करें।
T₁ = A + B T₂ = C + D T₃ = E – T₂ T₄ = T₁ - T₃7 -
7.
a) Explain in detail the principle sources of optimization.
अनुकूलन के सिद्धांत स्रोतों के बारे में विस्तार से बताइए।
7b) Generate the code for the given expression.
दी गई अभिव्यक्ति के लिए कोड उत्पन्न करें।
R = (p+q) – ((r+s) – t)
7R = (p+q) – ((r+s) – t)
-
8.
Write a short note on any two of the following:
निम्नलिखित में से किन्हीं दो पर एक संक्षिप्त टिप्पणी लिखें:
- Specification and Recognition of tokens
- L - attributed Definition
- Dynamic Storage Allocation
- Back Patching