The Kanban app is the primary stress test for dafny-replay’s sequence and map reasoning. It models a task board with dynamic columns, ordered cards, and per-column work-in-progress limits. The domain must prove two non-local invariants that span the entire board state—making it substantially harder to verify than the counter example—and it has been proved against three different kernels.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/metareflection/dafny-replay/llms.txt
Use this file to discover all available pages before exploring further.
Domain model
The domain is defined inkanban/KanbanDomain.dfy. Column identifiers are strings supplied by the UI; card identifiers are natural numbers allocated by the model itself.
Key invariants
TheInv predicate encodes two structural guarantees plus column well-formedness:
AllIds flattens all lanes into one sequence; NoDupSeq on that sequence means every card ID appears in exactly one column. The equivalence id in m.cards <==> OccursInLanes(m, id) ensures no card is lost or invented. Proving this for MoveCard requires reasoning about RemoveFirst and InsertAt across the full flattened sequence.
WIP limits (B) guarantee that no column holds more cards than its limit. AddCard and MoveCard both check the destination limit before accepting—if the limit would be exceeded the action is a no-op.
Normalize
Normalize is the identity function in this domain:
Kernel variants
Three separate app directories prove the Kanban domain against different kernels:| Directory | Kernel | Extra features |
|---|---|---|
kanban/ | Replay | Undo/redo only |
kanban-multi-collaboration/ | Multi-Collaboration | Offline clients, anchor-based moves, candidate fallback |
kanban-cloud/ | Multi-Collaboration + Effect State Machine | Persistent backend (Supabase or Cloudflare) |
Place.AtEnd, Place.Before, Place.After) so concurrent card moves resolve gracefully when the anchor card has moved. The Effect State Machine variant adds bounded retry logic and pending-action preservation for the client-side network layer.
Running the app
kanban-cloud, follow the backend setup in the Supabase or Cloudflare guides before running.
Replay kernel
Generic undo/redo kernel—the simplest Kanban variant uses only this.
Multi-Collaboration kernel
Anchor-based moves, candidate fallback, and minimal rejection for concurrent clients.
Effect State Machine
Bounded retries, FIFO pending queue, and no silent data loss for the network layer.
Backend overview
Choose between Supabase (managed auth, RLS) and Cloudflare (D1, Workers) for the cloud variant.