We extend the language from Sect. 4.2 with floating-point numbers as described in 4.2. a) Extend the type checking functions in Figs. 5.2–5.4 to handle these extensions. b) We now add implicit...



We extend the language from Sect. 4.2 with floating-point numbers


as described in 4.2.


a) Extend the type checking functions in Figs. 5.2–5.4 to handle these extensions.


b) We now add implicit conversion of integers to floats to the language, using the


rules: Whenever an operator has one integer argument and one floating-point


argument, the integer is converted to a float. Similarly, if a condition expression


(if-then-else) has one integer branch and one floating-point branch, the


integer branch is converted to floating-point. Extend the type checking functions


from question a) above to handle this.



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here