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 )
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.
Get Answers For Free
Most questions answered within 1 hours.