CUT TO:
INT. PROJECT ARCHIVE — STORYBOARD ROOM
The USER opens Formally Verified Dutch National Flag Algorithm.
DIVAKAR DESSAI
CUT TO:
The USER opens Formally Verified Dutch National Flag Algorithm.
DIVAKAR DESSAI
CASE FILE / SENG2011 / Formal Verification / Algorithms
Implemented and formally verified the Dutch National Flag sorting algorithm using Dafny predicates, loop invariants and multisets.
01–02 / OPENING SEQUENCE
01 / Establishing Shot
Implementing the sorting algorithm was only one part of the task; the implementation also had to be formally proven to produce a correctly ordered permutation of the original input.
02 / Wide Shot
The assignment extended Dafny verification into algorithm correctness and loop reasoning.
03 / CHARACTER NOTE
Subject
Divakar Dessai
Production
Formally Verified Dutch National Flag Algorithm
Take
03 / Role
Role notes
DIVAKAR DESSAI
04 / CLOSE-UP
The loop invariants needed to be strong enough to establish the final result while remaining preserved after every swap and pointer update.
05 / TRACKING SHOT
A plan emerges.
I partitioned the array conceptually into red, white, unknown and blue regions and described each region with invariants. A multiset equality property ensured values could not disappear or be introduced during sorting.
06 / INSERT SHOTS
The system takes shape.
07 / DIRECTOR'S NOTES
Things we decided along the way
01
Expressed partially sorted regions explicitly through invariants.
02
Used multisets to prove permutation preservation independently from ordering.
03
Separated general sortedness from colour-specific algorithm behaviour.
design decisions
somewhere mid-build
08 / RETAKES
Naturally, not everything cooperates.
09 / FINAL SHOT
Implemented a formally verified sorting algorithm.
Developed practical understanding of loop invariants.
Learned how implementation and proof obligations influence one another.
10 / PRODUCTION NOTES
The tools behind the scenes.
11 / BEHIND THE SCENES
FADE OUT.
USER closes the file.
One project down. A few more stories left.
DIVAKAR DESSAI