The One About Lehman's Laws of Software Evolution

Over the decades (studies on software evolution started in the late 1960s), Meir Lehman and László Bélády formulated, proposed and improved eight “laws” that we today call Lehman’s Laws of Software Evolution.

I - Law of continuing change

II - Law of increasing complexity

III - Law of self-regulation

IV - Law of conservation of organizational stability

V - Law of conservation of familiarity

VI - Law of continuing growth

VII - Law of declining quality

VIII - Law of feedback system

Fundamental trouble behind software evolution

The first two laws, which are mildly conflicting each other, show the fundamental trouble behind software evolution:

In other words, software must change, but changes increase complexity. Unless work is performed to maintain or to reduce the complexity.

To deal with this trouble, we can consider what Martin Fowler said in his book Refactoring:

“When you have to add a feature to a program but the code is not structured in a convenient way, first refactor the program to make it easy to add the feature, then add the feature”.

The SPE scheme

Initially the laws of software evolution were thought to be valid for large software projects. But, in the early 1980s Lehman substituted the notion of “large programs” by a more specific classification, the SPE scheme:

As can thus be seen, only one of those categories, E-type, is described by the laws. This is due to the fact that, unlike E-type, S-type software does not show an evolutionary behavior. Once the program is written, it is either correct or not with respect to a specification. And further studies of P-type programs suggested that, in practice, they always satisfied the definition of either S-type or E-type. Thus, in his subsequent work Lehman ignored P-type.