The current semantics of the Arithlang programming language does not account for divide-by-zero errors. 1. Write a

Question:

The current semantics of the Arithlang programming language does not account for divide-by-zero errors.

1. Write a program that uses all the arithmetic expressions defined in Arithlang and gives a divide-by-zero error.

2. Extend the Arithlang programming language so that the value of dividing any number by zero is a special kind of value of type DynamicError. This kind of value should give users some information about which expression caused the error. The following interaction log illustrates the intended semantics of this expression:$ (20) Divide-by-zero $( 279 (2 0)) Divide-by-zero error at: (/ 2.0 0.0) error at: (2.0 0.0) $(/84 (-279 (/ 2

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: