Who supplies the loop invariant?
- You do, the person proving the program
- The solver guesses it every time
- The compiler inserts it
In a triple, what sits on each side of the code?
- The runtime and the memory used
- The author and the reviewer
- What holds before and what holds after
Triples for straight-line code compose in order along the program.
Circle one: True False
Your invariant holds initially and is preserved, but at exit it is too weak to imply the goal. What now?
- Weaken it further and hope
- Drop the invariant entirely
- Strengthen it so that, with the loop ended, it implies the goal
Two assignments stand in a row. How do you prove them?
- Prove each alone and never join them
- Chain the first triple into the second
- Guess the ending and skip the middle
What does the tool hand to the solver?
- The leftover verification conditions
- The whole program text
- The loop invariants to invent
A loop proof shows the invariant preserved but never shows it held at the start. Is the program proved?
- Yes, preservation alone is enough
- Yes, the start never matters
- No, it must also hold before the loop begins
A tool computes the weakest precondition instead of the strongest postcondition. Why, in one idea?
- Forwards reasoning is forbidden by logic
- Working backwards from the goal keeps the proof aimed at what you want
- Solvers cannot read postconditions