Refactoring to Standard C++20 Modules

IF 1.7 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Richárd Szalay, Zoltán Porkoláb
{"title":"Refactoring to Standard C++20 Modules","authors":"Richárd Szalay,&nbsp;Zoltán Porkoláb","doi":"10.1002/smr.2736","DOIUrl":null,"url":null,"abstract":"<p>Good component-based design for software projects is a desired property both for development and maintenance. The C++ programming language inherited the “translation unit” model from C, where every source file is individually compiled with no knowledge about other parts of the project. This model has several drawbacks, and C++20 <i>Modules</i> is the Standard's answer for them. Moreover, <i>Modules</i> allows a cleaner encapsulation of concern. This paper investigates a semi-automatic modularization method to refactor existing C++ projects. Our approach uses dependency analysis and clustering to organize elements of an existing project into modules, without domain-specific information. Based on our study of two medium-size open-source projects from disjoint domains and vastly distinct architecture, upgrading existing software systems to the new <i>Modules</i> feature is limited by the existing design of the project's architecture. To fully facilitate the use of <i>Modules</i> in a project, it is likely that both project-internal and user-facing interfaces must be changed.</p>","PeriodicalId":48898,"journal":{"name":"Journal of Software-Evolution and Process","volume":"37 1","pages":""},"PeriodicalIF":1.7000,"publicationDate":"2024-11-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://onlinelibrary.wiley.com/doi/epdf/10.1002/smr.2736","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Software-Evolution and Process","FirstCategoryId":"94","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1002/smr.2736","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

Good component-based design for software projects is a desired property both for development and maintenance. The C++ programming language inherited the “translation unit” model from C, where every source file is individually compiled with no knowledge about other parts of the project. This model has several drawbacks, and C++20 Modules is the Standard's answer for them. Moreover, Modules allows a cleaner encapsulation of concern. This paper investigates a semi-automatic modularization method to refactor existing C++ projects. Our approach uses dependency analysis and clustering to organize elements of an existing project into modules, without domain-specific information. Based on our study of two medium-size open-source projects from disjoint domains and vastly distinct architecture, upgrading existing software systems to the new Modules feature is limited by the existing design of the project's architecture. To fully facilitate the use of Modules in a project, it is likely that both project-internal and user-facing interfaces must be changed.

Abstract Image

重构为标准c++ 20模块
良好的基于组件的软件项目设计是开发和维护所需的属性。c++编程语言继承了C语言的“翻译单元”模型,其中每个源文件都是单独编译的,不需要了解项目的其他部分。这个模型有几个缺点,c++ 20模块是标准的答案。此外,模块允许对关注点进行更清晰的封装。本文研究了一种半自动模块化方法来重构现有的c++项目。我们的方法使用依赖分析和集群来将现有项目的元素组织到模块中,而不需要特定于领域的信息。基于我们对两个中等规模的开源项目的研究,它们来自不同的领域和截然不同的体系结构,将现有的软件系统升级到新的模块功能受到项目体系结构现有设计的限制。为了充分促进在项目中使用模块,很可能必须更改项目内部和面向用户的接口。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Journal of Software-Evolution and Process
Journal of Software-Evolution and Process COMPUTER SCIENCE, SOFTWARE ENGINEERING-
自引率
10.00%
发文量
109
×
引用
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学术官方微信