Customizing adaptive software to object-oriented software using grammars
Although numerous researchers have pointed out that object-oriented software is easier to extend than software that is not written in an object-oriented style, object-oriented software is still rigid to adapt and maintain. This paper builds on an extension of object-oriented programming which is called adaptive programming. Adaptive programming allows the programmer to write more extensible software called adaptive software without committing to a specific input language. After writing an adaptive program, the programmer selects a specific input language and partially evaluates the program into an executable program. This paper formally studies class dictionaries and informally describes how adaptive programs are partially evaluated by freezing class dictionaries. A class dictionary is mapped into classes of an object-oriented programming language, for example, C++, CLOS etc. A class dictionary defines both a set of objects and a set of sentences (a language). We derive a set of restrictions on class dictionaries which permit a simple printing algorithm and its inverse, a parsing algorithm, to be bijection functions between objects and sentences of the same class. We review propagation patterns for describing adaptive object-oriented software at a higher level of abstraction than the one used by today’s object-oriented programming languages. A propagation pattern is an adaptive program which defines a family of programs. From the family, we can select a member by choosing a class dictionary. The theory presented in this paper has been successfully implemented and used in the Demeter Tools/C++. The system consists of a set of tools that facilitate software evolution.