Skip to content
Licensed Unlicensed Requires Authentication Published by De Gruyter Oldenbourg February 3, 2012

Virtual Separation of Concerns: Toward Preprocessors 2.0

Virtuelle Trennung von Belangen: Ein Schritt zu Präprozessoren 2.0
  • Christian Kästner

Abstract

Conditional compilation with preprocessors like cpp is a simple but effective means to implement variability. By annotating code fragments with #ifdef and #endif directives, different program variants with or without these fragments can be created, which can be used (among others) to implement software product lines. Although, preprocessors are frequently used in practice, they are often criticized for their negative effect on code quality and maintainability. We show how simple tool support — views, visualizations, disciplined annotations, and variability-aware type systems — can address these problems and emulate some benefits of modularized implementations. Instead of separating source code into files, we pursue a “virtual separation of concerns”.

Zusammenfassung

Bedingte Kompilierung ist ein einfaches und häufig benutztes Mittel zur Implementierung von Variabilität in Softwareproduktlinien, welches aber aufgrund negativer Auswirkungen auf Codequalität und Wartbarkeit stark kritisiert wird. Wir zeigen wie Werkzeugunterstützung — Sichten, Visualisierung, kontrollierte Annotationen, Produktlinien-Typsystem — die wesentlichen Probleme beheben kann und viele Vorteile einer modularen Entwicklung emuliert. Wir bieten damit eine Alternative zur klassischen Trennung von Belangen mittels Modulen. Statt Quelltext notwendigerweise in Dateien zu separieren, erzielen wir eine “virtuelle Trennung von Belangen” durch entsprechende Werkzeugunterstüzung.


* Correspondence address: Philipps-University Marburg, Department of Computer Science and Mathematics, Hans-Meerwein-Str., 35032 Marburg, Deutschland,

Published Online: 2012-02-03
Published in Print: 2012-02

© by Oldenbourg Wissenschaftsverlag, Marburg, Germany

Downloaded on 20.5.2024 from https://www.degruyter.com/document/doi/10.1524/itit.2012.0662/html
Scroll to top button