Software templates

Software components often cannot be reused since the algorithms they realize are encoded in terms of particular implementations. This paper presents an approach to reusability where algorithms and implementations are specified separately. An algorithm is specified by a sequence of recursion equations called a software template. Templates are defined over values of abstract data types whose implementations are specified separately and catalogued. When a template's data types are bound to catalogued implementations, the template is automatically translated into a component tailored to the chosen implementations, a process called template instantiation. Different implementations of an algorithm can be achieved by merely binding the data types of its template, specification to different implementations.