The C programming language
Refactoring object-oriented frameworks
Refactoring object-oriented frameworks
The design and evolution of C++
The design and evolution of C++
Lifecycle and refactoring patterns that support evolution and reuse
Pattern languages of program design
Tool support for planning the restructuring of data abstractions in large systems
SIGSOFT '96 Proceedings of the 4th ACM SIGSOFT symposium on Foundations of software engineering
Supporting the restructuring of data abstractions through manipulation of a program visualization
ACM Transactions on Software Engineering and Methodology (TOSEM)
A refactoring tool for Smalltalk
Theory and Practice of Object Systems - Special issue object-oriented software evolution and re-engineering
Refactoring: improving the design of existing code
Refactoring: improving the design of existing code
Evolving Object-Oriented Designs with Refactorings
ASE '99 Proceedings of the 14th IEEE international conference on Automated software engineering
A Survey of Software Refactoring
IEEE Transactions on Software Engineering
ASTEC: a new approach to refactoring C
Proceedings of the 10th European software engineering conference held jointly with 13th ACM SIGSOFT international symposium on Foundations of software engineering
Refactorings for Fortran and high-performance computing
Proceedings of the second international workshop on Software engineering for high performance computing system applications
Generating Rewritable Abstract Syntax Trees
Software Language Engineering
A proposal of operation history management system for source-to-source optimization of HPC programs
Proceedings of the 7th Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging
CScout: A refactoring browser for C
Science of Computer Programming
An analysis of the variability in forty preprocessor-based software product lines
Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1
Automated refactorings for high performance Fortran programmes
International Journal of High Performance Systems Architecture
Structural emergence in partially ordered sets is the key to intelligence
AGI'11 Proceedings of the 4th international conference on Artificial general intelligence
A static analysis tool using a three-step approach for data races in HPC programs
Proceedings of the 2012 Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging
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 |
Refactoring has become a well-known technique for transforming code in a way that preserves behavior. Refactorings may be applied manually, although manual code manipulation is error prone and cumbersome, so maintainers need tools to make automatic refactorings. There is currently extensive literature on refactoring object-oriented programs and some very good tools for refactoring Smalltalk and Java code. Although there is more code written in C or C++ than in any other language, refactoring tools for C with full support for preprocessor directives have not yet appeared.The C programming language, especially the preprocessor directives that coexist with it, complicates refactorings in different ways as directives are not legal C code and may violate otherwise correct refactorings.Refactoring C poses two major research challenges. On the one hand, as preprocessor directives may violate correctness, new precondition and execution rules must be defined for existing refactorings to preserve behavior. On the other hand, the automated execution of refactorings requires specialized program analysis tools to represent and manipulate preprocessor directives. After studying the area we have found some results to overcome these challenges and make a correct tool for the C language attainable.This paper first discusses the difficulties in refactoring C code with preprocessor directives. It then defines preconditions and execution rules to maintain correctness of refactoring in the presence of macros and conditional directives. Moreover, new refactorings are proposed for macro definitions and conditionals. Lastly, the paper suggests enhancements to program analysis and program representation tools to correctly manipulate preprocessor directives.