while(n < busy_bever(10))
n++
Tell me when my loop terminates. while(n < busy_bever(10))
n++
Tell me when my loop terminates.I think the point is that even though one can't determine loop termination for all loops (easily provable), there are a huge number of useful loops that do useful work and for which you can prove properties like termination (and other static properties).
Exactly! If the loop doesn't terminate, then you obviously cannot show it. But if it does, then you should be able to (even if that requires some changes to help the tool)
I don't think this is true for all loops either - some can be proven to never terminate, just like some can be proven to terminate. And some can't be proven either way.
while(calculate_pi_stream(10 /* substring length */) != 0987654321);Hopefully, though, termination of your program does not depend on this ... otherwise could be a long wait!
But this is of a theoretic interest. In practice the verifier says: "I can't prove that this function will terminate within (some reasonable window), program rejected". And this is what's actually needed: a program that provably has certain properties, where an automatic proof is tractable.