{"title":"Giving meaning to macros","authors":"C. Mennie, C. Clarke","doi":"10.1109/WPC.2004.1311050","DOIUrl":null,"url":null,"abstract":"With the prevalence of legacy C/C++ code, it continually becomes more important to address the issues of readability and maintainability. When considering the problems with refactoring or migrating C/C++ code we see how important a role preprocessor directives play. In part, because of these preprocessor directives it is extremely difficult to maintain our code. We outline a method of fact extraction and manipulation to create a set of transformations that remove preprocessor directives from the original source, converting them into regular C/C++ code with as few changes as possible, while maintaining readability in the code. In addition, we briefly explore some of the subtle issues that arise when migrating preprocessor directives. After discussing the general architecture of our test implementation, we look at some metrics gathered by running it on two software systems.","PeriodicalId":164866,"journal":{"name":"Proceedings. 12th IEEE International Workshop on Program Comprehension, 2004.","volume":"69 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2004-06-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"16","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings. 12th IEEE International Workshop on Program Comprehension, 2004.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/WPC.2004.1311050","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 16
Abstract
With the prevalence of legacy C/C++ code, it continually becomes more important to address the issues of readability and maintainability. When considering the problems with refactoring or migrating C/C++ code we see how important a role preprocessor directives play. In part, because of these preprocessor directives it is extremely difficult to maintain our code. We outline a method of fact extraction and manipulation to create a set of transformations that remove preprocessor directives from the original source, converting them into regular C/C++ code with as few changes as possible, while maintaining readability in the code. In addition, we briefly explore some of the subtle issues that arise when migrating preprocessor directives. After discussing the general architecture of our test implementation, we look at some metrics gathered by running it on two software systems.