C/C++ conditional compilation analysis using symbolic execution

Ying Hu, E. Merlo, M. Dagenais, B. Laguë
{"title":"C/C++ conditional compilation analysis using symbolic execution","authors":"Ying Hu, E. Merlo, M. Dagenais, B. Laguë","doi":"10.1109/ICSM.2000.883045","DOIUrl":null,"url":null,"abstract":"Conditional compilation is one of the most powerful parts of a C/C++ environment available for building software for different platforms with different feature sets. Although conditional compilation is powerful, it can be difficult to understand and is error-prone. In large software systems, file inclusion, conditional compilation and macro substitution are closely related and are often largely interleaved. Without adequate tools, understanding complex header files is a tedious task. This practice may even be complicated as the hierarchies of header files grow with projects. This paper presents our experiences of studying conditional compilation based on the symbolic execution of preprocessing directives. Our two concrete goals are: for any given preprocessor directive or C/C++ source code line, finding the simplest sufficient condition to reach/compile it, and finding the full condition to reach/compile that code line. Two different strategies were used to achieve these two goals. A series of experiments conducted on the Linux kernel are presented.","PeriodicalId":348184,"journal":{"name":"Proceedings 2000 International Conference on Software Maintenance","volume":"6 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2000-10-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"44","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings 2000 International Conference on Software Maintenance","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICSM.2000.883045","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 44

Abstract

Conditional compilation is one of the most powerful parts of a C/C++ environment available for building software for different platforms with different feature sets. Although conditional compilation is powerful, it can be difficult to understand and is error-prone. In large software systems, file inclusion, conditional compilation and macro substitution are closely related and are often largely interleaved. Without adequate tools, understanding complex header files is a tedious task. This practice may even be complicated as the hierarchies of header files grow with projects. This paper presents our experiences of studying conditional compilation based on the symbolic execution of preprocessing directives. Our two concrete goals are: for any given preprocessor directive or C/C++ source code line, finding the simplest sufficient condition to reach/compile it, and finding the full condition to reach/compile that code line. Two different strategies were used to achieve these two goals. A series of experiments conducted on the Linux kernel are presented.
使用符号执行的C/ c++条件编译分析
条件编译是C/ c++环境中最强大的部分之一,可用于为具有不同特性集的不同平台构建软件。尽管条件编译功能强大,但它可能难以理解并且容易出错。在大型软件系统中,文件包含、条件编译和宏替换是密切相关的,并且常常在很大程度上相互交织。如果没有适当的工具,理解复杂的头文件是一项乏味的任务。由于头文件的层次结构随着项目的增长而增长,这种做法甚至可能变得复杂。本文介绍了基于预处理指令符号执行的条件编译的研究经验。我们的两个具体目标是:对于任何给定的预处理器指令或C/ c++源代码行,找到到达/编译它的最简单的充分条件,以及找到到达/编译该代码行的完整条件。为了实现这两个目标,我们采用了两种不同的策略。介绍了在Linux内核上进行的一系列实验。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信