Question: 3. (45 points) Some definitions: a. A programming language establishes a context-free requirement for a program to be legal if and only if that requirement

3. (45 points) Some definitions: a. A programming language establishes a context-free requirement for a program to be legal if and only if that requirement could be captured conveniently by a context-free grammar. (Michael L. Scott, the author of our textbook, and other computing professionals and scholars, take the position (p. 28) that a "context-free grammar is said to define the syntax of the language." However, I, together with some other computing professionals and scholars, disagree, saying that context-sensitive requirements (see below) are also syntactic (not purely semantic) requirements. In this class, I expect you to use the terminology I prefer, and, at least during this time, I hope you will find some respect for it.) b. It establishes a context-sensitive requirement if and only if that requirement is not context-free and could be checked (by a translator or interpreter) before runtime. (While, again, I disagree with their terminology, Scott (p. 29) and others call these requirements the static semantics of the language.) It establishes a runtime requirement if and only if it is a requirement for a program to be legal and the requirement can always be detected and reported at runtime, but not before then. (Scott (p. 29) and others refer to these requirements as the dynamic semantics of the language.) Note that a context-free requirement could (and should) be checked before runtime. For each of the three requirement categories defined above, describe a requirement on Core language programs that belongs in the category. In each case, provide a clear argument that establishes why the requirement you chose belongs in the category you chose. (15 points for each category) 3. (45 points) Some definitions: a. A programming language establishes a context-free requirement for a program to be legal if and only if that requirement could be captured conveniently by a context-free grammar. (Michael L. Scott, the author of our textbook, and other computing professionals and scholars, take the position (p. 28) that a "context-free grammar is said to define the syntax of the language." However, I, together with some other computing professionals and scholars, disagree, saying that context-sensitive requirements (see below) are also syntactic (not purely semantic) requirements. In this class, I expect you to use the terminology I prefer, and, at least during this time, I hope you will find some respect for it.) b. It establishes a context-sensitive requirement if and only if that requirement is not context-free and could be checked (by a translator or interpreter) before runtime. (While, again, I disagree with their terminology, Scott (p. 29) and others call these requirements the static semantics of the language.) It establishes a runtime requirement if and only if it is a requirement for a program to be legal and the requirement can always be detected and reported at runtime, but not before then. (Scott (p. 29) and others refer to these requirements as the dynamic semantics of the language.) Note that a context-free requirement could (and should) be checked before runtime. For each of the three requirement categories defined above, describe a requirement on Core language programs that belongs in the category. In each case, provide a clear argument that establishes why the requirement you chose belongs in the category you chose. (15 points for each category)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
