CUT TO:

INT. PROJECT ARCHIVE — STORYBOARD ROOM

The USER opens Program Specification & Verification with Dafny.

DIVAKAR DESSAI

Let's run through the shots.

CASE FILE / SENG2011 / Formal Methods

Program Specification & Verification with DafnyProving Behaviour Instead of Testing Examples

Used Dafny predicates, contracts and quantifiers to formally specify and verify program properties across all valid inputs.

01–02 / OPENING SEQUENCE

Establishing the world

01 / Establishing Shot

The Problem

Traditional tests demonstrate behaviour for selected inputs, while the assignment required expressing properties strongly enough for a verifier to prove them for every permitted input.

02 / Wide Shot

The Context

The project introduced formal specification and verification using Dafny.

03 / CHARACTER NOTE

DIVAKAR'S ROLE

Subject

Divakar Dessai

Production

Program Specification & Verification with Dafny

Take

03 / Role

Role notes

DIVAKAR DESSAI

I wrote predicates, contracts and validation cases and used Dafny to prove whether implementations satisfied those specifications.

04 / CLOSE-UP

THE ENGINEERING CHALLENGE

Requirements expressed informally in English had to be translated into precise mathematical statements without accidentally weakening or over-constraining them.

05 / TRACKING SHOT

THE APPROACH

A plan emerges.

I represented requirements using predicates, quantifiers, preconditions and postconditions and iteratively refined them until Dafny could establish the required proofs.

06 / INSERT SHOTS

KEY FEATURES

The system takes shape.

07 / DIRECTOR'S NOTES

DESIGN DECISIONS

Things we decided along the way

01

Specified desired behaviour independently from implementation details.

02

Used quantified expressions to describe whole-array properties.

03

Included circular boundary relationships explicitly in specifications.

design decisions

somewhere mid-build

08 / RETAKES

WHAT WENT WRONG

Naturally, not everything cooperates.

09 / FINAL SHOT

THE OUTCOME

ProblemBuildOutcome
01

Developed practical experience with formal verification.

02

Learned to distinguish tests from mathematical correctness arguments.

03

Improved precision when specifying software behaviour.

10 / PRODUCTION NOTES

TECH STACK

The tools behind the scenes.

DafnyFormal VerificationPredicatesQuantifiers

11 / BEHIND THE SCENES

LINKS

FADE OUT.

USER closes the file.

One project down. A few more stories left.

DIVAKAR DESSAI

Pick another?
← Return to Projects