An approach to safely evolve program families in C

Flávio M. Medeiros
{"title":"An approach to safely evolve program families in C","authors":"Flávio M. Medeiros","doi":"10.1145/2660252.2660254","DOIUrl":null,"url":null,"abstract":"The C preprocessor is widely used to handle variability and solve portability issues in program families. In this context, developers normally use tools like GCC and Clang. However, these tools are not variability-aware, i.e., they preprocess the code and consider each family member individually. As a result, even well-known and widely used families, such as Linux and Apache, contain bad smells and bugs related to variability. To minimize this problem, we propose an approach to safely evolve C program families. We develop a strategy to detect bugs related to variability and define refactorings to remove bad smells in preprocessor directives. Our supporting tool, Colligens, implements our strategy to detect bugs and applies our refactorings automatically. By using our approach in 40 program families, we detect 121 bugs related to variability, and developers accepted 78% of the patches we submit. Also, we remove 477 bad smells in 12 C program families without clone code as in previous studies.","PeriodicalId":194590,"journal":{"name":"ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity","volume":"163 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-10-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2660252.2660254","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

The C preprocessor is widely used to handle variability and solve portability issues in program families. In this context, developers normally use tools like GCC and Clang. However, these tools are not variability-aware, i.e., they preprocess the code and consider each family member individually. As a result, even well-known and widely used families, such as Linux and Apache, contain bad smells and bugs related to variability. To minimize this problem, we propose an approach to safely evolve C program families. We develop a strategy to detect bugs related to variability and define refactorings to remove bad smells in preprocessor directives. Our supporting tool, Colligens, implements our strategy to detect bugs and applies our refactorings automatically. By using our approach in 40 program families, we detect 121 bugs related to variability, and developers accepted 78% of the patches we submit. Also, we remove 477 bad smells in 12 C program families without clone code as in previous studies.
一种在C语言中安全进化程序族的方法
C预处理器被广泛用于处理程序族中的可变性和解决可移植性问题。在这种情况下,开发人员通常使用像GCC和Clang这样的工具。然而,这些工具不是可变性感知的,也就是说,它们预处理代码并单独考虑每个家族成员。因此,即使是众所周知和广泛使用的家族,如Linux和Apache,也包含与可变性相关的不良气味和错误。为了最小化这个问题,我们提出了一种安全地进化C程序族的方法。我们开发了一种策略来检测与可变性相关的错误,并定义重构以消除预处理器指令中的不良气味。我们的支持工具Colligens实现了我们的策略来检测bug并自动应用我们的重构。通过在40个程序族中使用我们的方法,我们检测到121个与可变性相关的错误,开发人员接受了我们提交的78%的补丁。此外,我们在没有克隆代码的情况下消除了12个C程序族中的477个不良气味。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信