Stepwise refinement
Stepwise refinement is a [top-down] software design technique formalized by Niklaus Wirth in his 1971 paper Program Development by Stepwise Refinement, published in Communications of the ACM. The approach structures design as a series of progressive refinement steps, moving from a high-level statement of the problem through increasingly concrete levels of detail until the solution can be expressed directly in code.
Wirth described the process as starting with "a rough task definition and a rough solution method that achieves the principal result", then examining the definition more closely and breaking large solution steps down into smaller ones.
At each step, a high-level notation is used to expose the relevant concepts while deliberately concealing lower-level detail — detail that is only addressed in subsequent refinement steps.
Wirth divided the process into three stages: architecture (the overall structure and principal decomposition), implementation (the elaboration of each architectural element), and realization (the final concrete expression in executable code).
A key outcome of the process is the identification of modules — coherent units of solution or data whose further refinement can proceed independently of other work. Modularity is central to the technique’s benefits.
Fred Brooks, reviewing Wirth’s paper in The Mythical Man-Month, summarized the advantages of stepwise refinement as:
-
greater clarity in structure and representation;
-
an easier path to defining requirements and functions;
-
reduced system defects through the partitioning and independence of modules;
-
and, perhaps most usefully, the way that suppressing detail makes flaws in the overall design more apparent at an early stage.
Stepwise refinement is an ancestor of [structured programming] and influenced later design methodologies, including [object-oriented design] and [domain-driven design], both of which share its concern with decomposing complexity into manageable, independently reasoned units.