A Model of As-Is Reuse

From our work on Genesis and Avoca [Bat88,Bat91a,Bat91b,OMa90,Pet90], we have shown that large software systems correspond to type expressions. Our idea is simple. Let R be the function-call interface to a software system. In principle, we know that there can be many different implementations of R. We define the realm of R to be the set of all software systems that support exactly interface of R. The members of realm/interface R can be listed as an enumerated type. Two possible realms R and S are shown below:


		 R  =    a, b, c  


S = d[ x:R ], e[ x:R ], f[ x:R ]

Interface R has three implementations, namely the software components a, b, and c. Similarly, interface S is implemented by the components d, e, and f. Observe that realms group together all components that are plug-compatible and interchangeable. For example, because all components of R implement the same interface, one can swap one implementation/component of R with another. The same applies for components of other realms.

Components may have parameters. All components of S, for example, have a single parameter of type R. What this means is that a component d[ x:R ] of S translates objects and operations of the interface of S to objects and operations of the interface of R. The translation itself does not depend on how R is implemented. This means that any implementation of R can be `plugged' into component d to make it work.

Software systems correspond to type expressions. Two systems are shown below:


		 System_1  =  d[ b ]


System_2 = f[ b ]

System_1 is a composition of component d with b; System_2 is a composition of component f with b. Since both of these systems present the same interface (i.e., both present the interface of S), System_1 and System_2 are also interchangeable implementations of S.

The way we have modeled software makes as-is reuse easy to spot. Consider two systems and their type expressions. If both expressions reference the same component, then that component is being reused. Note that System_1 and System_2 reuse component b. More generally, if two systems have a common subexpression, then these systems share a common subsystem.

Finally, observe that our model of software construction is independent of component size. Components can be very large (i.e., the size of Unix and X-windows), or they could be substantially smaller [Bat91a,Bat91b,Bat91c]. Thus, our model can be used to explain as-is VLSR as well as as-is LSR.