{"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}
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.