Prev Up Next
Go backward to Piccola--a Small Composition Language
Oscar Nierstrasz

Go up to Language Design or Extensions
Go forward to Generic Java--Making the Future Safe for the Past
Martin Odersky, joint work with Philip Wadler and Enno Runne


Controlling Genericity
Rüdiger Loos

Starting with Knuth's definition of an algorithm we call an algorithm generic if we drop the requirement of definiteness. In 1971, David Musser and George Collins called generic algorithms `abstract' algorithms and we draw a historical parallel to the concept of abstract or modern algebra introduced at the beginning of this century. Van der Waerden renamed his Modern Algebra after 17 successful editions to Algebra and we expect that `generic programming' will one day simply be called `programming.'

Details of a generic algorithm left unspecified may be the particular domain, the representation of the elements of the domain, and the subalgorithms used. Particular specifications result in definite algorithms. Hence, generic algorithms have to deal with specifications of abstract concepts in order to control genericity.

We propose to use Musser's concept specification language Tecton together with algorithm descriptions for generic programming. The Tecton language was introduced for the Tecton proof system, but in addition it can be combined with generic algorithms in order to verify them, to control type parameter instantiation, and to specify algorithmic efficiency requirements for a library of generic algorithms.

Currently, Tecton has two major applications. It is suitable for expressing a formal, C++ independent specification of the Standard Template Library. Also, it provides a basis of the semantics of Sibylle Schupp's and the author's generic programming language SuchThat and allows for the verification of the axioms of SuchThat's type system. We report on work in progress to implement the Tecton language.


 

Prev Up Next