WWW - Manaresults.Co - In: II B. Tech II Semester Model Examinations, March 2018 Principles of Programming Languages
WWW - Manaresults.Co - In: II B. Tech II Semester Model Examinations, March 2018 Principles of Programming Languages
PART –A
1 a) What are the factors influencing the writability of a language? [4M]
b) List the advantages of using control structures in any of the compiled [3M]
programming languages.
c) Define Shallow and Deep binding for referencing environment of subprograms [4M]
that have been passed as parameters.
d) Describe briefly about Monitors. [4M]
e) Write about Meta Language declaration statements. [4M]
f) What is the relationship between resolution and unification in Prolog? [3M]
PART -B
2 a) Compare and contrast between the special purpose and general purpose [4M]
programming languages.
b) What is attribute grammar? Give the syntax directed definition for a desktop [8M]
calculator.
c) What are the limitations of recursive descent parser? [4M]
3 a) Explain the conditional statements and its implementation with examples. [8M]
b) Explain the scope and lifetime of variables. Illustrate when they would [8M]
coincide and when they don’t.
*****
WWW.MANARESULTS.CO.IN
|''|'''||''||'''||||
SET - 2
Code No: R1622056 R16
II B. Tech II Semester Model Examinations, March 2018
Principles of Programming Languages
PART –A
1 a) Describe the approach of using axiomatic semantics to convert the correctness [4M]
of a given program?
b) List the advantages and disadvantages of mixed mode arithmetic expressions. [4M]
c) Why is type checking the parameters of a subprogram important? [3M]
d) What is the primary problem with semaphores to provide synchronization? [4M]
e) Write a short note on ML functions. [4M]
f) What are the syntactic form and usage of fact and ruled statements in Prolog? [3M]
PART -B
2 a) How do you describe the meanings of programs using dynamic semantics? [4M]
b) Explain in detail about recursive descent parsing. [8M]
c) Give an example of left recursive rule in CFG. What is the significance of left [4M]
Recursive rule?
4 a) Define a function. What are the design issues for functions? Explain. [8M]
b) Explain how subprogram is overloaded? Give examples. [8M]
7 a) Explain how RDBMS and expert systems are helped using logic programming. [8M]
b) Discuss Terms and Goal statements in Prolog with examples. [8M]
*****
WWW.MANARESULTS.CO.IN
|''|'''||''||'''||||
SET - 3
Code No: R1622056 R16
II B. Tech II Semester Model Examinations, March 2018
Principles of Programming Languages
Time: 3 hours Max. Marks: 70
Note: 1. Question Paper consists of two parts (Part-A and Part-B)
2. Answering the question in Part-A is compulsory
3. Answer any THREE Questions from Part-B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PART –A
1 a) Define grammar, derivation and a parse tree. [4M]
b) What are the design issues for string types? [3M]
c) What are generic methods? [4M]
d) List out the errors that can occur in expression evaluation. [4M]
e) What is type inferencing used in ML? [4M]
f) Mention the various applications of multi paradigm languages. [3M]
PART -B
2 a) Explain language evaluation criteria and the characteristics that affect them. [8M]
b) Discuss the general approaches for the implementation of a Lexical analyzer. [8M]
3 a) Explain in detail arrays, indices, subscript bindings, and array categories. [8M]
b) Define unconditional branching. What are the problems with unconditional [4M]
branching?
c) Discuss various methods for reclaiming garbage. [4M]
4 a) Discuss the design issues of subprogram and its operations performed on them. [8M]
b) Explain how subprogram names are passed as parameters. [8M]
5 a) Define a Thread. How are threads different from processes? Explain java [8M]
threads with examples.
b) Define monitor. Explain how cooperation synchronization and competition [8M]
synchronization are implemented using monitors.
*****
WWW.MANARESULTS.CO.IN
|''|'''||''||'''||||
Code No: R1622056 R16 SET - 4
II B. Tech II Semester Model Examinations, March 2018
Principles of Programming Languages
PART –A
1 a) What are the difficulties in using an attribute grammar to describe all of the [4M]
syntax and static semantics of a contemporary programming language?
b) Write a note on Boolean and relational expressions. [3M]
c) State the importance of Local Referencing Environments with suitable [4M]
examples.
d) Differentiate between physical and logical concurrency. [4M]
e) What scoping rules are used in ML? [3M]
f) Describe the multi - paradigm languages. [4M]
PART -B
2 a) Discuss in detail about the attribute grammars. [4M]
b) Explain how is the order of evaluation of attributes determined for the tree of a [8M]
given grammar.
c) Why lexical and syntax analyzer are separated out? [4M]
4 a) Discuss how generic methods are implemented with suitable examples. [8M]
b) Explain the importance of dynamic scoping with an example. [8M]
5 a) What are the three possible levels of concurrency in programs? Explain. [8M]
b) Discuss the reasons for using exception handlers in a programming language. [8M]
What if there exist programming languages with no exception handlers.
7 a) How PROLOG is different from other logic programming languages? Give an [8M]
example for each feature.
b) Explain Prolog interfacing process. [8M]
*****
WWW.MANARESULTS.CO.IN
|''|'''||''||'''||||