You On AI Field Guide · Stepwise Refinement The You On AI Field Guide Home
Txt Low Med High
CONCEPT

Stepwise Refinement

Dijkstra's and Wirth's method of constructing a program by starting with the simplest correct solution and adding complexity only when requirements demand it — and only in ways that preserve visible correctness at every step.
Stepwise refinement is the operational procedure behind the principle that elegance and correctness should be built into a program from the first line. The programmer does not write a complex system and then try to verify it. She starts with an abstract specification, derives a first version that is as simple as the specification permits and provably correct at that level of abstraction, and then refines the version step by step — each step small enough to be verified, each step preserving the properties the previous steps established. The finished program is complex only to the extent the problem required complexity; every piece of the complexity was introduced deliberately, and every introduction preserved the correctness of the whole.
Stepwise Refinement
Stepwise Refinement

In The You On AI Field Guide

Stepwise refinement was articulated most clearly in Niklaus Wirth's 1971 paper "Program Development by Stepwise Refinement" and Dijkstra's 1976 A Discipline of Programming, which formalized the approach using guarded commands and predicate transformers.

← Home 0%
CONCEPT Book →

Keep reading with YOU ON AI

Unlock the full book, 10,000+ field-guide entries, and a 1000+ thinker library. If you have a book code, register now — it takes a minute.

Register with book code Sign in