21CS515PE - PPL Question Bank
21CS515PE - PPL Question Bank
Question Bank
Short answer questions
UNIT 1
1. Specify influences on Language design.
2. Illustrate ambiguous grammar with an example.
3. Define syntax and semantics.
4. What is derivation and a parse tree? Write their significance with examples.
5. In what way do operational semantics differ from denotational semantics?
6. A programming language can be compiled or interpreted. Give relative advantages and
disadvantages of compilation and interpretation.
7. Explain about the Virtual Machine.
8. What are the uses of attribute grammar?
9. List the principal phases of compilation.
10. Compute the weakest precondition for the following sequences of assignment statements and
their post conditions: a = 2 * b + 1;
b=a-3{b<0}
UNIT 2
1. Compare record and union.
2. Write short notes on guarded commands.
3. What is the scope and life time of a variable? Explain.
4. How pointers are represented and used in C and C++?
5. Explain about the problems in unconditional branching
6. Explain about the enumerated data type.
7. Differentiate between user defined and primitive data types with an example.
8. What is aliasing? What are the problems associated with it?
9. Give an unambiguous grammar for if-then-else.
10. Write the difference between a C++ pointer and a Java reference variable.
UNIT 3
UNIT 4
1. Explain about message passing.
2.What is the purpose of the Java Finally clause?
3.What advantages do monitors have over semaphores? Discuss.
4.Distinguish between Competitive Synchronization and Cooperation synchronization.
5. Compare semaphores with monitors
6. What is the difference between checked and unchecked exception in java.
7.What are the design issues of an exception handling system.
UNIT 5
1. List applications of Logic programming.
2. List and summarize module libraries in python.
3.Specify Inference process of prolog.
4.What are the data types supported in Python?
5. Discuss the storage and Control in python.
6. Explain about the fundamentals of FPL.
7.. What are the applications of functional programming languages?
8. Draw the internal representation of two LISP lists.
9. What are the important functions of LISP.
10.What are basic primitives of LISP.
2. Define grammars, derivation and parse tree. Construct parse tree for simple assignment
statement A=B*(A+C)
3. Explain about denotational semantics and axiomatic semantics for common programming
language features.
4.Explain about programming domains and their associated languages.
10.Explain in detail about attribute grammar and also write the attribute grammar for simple
assignment statements.
UNIT 2
1.Define an array. Explain how to initialize an array? Explain different types of arrays.
7. Define stack, stack-dynamic, explicit heap dynamic and implicit heap dynamic variables. State
their advantages and disadvantages.
8.What do you mean by binding? Give examples of some of the bindings and their binding times.
11.What do you mean by binding? Give examples of some of the bindings and their binding
times
UNIT-3
1. Write about parameterized abstract datatypes with an example in C++.
UNIT-4
1. Explain in detail about exception handling in Ada.
4. Describe the actions of the three java methods that are used to support cooperation
synchronization.
9. Elaborate how message passing helps in concurrency control? Explain with an example.
UNIT-5
1.What are the applications of functional programming? Explain.
5.Write the operations that can be performed on atoms and lists in LISP.
7. What are the features of Prolog? Discuss the basic elements of Prolog with examples.