Refactoring: improving the design of existing code
Refactoring: improving the design of existing code
Challenges of refactoring C programs
Proceedings of the International Workshop on Principles of Software Evolution
An Empirical Analysis of C Preprocessor Use
IEEE Transactions on Software Engineering
Refactoring Browser with Preprocessor
CSMR '03 Proceedings of the Seventh European Conference on Software Maintenance and Reengineering
Global Analysis and Transformations in Preprocessed Languages
IEEE Transactions on Software Engineering
Modular information hiding and type-safe linking for C
TLDI '07 Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation
Jeannie: granting java native interface developers their wishes
Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications
Documenting and automating collateral evolutions in linux device drivers
Proceedings of the 3rd ACM SIGOPS/EuroSys European Conference on Computer Systems 2008
Aspect mining in the presence of the C preprocessor
Proceedings of the 2008 AOSD workshop on Linking aspect technology and evolution
Generating Rewritable Abstract Syntax Trees
Software Language Engineering
Parsing C/C++ Code without Pre-processing
CC '09 Proceedings of the 18th International Conference on Compiler Construction: Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009
Living with the Law: Can Automation give us Moore with Less?
ASE '08 Proceedings of the 2008 23rd IEEE/ACM International Conference on Automated Software Engineering
Multi-language synchronization
ESOP'07 Proceedings of the 16th European conference on Programming
ABI compatibility through a customizable language
GPCE '10 Proceedings of the ninth international conference on Generative programming and component engineering
TypeChef: toward type checking #ifdef variability in C
FOSD '10 Proceedings of the 2nd International Workshop on Feature-Oriented Software Development
Partial preprocessing C code for variability analysis
Proceedings of the 5th Workshop on Variability Modeling of Software-Intensive Systems
Analyzing the discipline of preprocessor annotations in 30 million lines of C code
Proceedings of the tenth international conference on Aspect-oriented software development
An approach to improving the structure of error-handling code in the linux kernel
Proceedings of the 2011 SIGPLAN/SIGBED conference on Languages, compilers and tools for embedded systems
Variability-aware parsing in the presence of lexical macros and conditional compilation
Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
SuperC: parsing all of C by taming the preprocessor
Proceedings of the 33rd ACM SIGPLAN conference on Programming Language Design and Implementation
Do background colors improve program comprehension in the #ifdef hell?
Empirical Software Engineering
Hi-index | 0.00 |
The C language is among the most widely used in the world, particularly for critical infrastructure software. C programs depend upon macros processed using the C preprocessor, but these macros are difficult to analyze and are often error-prone[4]. Existing tools that analyze and transform C source code have rudimentary support for the preprocessor, leading to obscure error messages and difficulty refactoring. We present a three part solution: (1) a replacement macro language, ASTEC, that addresses the most important important deficiencies of the preprocessor and that eliminates many of the errors it introduces; (2) a translator, MACROSCOPE, that converts existing code into ASTEC semi-automatically; and (3), an ASTEC-aware refactoring tool that handles preprocessor constructs naturally.ASTEC's primary benefits are its analyzability and its refactorability. We present several refactorings that are enabled by ASTEC. Additionally, ASTEC eliminates many of the sources of errors that can plague C preprocessor macros; Ernst et al.[4] estimate that more than 20% of macros may contain errors. In this paper, we describe our translation and refactoring tools and evaluate them on a suite of programs including OpenSSH and the Linux kernel.