Saturday, February 3, 2007

Stratified design

This is an idea from the book "Structure and Interpretation of Computer Programs" by Hal Abelson, Jerry Sussman and Julie Sussman (an excellent computer science text used in introductory courses at MIT - a must read book).
They come with the idea of Stratified design (programming in a sequence of levels, one level based on another), giving the example of The picture language.


"We have obtained a glimpse of another crucial idea about languages and program design. This is the approach of stratified design, the notion that a complex system should be structured as a sequence of levels that are described using a sequence of languages. Each level is constructed by combining parts that are regarded as primitive at that level, and the parts constructed at each level are used as primitives at the next level. The language used at each level of a stratified design has primitives, means of combination, and means of abstraction appropriate to that level of detail. ... Stratified design helps make programs robust, that is, it makes it likely that small changes in a specification will require correspondingly small changes in the program."

There is also a paper by the authors of the book on this topic: "Lisp: A Language for Stratified Design" by Abelson and Sussman.

This idea is put to work in some of the newer trends in programming, like Language Oriented Programming (Sergey Dmitriev), Intentional Programming (Charles Simonyi), Language workbenches (Martin Fowler), Little Languages (Matthias Felleisen), Grammarware (Ralf Lammel), etc.