- [Loop Invariants @ cs.miami.edu](http://www.cs.miami.edu/home/burt/learning/Math120.1/Notes/LoopInvar.html) Cornell CS 2110 (有[video](https://www.youtube.com/channel/UCqKMFnMYBRgusWhHZaa0F-A/videos)) - [Introduction: Developing and understanding loops](https://www.cs.cornell.edu/courses/cs2110/2017sp/online/loops/01aloop1.html) - [The loop invariant and four loopy questions](http://www.cs.cornell.edu/courses/JavaAndDS/loops/02looploopyq.pdf) 1. Does it start right: Does the initialization make P true? 2. Does it stop right: is postcondition R true when the loop terminates? 3. Does each iteration (each execution of the repetend) make progress toward termination? 4. Does the repetend keep invariant P true?
Cornell CS 2110 (有video)