The language defined in Sect. 4.2 declares types of parameters and results of functions. The interpreter in Sect. 4.3 adds explicit type information to every value, and checks this before doing any...



The language defined in Sect. 4.2 declares types of parameters and


results of functions. The interpreter in Sect. 4.3 adds explicit type information to


every value, and checks this before doing any operations on values. So, we could


omit type declarations and rely solely on the type information in values.


Replace in Grammar 4.1 TypeId by id and rewrite the interpretation functions


in Fig. 4.3 so they omit checking types of parameters and results, but still check


that the number of arguments match the declaration and that no parameter name is


repeated.



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here