标签: programming-languages semantics loop-invariant
证明这个有效三元组的有效性:
{X==U, Y==0, U > 0, N > 0} while (X > 0) { X = X - N; Y = Y + 1;}; {Y == ⌈U/N⌉}
什么是循环不变量?