Question 1 – Programming Languages [15 marks]
a) What/who is a programming language designed for? [1 mark]
b) Name and describe the four layers of a programming language. Give an example [4 marks]
of what would be defined in each layer.
c) Give an example of how two different language criteria have a tradeoff [3 marks]
or conflict with each other.
d) What is a model of computation and how is one useful in understanding [2 marks]
a programming language (use an example model to illustrate your answer).
e) Explain the meaning of orthogonality with respect to programming languages. [2 marks]
Give an example of non-orthogonality in a language of your choice.
f) Consider the following examples of string literals. [3 marks]
"Hello world" "Hello \"159.341\" Class"
"" "Hello 159.341\\159.331 Class"
Write a regular expression that would match these literals, the two special
characters you should consider are backslash \ and double-quote " which are both
escaped with a backslash character. You don't need to include punctuation other
than those in the examples. Note – your regular expression should match the
opening