Question

The following denotational semantics describes what if(M1(some1, s)==error)   return error else if(M1(some1,s )==true)   if(M2 (some2,s )==error)...

The following denotational semantics describes what

if(M1(some1, s)==error)

  return error

else if(M1(some1,s )==true)

  if(M2 (some2,s )==error)

  return error

  else s = M2 (some2, s)

else if(M1 (some1,s)==false)

  if(M2(some3,s )==error)

  return error  

  else s = M2(some3,s )

Homework Answers

Answer #1

If the M1(some1,s) gives some error then stop the execution of the programme and return the error.

If it is not returning any error but it is returning "true" then check for the M2(some2,s) if M2 return some error then stop the exectuion of function and  return that error else assign the return value of M2(some2,s) to the s.

If the return value of M1(some1,s) is "false" then check for the M2(some3,s) if M2(some3,s) return error stop the execution and return the error, else assign the return value of M2(some3,s) to the s.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
True or False? Explain why in one paragraph: The past value of M1 and M2 indicates...
True or False? Explain why in one paragraph: The past value of M1 and M2 indicates that using only one monetary aggregate to guide policy is sufficient, since they both move together closely.
ANSWER TRUE OR FALSE : 1- M1 and M2 equations are related to reserve market (interbank)....
ANSWER TRUE OR FALSE : 1- M1 and M2 equations are related to reserve market (interbank). TRUE / FALSE 2- When there is a stable goods market (IS does not shift), the best target policy for central bank is interest rate targeting. TRUE / FALSE 3- The foreign exchange crisis in August 2018 in Turkey showed us that the impossible trinity has not been held anymore. TRUE /FALSE 4-  Keynesian interest rates channel is not the one among monetary tranmission mechanisms....
State the immediate effect of each of the following actions on M1 and M2: Instructions: If...
State the immediate effect of each of the following actions on M1 and M2: Instructions: If there is no change in M1 or M2, enter zero as your response. a. Barry writes his plumber a check for $200. The plumber takes the check to the bank, keeps $50 in cash, and deposits the remainder in his savings account.     M1: by $ .     M2: by $ . b. Maureen deposits the $1,000 from her CD in a money market mutual fund....
Based on conservation of linear momentum, if m1 = m2, Vo = 3.5 m/s, V1 =...
Based on conservation of linear momentum, if m1 = m2, Vo = 3.5 m/s, V1 = 3 m/s, and ? 1 = 48 degrees, what will be the angle ? 2 (in degrees)?
A block  (m1=2kg) , initially moving at 15m/s in the x-direction, hits another block (m2=5kg) , initially...
A block  (m1=2kg) , initially moving at 15m/s in the x-direction, hits another block (m2=5kg) , initially at rest. After the collision  m1 moves with a speed of 10m/s at an angle of  87.59? with respect to the original line of motion. Assume a perfectly elastic collision. Determine the final speed of m2 . Determine the magnitude of the direction of m2 .
True or false? All else equal, the closer the true mean is to the hypothesized mean,...
True or false? All else equal, the closer the true mean is to the hypothesized mean, μ, the greater the probability of type II error.
A body m1= 10kg is travelling 5m/s . It is hit head on body m2=20kg moving...
A body m1= 10kg is travelling 5m/s . It is hit head on body m2=20kg moving with a speed of 10m/s in the opposite direction. Assuming an elastic collision, what is the final velocity of each body? What is the total Ek?
What error will Python display when it attempts to execute the following if/else statement? if a...
What error will Python display when it attempts to execute the following if/else statement? if a == b : print("Equal") else : print("Not Equal") if a > b : print("a is larger") else : print("b is larger") Python will display an error indicating that == should be replaced with = Python will display an error indicating that an if statement cannot reside inside the body of an else Python will display an error indicating that there is a problem with...
Object 1, m1 = 3kg, collides and permanently sticks together with a stationary second object, m2...
Object 1, m1 = 3kg, collides and permanently sticks together with a stationary second object, m2 = 2kg. After the collision, they bounce off a moving third object, m3 = 2kg. If v1,i = +3m/s, v3,i = −2m/s, and object 3 bounces off at twice the speed it comes in, what are the final velocities of m1 and m2? Note that m1 and m2 are still stuck together.
Use a comparison test to prove the following (here M1 and M2 are constants) if ak...
Use a comparison test to prove the following (here M1 and M2 are constants) if ak > 0 , bk >0 and <>a</>k / bk <= M1 , bk / ak <= M2 for all K then sum of ak and the sum of bk either both converges or both diverge
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT