CMPSC 4473 Theory of Programming LanguagesMake sure to write the answers in your own words, do not just copy paste from the
internet.
1. What is a procedural programming language? Briefly describe and give an example of
one. – 6 points
2. Who developed FORTRAN? – 2 points
3. Briefly describe the main application of FORTRAN and the main application of COBOL. –
6 points
4. Describe what a programming paradigm is and provide 3 examples of different
programming paradigms. – 8 points
5. Briefly describe the phases involved in the compilation process. – 8 points
6. Draw the parse tree for the following derivation: – 8 points
=> =
=> A =
=> A = +
=> A = B +
=> A = B + +
=> A = B + C +
=> A = B + C + *
=> A = B + C + D*
=> A = B + C + D*()
=> A = B + C + D*( + )
=> A = B + C + D*(A + )
=> A = B + C + D*(A + )
=> A = B + C + D*(A + B)
7. What does an assembler do? – 4 points
8. Briefly describe Von Neumann Architecture and the Instruction Cycle. – 8 points
9. What are data abstractions and control abstractions? Describe each one, specify the
different levels of abstraction, and provide an example for each level and type. – 14
points
10. Provide an example of syntactic sugar. – 2 points
11. Briefly describe the difference between syntax and semantics. – 4 points
12. In reference to programming languages, what is expressiveness? – 4 points
1
13. In reference to programming languages, what is regularity? Make sure to describe the 3
concepts that it is subdivided into. – 8 points
14. Why did Stroustrup choose to use C as a basis for C++? – 6 points
15. How are loops implemented in functional programming? – 4 points
16. What is the advantage of tail recursion over non-tail recursion. Briefly describe. – 8
points
17. Bonus 8 points- Draw the expression tree for the following prefix expression:
(* (* (+1 2)(+ 3 4))(+5 6)) and specify the result of the expression.
2