Bence Babati, G. Horváth, Norbert Pataki, Attila Páter-Részeg
{"title":"On the Validated Usage of the C++ Standard Template Library","authors":"Bence Babati, G. Horváth, Norbert Pataki, Attila Páter-Részeg","doi":"10.1145/3351556.3351570","DOIUrl":null,"url":null,"abstract":"The C++ Standard Template Library (STL) is the most well-known and widely used library that is based on the generic programming paradigm. The STL takes advantage of C++ templates, so it is an extensible, effective but flexible system. Professional C++ programs cannot miss the usage of the STL because it increases quality, maintainability, understandability and efficacy of the code. However, the usage of C++ STL does not guarantee error-free code. Contrarily, incorrect application of the library may introduce new types of problems. Unfortunately, there is still a large number of properties that are tested neither at compilation-time nor at runtime. It is not surprising that in implementation of C++ programs so many STL-related bugs may occur. It is clearly seen that the compilation validation is not sophisticated enough to detect subtle misusages of this library. In this paper, we propose different approaches for the validation of the C++ STL's usage. We take advantage of aspect-oriented programming paradigm, metaprogramming techniques, static analysis, and automated debugging tool as well. We compare the presented approaches comprehensively, the pros and cons of these techniques are considered, evaluated and highlighted.","PeriodicalId":126836,"journal":{"name":"Proceedings of the 9th Balkan Conference on Informatics","volume":"28 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-09-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 9th Balkan Conference on Informatics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3351556.3351570","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
Abstract
The C++ Standard Template Library (STL) is the most well-known and widely used library that is based on the generic programming paradigm. The STL takes advantage of C++ templates, so it is an extensible, effective but flexible system. Professional C++ programs cannot miss the usage of the STL because it increases quality, maintainability, understandability and efficacy of the code. However, the usage of C++ STL does not guarantee error-free code. Contrarily, incorrect application of the library may introduce new types of problems. Unfortunately, there is still a large number of properties that are tested neither at compilation-time nor at runtime. It is not surprising that in implementation of C++ programs so many STL-related bugs may occur. It is clearly seen that the compilation validation is not sophisticated enough to detect subtle misusages of this library. In this paper, we propose different approaches for the validation of the C++ STL's usage. We take advantage of aspect-oriented programming paradigm, metaprogramming techniques, static analysis, and automated debugging tool as well. We compare the presented approaches comprehensively, the pros and cons of these techniques are considered, evaluated and highlighted.