Utilizing Modern Programming Techniques and the Boost Libraries for Scientific Software Development Josef Weinbub Institute for Microelectronics Technische Universität Wien Vienna, Austria weinbub@iue.tuwien.ac.at Karl Rupp Institute for Microelectronics and Institute for Analysis and Scientific Computing Technische Universität Wien Vienna, Austria rupp@iue.tuwien.ac.at Siegfried Selberherr Institute for Microelectronics Technische Universität Wien Vienna, Austria selberherr@iue.tuwien.ac.at ABSTRACT Modern programming techniques and libraries provide soft- ware developers with a vast set of functionality and flex- ibility. However, applying the associated techniques like generic, functional, or meta-programming requires advanced programming skills. In this work we investigate three tasks in the context of scientific computing, where we utilize mod- ern programming techniques as well as the Boost libraries. We introduce our approaches and show that applying those techniques and the Boost libraries results in highly versatile, maintainable, compact, and extendible code. Categories and Subject Descriptors D.1.0 [Programming Techniques]: General; D.2.13 [Software Engineering]: Reusable Software Keywords C++, Boost, Generic Programming, Meta-Programming, Functional Programming 1. INTRODUCTION Modern programming techniques like generic and meta-pro- gramming are heavily utilized in the Boost libraries to pro- vide versatile and extendible libraries to support C++ soft- ware developers [1]. One of the advantages of applying the Boost libraries is to make use of already available function- ality, hence, reducing development time. For example, the Boost Spirit Library (BSL) [2] allows for the implementa- tion of a versatile, extendible, and high-performance parser with minimum development eort. Additionally, the Boost libraries lower the entry barrier for utilizing modern pro- gramming techniques, like meta-programming. For exam- ple, the Boost Meta-Programming Library (MPL) [3] as well as the Boost Fusion Library (BFL) [4] provide algorithms and datastructures for the compile-time domain. Further- more, the Boost libraries make upcoming C++ language features available, before they are formulated in the stan- dard, hence, enabling the programmer to investigate possi- bilities on the frontier of the C++ programming language. The fact that various aspects of Boost have been adopted to the new C++11 standard underlines the importance and the influence of the Boost libraries to the overall C++ de- velopment [5]. In this work we focus on the application of modern C++ techniques and libraries to scientific software development. The scientific setting hugely benefits from open-source im- plementations, as available work can be accessed and ex- tended, which ultimately reduces overall development time. However, modern programming techniques as well as Boost libraries, which heavily rely on those techniques, might be primarily only utilizable by enthusiasts or computer scien- tists. For example, tag-dispatching, concepts, and traits are typically not part of a C++ user’s skill set. However, the application of Boost libraries, and modern programming techniques in general, by engineering software tools has expanded over the recent years [6][7]. Generally, in an academic environment, especially in the context of en- gineering, the application driven focus on software develop- ment often supersedes the necessity to invest time and eort to implement software with a focus on extendibility, main- tainability, and flexibility. In this work we depict three ap- plication scenarios of modern programming techniques and several Boost libraries in the context of scientific comput- ing. We will show that the additional implementation eort results in highly extendible, maintainable, compact, and ver- satile code. Generally, the tasks are related in the sense that they deal with a set of components in dierent contexts. Section 2 in- troduces an approach for a lightweight scheduler for a com- ponent framework. The Boost Graph Library (BGL) [8] as well as the Boost Phoenix Library (BPL) [9] are utilized to implement a plugin scheduler for sequential and parallel executions with minimum implementation eort. Section 3 discusses an advanced property-based selection method for a set of algorithms based on the BFL and the MPL. Section 4 depicts an approach to generalize geometrical algorithms by utilizing the generic paradigm. The theoretical background as well as implementations are discussed. Section 5 summa- rizes the presented topics. 2. LIGHTWEIGHT PLUGIN SCHEDULER One way to introduce extendibility to a software project is to aim for an object-oriented framework approach [10][11]. Such an environment can be combined with a pluggable ex- tension approach to support long lifetime support by in- creased maintainability and extendibility [12][13][14]. 1