When an algebraic shortcut changes termination

An evaluator has strict integer multiplication and selective conditionals. The expression spin() runs forever without returning a value or raising an error. Consider 0 * spin() and if true then 11 else spin(). Which statements correctly describe their behaviour or a proposed simplification? Select all that apply.

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Evaluation Strategies Questions: