Year: 2006
Type: report
Abstract: Refactoring has become a popular technique for the development and maintenance of object-oriented systems. We have been working on the refactoring of C programs, including the C preprocessor (Cpp), and we have built CRefactory, a refactoring tool for C programs. The independence of Cpp from the underlying programming language complicates the analysis and refactoring of programs that use Cpp. Nevertheless, that independence is helpful when implementing refactorings on Cpp directives. While refactorings are defined as “behavior preserving transformations”, there is usually no formal proof of their correctness. By using rewriting logic and its Maude implementation, we have formally specified the semantics of Cpp and also of some refactorings on Cpp directives. The specifications are then used to formally prove refactoring correctness. This paper describes the formal specifications of Cpp and of three of its refactorings, and presents the proofs of their correctness.
Institution: University of Illinois Urbana-Champaign
Language: English
Subfield: Software
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
Funder: Office of Naval Research
Award: G1298948948
OpenAlex ID: W590073850
