next up previous contents
Next: 4. Programming Concepts Up: 3 Practical Concepts Previous: 3 Practical Concepts


3. Overview

This chapter serves as a catalyst to transform the theoretical Part II into applicable software engineering concepts which are required to develop generic and reusable software components. Although the underlying ideas were presented by McIlroy at the NATO conference in 1968 [70], several programming languages were analyzed to implement reusable components, but no satisfactory language has been found [16] since then. A possible realization was given by the advent of C++ and the template mechanisms and the related generic programming paradigm. This trend met a milestone with the development of the C++ STL, the first generic template library where data structures have been separated from the algorithms. The STL systematically developed a catalog of concepts [38], started with the work of Stepanov [16] by implementing generic algorithms. The systematic study of algorithms and data structures and the possibilities of combining programming paradigms, necessary for further development of generic programming, require not only a firm theoretical base but also sufficient support within a programming language. In 1995 several requirements [71] to enable the transition of imperative application design to a generic component programming were noted:


Beside this catalog of requirements, which facilitates the identification and subsequent development of orthogonal and reusable components, a design guide specifying how to efficiently assemble generic components is needed for the development of complex applications. The benefits of orthogonal and therefore decoupled and reusable components are self evident, the design of generic libraries has been difficult [71] and has remained challenging although the STL has already demonstrated that all issues are resolvable. The evolution of languages and software technology has enabled to take the goals one step further. The quest for mathematical notations in programming languages, for example, was greatly advanced by the efforts leading to the grid algorithm library (GrAL [18]), where algorithms were specified independently of the underlying mesh. The theoretical contribution of this work was very powerful, but a complete and efficient implementation of usable software components is still missing.

This chapter identifies and decouples generic components which are then assembled in Part IV into the generic scientific simulation environment. An important fact is that the identification process has not been started from scratch, but is based on the work and concepts identified and implemented during many years at our institute. The approach which has been developed and is presented here renders them in a different context for multi-paradigm theoretically driven, generic component-based programming. The building blocks are not based on low-level components, instead a small number of application-oriented building-block components is sketched. The low-level components, such as the STL and various Boost libraries [72,73,44,74,75], are heavily used to build these blocks. Nevertheless, the deeper goal of transcending the imperative line-by-line programming paradigm towards a component programming paradigm remains. Only by relying on a component-based approach is it possible to educate the next generation of engineers in the design and use of these components. A consistent minimal base for application design can thereby be identified without restricting global applicability related to the following issues:


Before introducing the transition of cell complex and fiber bundle concepts, an important part of programming has to be introduced: the concept of a data model which identifies and states the possible mechanism for storing data within a computer as well as the necessary operations on them. Several programming paradigms can thereby also be identified. After introducing these concepts for programming, the transition to applied concepts is finalized by stating several application concepts as well as reviewing related work.

The language of choice is C++ for various reasons. Up to now only C++ can transform all of these concepts into code which results in an overall high performance, while also exhibiting the smallest distances between the specification of concepts and their realization [76,77]. The STL has shown that genericity and efficiency do not have to be contradictory requirements by the concept of meta-programming [45]. The application built with generic components has to provide the same performance guarantees as with manually tuned source code. This is only realizable if each component guarantees its performance. The STL has introduced run-time constraints for each of its components.

It is important to mention that in software engineering the discussion and comparison of concepts by referal to the resulting code is necessary. Therefore code parts are not given in an abstract form but with an actual implementation in C++.


next up previous contents
Next: 4. Programming Concepts Up: 3 Practical Concepts Previous: 3 Practical Concepts

R. Heinzl: Concepts for Scientific Computing