[go: up one dir, main page]

0% found this document useful (0 votes)
104 views4 pages

WWW - Manaresults.Co - In: II B. Tech II Semester Model Examinations, March 2018 Principles of Programming Languages

This document contains a model exam for a Principles of Programming Languages course. The exam is divided into two parts: Part A contains short answer questions, and Part B contains longer answer questions from which students must answer 3. Questions cover topics like control structures, subprograms, monitors, meta language declarations, Prolog resolution and unification, attribute grammars, parsers, scopes and lifetimes of variables, subprogram semantics, message passing, events, lambda calculus, LISP, Prolog elements and propositions. The exam is meant to test students' understanding of fundamental concepts in programming language design and theory.

Uploaded by

lucky lakshmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views4 pages

WWW - Manaresults.Co - In: II B. Tech II Semester Model Examinations, March 2018 Principles of Programming Languages

This document contains a model exam for a Principles of Programming Languages course. The exam is divided into two parts: Part A contains short answer questions, and Part B contains longer answer questions from which students must answer 3. Questions cover topics like control structures, subprograms, monitors, meta language declarations, Prolog resolution and unification, attribute grammars, parsers, scopes and lifetimes of variables, subprogram semantics, message passing, events, lambda calculus, LISP, Prolog elements and propositions. The exam is meant to test students' understanding of fundamental concepts in programming language design and theory.

Uploaded by

lucky lakshmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Code No: R1622056 R16 SET - 1

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) 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.

4 a) Define a subprogram.Write the semantics of call and return of a subprogram. [8M]


b) Discuss about nested subprograms with examples. [8M]

5 a) How message passing is implemented in Ada? Explain with examples. [8M]


b) What is an event? How the events are handled in various OOP languages. [8M]

6 a) Discuss the fundamental concepts of lambda calculus. [8M]


b) Explain about LISP functional programming language. [8M]

7 a) Discuss about basic elements of Prolog. [8M]


b) Explain different types of propositions present in logic programming. [8M]

*****

WWW.MANARESULTS.CO.IN
|''|'''||''||'''||||
SET - 2
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) 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?

3 a) Explain about the following [8M]


i) associative arrays ii) union types
b) State whether static binding is more reliable or dynamic binding. Justify. [8M]

4 a) Define a function. What are the design issues for functions? Explain. [8M]
b) Explain how subprogram is overloaded? Give examples. [8M]

5 a) Compare and contrast the cooperation synchronization and competition [8M]


synchronization in message passing.
b) Explain the basic concepts of exception handling. [8M]

6 a) How ML is different from other functional programming languages? [8M]


b) Why were imperative features added to most dialects of LISP? [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.

6 a) Explain about scheme functional programming language. [8M]


b) Discuss how Haskell differs from ML. [8M]

7 a) Correlate the importance of logic programming languages over functional [8M]


programming languages.
b) Explain Fact and Rule Statements in Prolog with suitable examples. [8M]

*****

WWW.MANARESULTS.CO.IN
|''|'''||''||'''||||
Code No: R1622056 R16 SET - 4
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) 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]

3 a) Discuss the merits of guarded commands. [3M]


b) What is a variable? What are the attributes of a variable? Elaborate on address [8M]
of a variable.
c) Explain in detail about overloaded operators. [5M]

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.

6 a) Give comparison of Functional and Imperative Languages. [8M]


b) Explain the control structure of a PROLOG program. [8M]

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
|''|'''||''||'''||||

You might also like