Our approach is based on our earlier work, which involved developing a model for programming language support for reuse, and our work in computer science education, where the model has already been very useful. We propose to develop programming environment featuring tools that directly support those aspects that our model tells us are important to improving reusability. Our model is based on the concept of code assemblies, a symmetry of context reuse and component reuse , and dependencies that are beneficial or detrimental to reuse. The model was designed from consideration of programming language features and how they are used in programming, and so should also apply to a programming environment where the language features are actually used.
Our first prototype tools concentrate on assisting the programmer to understand the structure of their program from the viewpoint of reusability. Our education work suggests that students need such assistance during program development to keep a focus on how their program design relates to principles of reusability. We suspect that similar issues affect programmers in industry, although on a larger scale. One of our tools addresses static program structure, and so is similar to a CASE tool featuring a class browser. However, we have adapted the diagrammatic notation to highlight the interplay of context and component reuse. Another tool addresses dynamic program structure, and so is similar to a program visualisation system. Again, we use diagrams to illustrate the connections as code assemblies use, and are used by, other assemblies. In this tool the diagrams are animated as the program runs, and the programmer can inspect the changing structure to better understand the patterns that result, and so gain insight into how assemblies are, or might be, used and reused.
Our experience with these first prototypes has been positive, and we are encouraged that such tools really can facilitate programming for reusability. Moreover, our model does seem to match the needs of a programming environment. We are now developing a structure for tool support throughout the programming process. Broadly, we distinguish program construction and program exploration. In construction, there is support needed both in harnessing assemblies from outside (e.g. repositories), and from within (e.g. editors). In exploration, there is support needed both for the static program and the dynamic execution, and this support can extend to testing, profiling, and algorithm animation. We are now developing a second set of prototypes to test the overall structure, and to refine our understanding. We hope to address each kind of programming tool, and eventually develop an entire programming environment that explicitly supports reuse. This work is still in progress, and we hope this poster will encourage early feedback on our approach.