Vericoding workshop

Finding and fixing a Python concurrency bug with TLA+

One ticket is left. Two clients ask for it. The workshop follows that check-then-act race from Python into TLA+, and checks that the repair holds.

What you will learn from the workshop

  1. Reproduce a check-then-act race and see where a task can suspend.

  2. Translate the code into a guarded TLA+ action.

  3. Check an invariant with TLC and trace the counterexample back to the code.

  4. Repair the atomicity boundary.

  5. Review an LLM-generated model for a guard that the code does not actually have.

TLA+ workshop agenda

  1. 00–40

    The race

    Read the Python, run the sequential test, and force the check-then-act race.

  2. 40–60

    TLA+ essentials

    States, actions, and a short break.

  3. 60–95

    The model

    Extract a model from the code, review it, and model-check it with TLC.

  4. 95–120

    The repair

    Repair the code and the model, then say what the finite check does not prove.

  5. 120–165

    Questions

    Forty-five minutes for questions, and for trying the same method on a system of your own.

Prerequisites

  • You are comfortable with functions, shared state, and basic Python.
  • Asyncio is explained in the session. No background in temporal logic is required.
  • Watching the shared screen is enough. To follow along on your own machine, use Python 3.11 or newer and Java 11 or newer.
  • Setup instructions are sent at least one day before.
  • You work on your own. There are no breakout rooms.
Dr. Gavin Mendel-Gleason

Host

Dr. Gavin Mendel-Gleason

Gavin is the CEO and founder of Scidonia. He was chief technology officer of TerminusDB, and a research fellow at Trinity College Dublin. His work covers formal verification, databases, and distributed systems.

Sign up

. Two hours, plus 45 minutes of questions. €5.

Sign up