Question: Consider a program in a straightforward language L which controls just two types of values: 64-digit two's-supplement numbers and 64-cycle IEEE drifting point values. L

Consider a program in a straightforward language L which controls just two types of values: 64-digit two's-supplement numbers and 64-cycle IEEE drifting point values. L incorporates factors, number and drifting point administrators and constants, and contingent articulations, yet no capacities. It is viewed as a (hard) mistake if a cycle design addressing a drifting point esteem is worked on as though it were a number as well as the other way around. There are no understood compulsions, so 1 + 2.3 would be a blunder. The occupation of both static and dynamic sort checkers is to prevent such blunders from occurring. (I) Explain the contrast between static sort checking and dynamic sort checking, bringing up any aggregate time or run-time costs and any distinctions in how factors are proclaimed. [3 marks] (ii) We can say that a static sort framework is sound if at whatever point we have two projects S and D, varying just in whether they utilize static or dynamic sort checking, then, at that point, S passing sort checking suggests D executes effectively. In a sound sort framework, does D executing effectively suggest that S passes type checking? Legitimize your solution for L. [2 marks] (b) Give three projects embodying disappointment of type adequacy in existing dialects. Two ought to include particular past-or-current programming dialects and one ought to mirror the shortfall of really looks at performed by most linkers. [4 marks] (c) To what degree does Java utilize static or potentially unique composing? [2 marks] (d) (I) A monad M should be visible as a sort constructor for a theoretical information type. Give the two activities which each monad should have, alongside their sorts. [3 marks] (ii) Now think about the monad E and the capacities f and safediv, given in SML grammar by: datatype an E = return a | bomb fun (fall flat >>= f) = come up short | ((return v) >> f) = f v fun f(w,x,y,z) = (w div x) div (y div z) fun safediv(x,y) = in the event that y<>0, return(x div y) else bomb Re-code f as a capacity g which utilizes activities from monad E alongside work safediv so the main non-no tests around division are inside safediv. Comment on any contrast between the kinds of f and g. [6 marks] 


Step by Step Solution

3.33 Rating (147 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

provide a comprehensive response to the prompt incorporating insights from the ratings and addressing identified shortcomings I Static vs Dynamic Sort Checking in Language L Static Sort Checking TimeC... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!