改进异常规范的c++源代码再生

Endre Fülöp, Attila Gyen, Norbert Pataki
{"title":"改进异常规范的c++源代码再生","authors":"Endre Fülöp, Attila Gyen, Norbert Pataki","doi":"10.1109/Informatics57926.2022.10083493","DOIUrl":null,"url":null,"abstract":"Exception handling is a beneficial language construct in modern programming languages. However, C++'s type system does not really conform to these elements. As a con-sequence, developers have to pay attention to avoid mistakes because of the missing compiler support. Moreover, C++11provides an approach in which exceptions appear in the function's signature in an inverse manner compared to the earlier standards. Static analysis is an approach in which we reason about a program based on the source with no execution of the analyzed code. It can be used for many purposes, for instance, finding bugs, refactoring the code or measure code complexity. In this paper, we analyze how the older style exception speci-fications can be rejuvenated for the modern idioms. Explicitly marking the functions as having a guaranteed exception-free execution is the primary way since C++11. We develop a static analyzer tool for providing hints for these specifications. We evaluate our method with the analysis of open sources projects.","PeriodicalId":101488,"journal":{"name":"2022 IEEE 16th International Scientific Conference on Informatics (Informatics)","volume":"2016 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-11-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"C++ Source Code Rejuvenation for an Improved Exception Specification\",\"authors\":\"Endre Fülöp, Attila Gyen, Norbert Pataki\",\"doi\":\"10.1109/Informatics57926.2022.10083493\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Exception handling is a beneficial language construct in modern programming languages. However, C++'s type system does not really conform to these elements. As a con-sequence, developers have to pay attention to avoid mistakes because of the missing compiler support. Moreover, C++11provides an approach in which exceptions appear in the function's signature in an inverse manner compared to the earlier standards. Static analysis is an approach in which we reason about a program based on the source with no execution of the analyzed code. It can be used for many purposes, for instance, finding bugs, refactoring the code or measure code complexity. In this paper, we analyze how the older style exception speci-fications can be rejuvenated for the modern idioms. Explicitly marking the functions as having a guaranteed exception-free execution is the primary way since C++11. We develop a static analyzer tool for providing hints for these specifications. We evaluate our method with the analysis of open sources projects.\",\"PeriodicalId\":101488,\"journal\":{\"name\":\"2022 IEEE 16th International Scientific Conference on Informatics (Informatics)\",\"volume\":\"2016 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-11-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2022 IEEE 16th International Scientific Conference on Informatics (Informatics)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/Informatics57926.2022.10083493\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE 16th International Scientific Conference on Informatics (Informatics)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/Informatics57926.2022.10083493","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

异常处理是现代编程语言中一种有益的语言结构。然而,c++的类型系统并不真正符合这些要素。因此,开发人员必须注意避免由于缺少编译器支持而导致的错误。此外,c++ 11提供了一种方法,在这种方法中,异常以与早期标准相反的方式出现在函数签名中。静态分析是一种方法,在这种方法中,我们根据源代码对程序进行推理,而不执行被分析的代码。它可以用于许多目的,例如,查找错误、重构代码或度量代码复杂性。在本文中,我们分析了如何使旧式的异常规范重新焕发活力,以适应现代的习惯用法。自c++ 11以来,显式地将函数标记为具有保证的无异常执行是主要的方法。我们开发了一个静态分析工具,为这些规范提供提示。我们通过对开源项目的分析来评估我们的方法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
C++ Source Code Rejuvenation for an Improved Exception Specification
Exception handling is a beneficial language construct in modern programming languages. However, C++'s type system does not really conform to these elements. As a con-sequence, developers have to pay attention to avoid mistakes because of the missing compiler support. Moreover, C++11provides an approach in which exceptions appear in the function's signature in an inverse manner compared to the earlier standards. Static analysis is an approach in which we reason about a program based on the source with no execution of the analyzed code. It can be used for many purposes, for instance, finding bugs, refactoring the code or measure code complexity. In this paper, we analyze how the older style exception speci-fications can be rejuvenated for the modern idioms. Explicitly marking the functions as having a guaranteed exception-free execution is the primary way since C++11. We develop a static analyzer tool for providing hints for these specifications. We evaluate our method with the analysis of open sources projects.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信