0

Problem:
A segment of a program is shown below:

⋮
_ _ _ _ _ _
z = x - 7;
(|z = 5 ∧ n = 4|)
⋮

What is the dashed line hiding?

My solution:
I think the dashed line is hiding: (|x - 7 = 5|)
However, I am not sure if it is the correct solution, it would be nice to know how to solve this trivial problem.

  • 1
    I don't understand what you mean "the dashed line hiding" something... What is your reasoning? How did you arrive at that answer? What general rule for Hoare logic reasoning seems applicable to this particular case? – D.W. Jan 06 '21 at 19:32
  • How did z get to be 5 & how did n get to be 4? (Which is just a restatement of the question.) – philipxy Jan 07 '21 at 23:38
  • @philipxy It's a question from an old exam, so I have no idea – August Jelemson Jan 08 '21 at 12:43

0 Answers0