Adaptive programs compute with objects, just like object-oriented programs. Each task to be accomplished is specified by a so-called propagation pattern which traverses the receiver object. The object traversal is a recursive descent via the instance variables where information is collected or propagated along the way. A propagation pattern consists of (1) a name for the task, (2) a succinct specification of the parts of the receiver object that should be traversed, and (3) code fragments to be executed when specific object types are encountered. The propagation patterns need to be complemented by a class graph which defines the detailed object structure. The separation of structure and behavior yields a degree of flexibility and understandability not present in traditional object-oriented languages. For example, the class graph can be changed without changing the adaptive program at all. We present an efficient implementation of adaptive programs. Given an adaptive program and a class graph, we generate an efficient object-oriented program, for example, in C++. Moreover, we prove the correctness of the core of this translation. A key assumption in the theorem is that the traversal specifications are consistent with the class graph. We prove the soundness of a proof system for conservatively checking consistency, and we show how to implement it efficiently.
Graph-Based Customizationbject-oriented programs are easier to extend than programs that are not written in an object-oriented style, but object-oriented programs are still very rigid and difficult to adapt and maintain. A key feature of most popular approaches to objectoriented programming is that methods are attached to classes-C + +, Smalltalk, Eiffel, Beta-or to groups of classes-CLOS. This feature is both a blessing and curse. On the brighter side, attaching methods to classes is at the core of 1) objects being able to receive messages, 2) different classes of objects responding differently to a given message, and 3) the ability to define standard protocols. On the darker side, by explicitly attaching every single method to a specific class, the details of the class structure are encoded into the program unnecessarily. This leads to programs that are difficult to evolve and maintain. In other words, today's object-oriented programs often contain more redundant application-specific information than is necessary, thus limiting their reusability. Does this mean we have to either take the curse in order to enjoy the blessing or give up the blessing altogether? Analyzing the problem we realize that not all is lost. What we need is to be able to specify only those elements that are essential to an object-oriented program and then specify them in a way that cJlows them to adapt to new environments.What do we mean by specifying only those elements-classes and methodsthat are essential to an object-oriented program? In [16], Wilde and Huitt point out: "There is a general impression that object-oriented programs may tend to be structured rather differently than conventional programs. For many tasks very brief methods may be written that simply 'pass through' a message to another method with very little processing." Such "traversal, pass through" methods we regard as nonessential. But more important, we intend to focus on classes and methods that are essential not only to a particular application but also potentially to a family of related applications.How can we identify such generic classes and methods? Consider the following "paradox of the inventor" posed by mathematician George Folya [12]. He observed that it is often easier to solve a more general problem than the one at hand and then to use the solution of the general problem to solve the specific problem. The hard work consists of finding the appropriate generalization. Polya uses the following example to demonstrate the technique. O ACM 0002-0782/94/().Mi(i s , Mi COMMUIHMTIOHS OP THB aCM May t994/Vol.37, Ni>.S lOt
Reorganisation and evolution of class hierarchies is important for object-oriented system development and has received considerable attention in the literature. The contributions of this paper are: (1) a formal study of a set of extension relations and transformations on class hierarchies; (2) a presentation of a small set of primitive transformations which form a minimal and complete basis for the extension relations; and (3) an analysis of the impact of these transformations at the object level. The study leads to a better understanding of evolution and reuse of object-oriented software and class hierarchies. It also provides a terminology and a means of classification for design reuse. The theory presented in this paper is based on the Demeter data model, which gives a concise mathematical foundation for classes and their inheritance and part-of relationships. Parts of the theory have been implemented in the Demeter System TM C++, a CASE tool for object-oriented design and programming.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2025 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.