C++ Source Code Rejuvenation for an Improved Exception Specification

Endre Fülöp, Attila Gyen, Norbert Pataki
{"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}
引用次数: 0

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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
改进异常规范的c++源代码再生
异常处理是现代编程语言中一种有益的语言结构。然而,c++的类型系统并不真正符合这些要素。因此,开发人员必须注意避免由于缺少编译器支持而导致的错误。此外,c++ 11提供了一种方法,在这种方法中,异常以与早期标准相反的方式出现在函数签名中。静态分析是一种方法,在这种方法中,我们根据源代码对程序进行推理,而不执行被分析的代码。它可以用于许多目的,例如,查找错误、重构代码或度量代码复杂性。在本文中,我们分析了如何使旧式的异常规范重新焕发活力,以适应现代的习惯用法。自c++ 11以来,显式地将函数标记为具有保证的无异常执行是主要的方法。我们开发了一个静态分析工具,为这些规范提供提示。我们通过对开源项目的分析来评估我们的方法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Software Engineers' Questions and Answers on Stack Exchange Collision detection and response approaches for computer muscle modelling Supervised learning data preprocessing for short-term traffic flow prediction A 1D CNN-based model for IoT anomaly detection using INT data Image steganography with using QR code
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1