使用条件值的C/ c++预处理的快速符号计算

Mario Latendresse
{"title":"使用条件值的C/ c++预处理的快速符号计算","authors":"Mario Latendresse","doi":"10.1109/CSMR.2003.1192425","DOIUrl":null,"url":null,"abstract":"C/C++ code relying on preprocessing can be quite complex to analyze. This is often due to free preprocessing variables set at compile time. In general, preprocessing selectively compile parts of the source code based on the values of preprocessing variables which may be free. In this case, the relations between these parts can only be represented by conditional expressions using the free variables. Traditional symbolic evaluation can be used to infer these expressions, but its best case time complexity is exponential. We present a new approach for symbolic evaluation that can efficiently compute these conditions by binding variables to conditional values and avoiding the path feasibility analysis of traditional symbolic evaluation. It infers the exact conditional expressions for which the lines of code are compiled and the (conditional) values of preprocessing variables at each point of the source code. Our prototype shows the approach as practical and scaleable to large C/C++ software.","PeriodicalId":236632,"journal":{"name":"Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings.","volume":"7 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2003-03-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"19","resultStr":"{\"title\":\"Fast symbolic evaluation of C/C++ preprocessing using conditional values\",\"authors\":\"Mario Latendresse\",\"doi\":\"10.1109/CSMR.2003.1192425\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"C/C++ code relying on preprocessing can be quite complex to analyze. This is often due to free preprocessing variables set at compile time. In general, preprocessing selectively compile parts of the source code based on the values of preprocessing variables which may be free. In this case, the relations between these parts can only be represented by conditional expressions using the free variables. Traditional symbolic evaluation can be used to infer these expressions, but its best case time complexity is exponential. We present a new approach for symbolic evaluation that can efficiently compute these conditions by binding variables to conditional values and avoiding the path feasibility analysis of traditional symbolic evaluation. It infers the exact conditional expressions for which the lines of code are compiled and the (conditional) values of preprocessing variables at each point of the source code. Our prototype shows the approach as practical and scaleable to large C/C++ software.\",\"PeriodicalId\":236632,\"journal\":{\"name\":\"Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings.\",\"volume\":\"7 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2003-03-26\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"19\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings.\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/CSMR.2003.1192425\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CSMR.2003.1192425","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 19

摘要

依赖于预处理的C/ c++代码分析起来可能相当复杂。这通常是由于在编译时设置了自由的预处理变量。一般来说,预处理会根据可能是自由的预处理变量的值选择性地编译部分源代码。在这种情况下,这些部分之间的关系只能用使用自由变量的条件表达式来表示。传统的符号求值可以用来推断这些表达式,但其最佳情况下的时间复杂度是指数的。本文提出了一种新的符号求值方法,通过将变量绑定到条件值,避免了传统符号求值的路径可行性分析,从而有效地计算这些条件。它推断出编译代码行的确切条件表达式,以及源代码中每个点预处理变量的(条件)值。我们的原型表明,该方法是实用的,可扩展到大型C/ c++软件。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Fast symbolic evaluation of C/C++ preprocessing using conditional values
C/C++ code relying on preprocessing can be quite complex to analyze. This is often due to free preprocessing variables set at compile time. In general, preprocessing selectively compile parts of the source code based on the values of preprocessing variables which may be free. In this case, the relations between these parts can only be represented by conditional expressions using the free variables. Traditional symbolic evaluation can be used to infer these expressions, but its best case time complexity is exponential. We present a new approach for symbolic evaluation that can efficiently compute these conditions by binding variables to conditional values and avoiding the path feasibility analysis of traditional symbolic evaluation. It infers the exact conditional expressions for which the lines of code are compiled and the (conditional) values of preprocessing variables at each point of the source code. Our prototype shows the approach as practical and scaleable to large C/C++ software.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信