§ 1.1
Specification as the test oracle
Before you can test a system, you must decide what counts as a failure.
see also · Linear temporal logic · Model checking · Property-based testing & falsification
The oracle problem
A test needs two things: an input, and a way to tell pass from fail. The second one — the oracle — is where testing gets expensive: someone has to know the expected behaviour for every case, and that knowledge lives in tickets, heads, and tribal memory, where it rots.
A formal specification replaces all of that with one precise sentence. G (request -> F response) says: always, if a request happens, then eventually a response follows — for every possible execution, not just the three you thought to try. One line becomes an oracle for infinitely many tests.
From property to test verdict
Once the property is machine-checkable, the test loop inverts. You no longer assert on examples you wrote by hand; you generate executions and ask the specification whether each one passes. This lab does that three ways: exhaustively (model checking), randomly (property-based testing), and after the fact (runtime verification on logs).
G p— safety:pholds in every reachable state, nothing bad ever happens.F p— liveness:peventually happens, something good occurs.p U q— precedence:pholds untilqtakes over, andqreally does occur.G (request -> F response)— the classic request/response contract.