c++中对改进的异常规范的支持

IF 0.4 Q4 COMPUTER SCIENCE, INFORMATION SYSTEMS
Endre Fulop, Attila Gyen, Norbert Pataki
{"title":"c++中对改进的异常规范的支持","authors":"Endre Fulop, Attila Gyen, Norbert Pataki","doi":"10.58245/ipsi.tir.2301.05","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 consequence, developers have to pay attention to avoid mistakes because of the missing compiler support. Moreover, C++11 provides 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 measuring code complexity. In this paper, we analyze how the older style exception specifications can be rejuvenated for 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-source projects. Based on the previous evaluation, not using the strictest possible exception-specification is a problem that occurred in every analyzed project. We would like to assist developers in identifying instances of this problem by providing an integrated comprehension tool, that enables them to make use of the exception analysis results in an interactive way in their IDEs.","PeriodicalId":41192,"journal":{"name":"IPSI BgD Transactions on Internet Research","volume":"38 1","pages":""},"PeriodicalIF":0.4000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Monaco Support for an Improved Exception Specification in C++\",\"authors\":\"Endre Fulop, Attila Gyen, Norbert Pataki\",\"doi\":\"10.58245/ipsi.tir.2301.05\",\"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 consequence, developers have to pay attention to avoid mistakes because of the missing compiler support. Moreover, C++11 provides 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 measuring code complexity. In this paper, we analyze how the older style exception specifications can be rejuvenated for 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-source projects. Based on the previous evaluation, not using the strictest possible exception-specification is a problem that occurred in every analyzed project. We would like to assist developers in identifying instances of this problem by providing an integrated comprehension tool, that enables them to make use of the exception analysis results in an interactive way in their IDEs.\",\"PeriodicalId\":41192,\"journal\":{\"name\":\"IPSI BgD Transactions on Internet Research\",\"volume\":\"38 1\",\"pages\":\"\"},\"PeriodicalIF\":0.4000,\"publicationDate\":\"2023-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"IPSI BgD Transactions on Internet Research\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.58245/ipsi.tir.2301.05\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q4\",\"JCRName\":\"COMPUTER SCIENCE, INFORMATION SYSTEMS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"IPSI BgD Transactions on Internet Research","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.58245/ipsi.tir.2301.05","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 1

摘要

异常处理是现代编程语言中一种有益的语言结构。然而,c++的类型系统并不真正符合这些要素。因此,开发人员必须注意避免由于缺少编译器支持而导致的错误。此外,c++ 11提供了一种方法,在这种方法中,异常以与早期标准相反的方式出现在函数签名中。静态分析是一种方法,在这种方法中,我们根据源代码对程序进行推理,而不执行被分析的代码。它可以用于许多目的,例如,查找错误、重构代码或度量代码复杂性。在本文中,我们分析了旧风格的异常规范如何为现代习惯用法恢复活力。自c++ 11以来,显式地将函数标记为具有保证的无异常执行是主要的方法。我们开发了一个静态分析工具,为这些规范提供提示。我们通过对开源项目的分析来评估我们的方法。根据前面的评估,没有使用尽可能严格的异常规范是每个分析项目中都会出现的问题。我们希望通过提供一个集成的理解工具来帮助开发人员识别这个问题的实例,使他们能够在他们的ide中以交互的方式使用异常分析结果。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Monaco Support for an Improved Exception Specification in C++
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 consequence, developers have to pay attention to avoid mistakes because of the missing compiler support. Moreover, C++11 provides 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 measuring code complexity. In this paper, we analyze how the older style exception specifications can be rejuvenated for 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-source projects. Based on the previous evaluation, not using the strictest possible exception-specification is a problem that occurred in every analyzed project. We would like to assist developers in identifying instances of this problem by providing an integrated comprehension tool, that enables them to make use of the exception analysis results in an interactive way in their IDEs.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
IPSI BgD Transactions on Internet Research
IPSI BgD Transactions on Internet Research COMPUTER SCIENCE, INFORMATION SYSTEMS-
自引率
25.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学术官方微信