Log inStart free
LESSON 21.22 · 6 STAGES · 2 CONTROLS · 2 CHECKSPRO · PREVIEW

Temporal logic and model checking

Watch a formula check every run of a robot and grade its reward.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 2 controls and 2 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 21.22 · SPEC BAYRUN 7 MOVES · 2 HAZARDS
01
Stage 1 of 6 · Labels and spec
Each cell carries a label: p for pickup, d for delivery, h for hazard. A formal specification writes the goal over labels.
Explain it simply

Each cell on the grid has a label, so a run of the robot becomes a list of labels. The spec on the right is a formal specification, a goal written as an exact formula. Here it says: never enter h and reach d. The teal path is the planned route, and its labels fill the strip.

A 5 by 4 grid. The start is at (0, 3). p is at (0, 1) and d at (4, 0). h is at (2, 1) and (2, 3). The spec is G ¬h ∧ F d. The planned route takes 7 moves.

labels, runsspechazard, counterexampletrue, accepted, policy
012340123dphShφ = G ¬h ∧ F drun∅0∅1∅2∅3∅4∅5∅6d7labels and spec012340123dphShφ = G ¬h ∧ F drun∅0∅1∅2∅3∅4∅5∅6d7labels and spec
Toy: a 5 × 4 grid, 2 hazards, 3 specs
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
w=ℓ0 ℓ1⋯ℓ7φ\sy{w}{data}{w} = \ell_0\,\ell_1 \cdots \ell_7 \qquad \sy{phi}{param}{\varphi}
φ=G ¬h∧F d\varphi = \mathbf{G}\,\lnot h \land \mathbf{F}\,d

A run is a list of labels; the spec is a formula over them.

Common mix-ups

MYTHOne good run shows that the route is correct.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
2 CHECKS · PRO
Q01With slip off, does the planned route pass the model check for safe reach?

Make your guess, then test it in the diagram. All 2 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 2 live controls
  • 2 mix-up cards and 2 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.