In order to accommodate the spectrum of configuration options currently required for competitive system infrastructures, many systems leverage heavy usage of C preprocessor controlled conditional compilation. Inherent costs associated with this heavy preprocessor usage include both the impaired readability of the base system, and the reduced reusability of the configuration code.Our proposed solution, C-CLR, allows developers to sift through views of a system based on configuration options. Configuration-specific views improve readability of the system as a whole by including only relevant code. They also support reusability by aiding aspect mining through easy navigation to relevant configuration options, and automated identification of equivalent blocks of code within conditionally compiled segments.
Today's large software systems and libraries are geared towards a broad range of platforms and environments, often relying on conditional compilation through preprocessor directives to generate specific builds for a given set of configuration flags. In spite of the well-documented benefits of using preprocessor directives for conditional compilation, heavy preprocessor presence can hinder code readability and affect maintenance and debugging. Although various existing preprocessor tools hide unwanted preprocessor conditionals, we present a more portable Eclipse-based solution called CViMe (Conditional-compilation Viewer and Miner) that relies on object-modeling to not only fold non-compiled code, but refactor conditionally compiled blocks into reusable units like macros, significantly reducing the presence of preprocessor directives at the editor level.
Program comprehension tools targeting specific high-level languages do not currently scale to the complexities of many of today's low level systems. At the lowest level, the wide variety of architectures and platforms results in a widening spectrum of instruction sets and assembly languages. Slightly above this level, C-based systems targeting multiple architectures and platforms are riddled with compiler directives to accommodate the demands of configurable systems.This paper proposes a generalized and extensible framework for the purpose of program navigation and analysis, leveraging an intermediate representation of source code to separate low-level domain detail from tool support. A prototype of this framework is provided with two case studies evaluating its efficacy within multiple domains. This study demonstrates the feasibility of an extensible framework as a common core for low-level program comprehension tools.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2025 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.