Tuesday, February 10, 2009

Revisiting Parnas: On the Design and Development of Program Families

The paper presents a comparison between techniques to develop program families. “Stepwise refinement”, introduced by Dijkstra, tries to develop programs through the use of informal, intermediate representations of programs that are then refined. The refinement introduces the design decisions by implementing the informal program in actual languages.

The technique introduced by Parnas is called “Module Specification”.  In this technique, the intermediate stages are specifications of behavior that is “encapsulated” into modules. He asserts that this approach leads to decrease the final cost of producing the software as the modularization helps to deal with complexity. Also, the use of modules and specifications helps to postpone design decisions, particularly those that will differentiate family members.

Sometimes, Parnas focus seems to be only to broaden the family possibility, in other words, increase the amount of variation points. This occurs specially at the beginning of the process. His strategy aims in making the design to enable the postponement of the decisions. In some sense, he puts the focus of a software family as it was to have as many members as possible.

Although the use of information hiding to postpone design decisions points is an excellent way to create variation points, leading to the Strategy design pattern, I think it should be used with care because it could lead to overgeneralization of the modules. Modules that are unlikely to change or vary may have to carry the complexity needed to implement the improbable variation. Maybe, this occurs only at early stages in the process.

The most interesting point is that the author starts thinking about planning before developing a program family. He also gives importance to the order in which the design decisions are made. This suggests that an approach for software families should choose the degree of importance of each aspect and characteristic so that the resulting program addresses its purposes properly.