Formal methods
Warm-upHumanWhich of these are valid partial-correctness triples over the integers? (Choose all that apply.)
Which of these are valid partial-correctness triples over the integers? (Choose all that apply.)
Compute . It has the form . What is ?
The program should satisfy . Which loop invariant lets the loop rule and the rule of consequence prove this?
In the soundness proof of Hoare logic, the loop case is proved by induction on the derivation of . Why would structural induction on the command not work?
Which CTL formula says: from every reachable state it is possible to get back to an initial state (a "reset" property)?
A Kripke structure has states and transitions , , , , , . The proposition holds only in state . Compute by the iteration , . How many states satisfy ?
Programs are written in a Turing-complete language. Which of these problems are undecidable? (Choose all that apply.)
Which Lean definition correctly formalises the partial-correctness triple , where BigStep c s t means that c run from s terminates in t?
A compiler comes with a machine-checked proof that, whenever it succeeds, the generated assembly has only behaviours allowed by the source program, according to formal semantics of the source and assembly languages. Which of the following could still lead to a wrongly behaving executable? (Choose all that apply.)
Write find_violation(initial, successors, is_bad) for explicit-state model checking of a safety property. successors(s) returns a list of states and is_bad(s) a boolean. Return a shortest path [initial, ..., bad_state] to a reachable bad state, or None if no reachable state is bad. Your search must terminate on finite systems with cycles.