cJ: enhancing java with safe type conditions
Proceedings of the 6th international conference on Aspect-oriented software development
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
CScout: A refactoring browser for C
Science of Computer Programming
TypeChef: toward type checking #ifdef variability in C
FOSD '10 Proceedings of the 2nd International Workshop on Feature-Oriented Software Development
Software development is program transformation
Proceedings of the FSE/SDP workshop on Future of software engineering research
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
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
A simple generic library for c
ICSR'06 Proceedings of the 9th international conference on Reuse of Off-the-Shelf Components
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
Does the discipline of preprocessor annotations matter?: a controlled experiment
Proceedings of the 12th international conference on Generative programming: concepts & experiences
Investigating preprocessor-based syntax errors
Proceedings of the 12th international conference on Generative programming: concepts & experiences
Hi-index | 0.00 |
Preprocessor conditionals are heavily used in C programs since they allow the source code to be configured for different platforms or capabilities. However, preprocessor conditionals, as well as other preprocessor directives, are not part of the C language. They need to be evaluated and removed, and so a single configuration selected, before parsing can take place. Most analysis and program understanding tools run on this preprocessed version of the code so their results are based on a single configuration. This paper describes the approach of CRefactory, a refactoring tool for C programs. A refactoring tool cannot consider only a single configuration: changing the code for one configuration may break the rest of the code. CRefactory analyses the program for all possible configurations simultaneously. CRefactory also preserves preprocessor directives and integrates them in the internal representations. The paper also presents metrics from two case studies to show that CRefactoryýs program representation is practical.