A static analysis approach for modern iterator development

IF 0.3 Q4 MATHEMATICS
Dániel Kolozsvári, Norbert Pataki
{"title":"A static analysis approach for modern iterator development","authors":"Dániel Kolozsvári, Norbert Pataki","doi":"10.33039/ami.2023.08.006","DOIUrl":null,"url":null,"abstract":". Programming languages evolve in the long term, new standards are specified in which new constructs appear, old elements may become dep-recated. Standard library of programming languages also changes time by time. The standard of the C++ programming language defines the elements of the C++ Standard Template Library (STL) that provides containers, algorithms, and iterators. According to the STL’s generic programming approach, these sets can be extended in a convenient way. The std::iterator class template had been in the C++ since beginning and has been deprecated in the C++17 standard. This class template’s purpose was to specify the traits of an iterator. Typically, it was a base class of many standard and non-standard iterator class to provide the necessary traits. However, the usage of iterator is straightforward and fits into the object-oriented programming paradigm. Many non-standard containers offer custom iterators because of the STL compatibility. Using this base class does not cause any weird effect, therefore usage of iterator can be found in code legacy. In this paper, we present a static analysis approach to assist the development of iterator classes in a modern way in which the iterator class template is not taken advantage of. We utilize the Clang compiler infrastructure to look for how the deprecated iterator classes can be found in legacy code and present an approach how to modernize them.","PeriodicalId":43454,"journal":{"name":"Annales Mathematicae et Informaticae","volume":"1 1","pages":""},"PeriodicalIF":0.3000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Annales Mathematicae et Informaticae","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.33039/ami.2023.08.006","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"MATHEMATICS","Score":null,"Total":0}
引用次数: 0

Abstract

. Programming languages evolve in the long term, new standards are specified in which new constructs appear, old elements may become dep-recated. Standard library of programming languages also changes time by time. The standard of the C++ programming language defines the elements of the C++ Standard Template Library (STL) that provides containers, algorithms, and iterators. According to the STL’s generic programming approach, these sets can be extended in a convenient way. The std::iterator class template had been in the C++ since beginning and has been deprecated in the C++17 standard. This class template’s purpose was to specify the traits of an iterator. Typically, it was a base class of many standard and non-standard iterator class to provide the necessary traits. However, the usage of iterator is straightforward and fits into the object-oriented programming paradigm. Many non-standard containers offer custom iterators because of the STL compatibility. Using this base class does not cause any weird effect, therefore usage of iterator can be found in code legacy. In this paper, we present a static analysis approach to assist the development of iterator classes in a modern way in which the iterator class template is not taken advantage of. We utilize the Clang compiler infrastructure to look for how the deprecated iterator classes can be found in legacy code and present an approach how to modernize them.
现代迭代器开发的静态分析方法
. 编程语言是长期发展的,新的标准被指定,其中出现了新的结构,旧的元素可能会被废弃。编程语言的标准库也随着时间的推移而变化。c++编程语言的标准定义了c++标准模板库(STL)的元素,STL提供了容器、算法和迭代器。根据STL的泛型编程方法,可以方便地扩展这些集合。std::iterator类模板从一开始就存在于c++中,但在c++ 17标准中已弃用。这个类模板的目的是指定迭代器的特征。通常,它是许多标准和非标准迭代器类的基类,以提供必要的特性。但是,迭代器的用法很简单,适合面向对象编程范例。由于STL兼容性,许多非标准容器提供了自定义迭代器。使用这个基类不会产生任何奇怪的效果,因此可以在代码遗留中找到迭代器的使用。在本文中,我们提出了一种静态分析方法,以一种不利用迭代器类模板的现代方式帮助开发迭代器类。我们利用Clang编译器基础结构来查找如何在遗留代码中找到已弃用的迭代器类,并提供一种使其现代化的方法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
CiteScore
0.90
自引率
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学术官方微信