Conditional Compilation is Dead, Long Live Conditional Compilation!
Highly-configurable systems written in C form our most critical computing infrastructure. The preprocessor is integral to C, because conditional compilation enables such systems to produce efficient object code. However, the preprocessor makes code harder to reason about for both humans and tools. Previous approaches to this challenge developed new program analyses for unpreprocessed source code or developed new languages and constructs to replace the preprocessor. But having special-purpose analyses means maintaining a new toolchain, while new languages face adoption challenges and do not help with existing software. We propose the best of worlds: eliminate the preprocessor but preserve its benefits. Our design replaces preprocessor usage with C itself, augmented with syntax-preserving, backwards-compatible dependent types. We discuss automated conditional compilation to replicate preprocessor performance. Our approach opens new directions for research into new compiler optimizations, dependent types for configurable software, and automated translation away from preprocessor use.
Fri 31 MayDisplayed time zone: Eastern Time (US & Canada) change
16:00 - 17:20
|Global Optimization of Numerical Programs via Prioritized Stochastic Algebraic TransformationsTechnical Track|
|Type Migration in Ultra-Large-Scale CodebasesTechnical Track|
Ameya Ketkar Oregon State University, USA, Ali Mesbah University of British Columbia, Davood Mazinanian University of British Columbia, Danny Dig School of EECS at Oregon State University, Edward Aftandilian GooglePre-print
|Dynamic Slicing for AndroidTechnical Track|
|Conditional Compilation is Dead, Long Live Conditional Compilation!NIER|
New Ideas and Emerging ResultsPre-print