Structural analysis and visualization of C++ code evolution using syntax trees

Fanny Chevalier, D. Auber, A. Telea
{"title":"Structural analysis and visualization of C++ code evolution using syntax trees","authors":"Fanny Chevalier, D. Auber, A. Telea","doi":"10.1145/1294948.1294971","DOIUrl":null,"url":null,"abstract":"We present a method to detect and visualize evolution patterns in C++ source code. Our method consists of three steps. First, we extract an annotated syntax tree (AST) from each version of a given C++ source code. Next, we hash the extracted syntax nodes based on a metric combining structure and type information, and construct matches (correspondences) between similar-hash subtrees. Our technique detects code fragments which have not changed, or changed little, during the software evolution. By parameterizing the similarity metric, we can flexibly decide what is considered to be identical or not during the software evolution. Finally, we visualize the evolution of the code structure by emphasizing both changing and constant code patterns. We demonstrate our technique on a versioned code base containing a variety of changes ranging from simple to complex.","PeriodicalId":321820,"journal":{"name":"International Workshop on Principles of Software Evolution","volume":"32 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2007-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"30","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Workshop on Principles of Software Evolution","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1294948.1294971","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 30

Abstract

We present a method to detect and visualize evolution patterns in C++ source code. Our method consists of three steps. First, we extract an annotated syntax tree (AST) from each version of a given C++ source code. Next, we hash the extracted syntax nodes based on a metric combining structure and type information, and construct matches (correspondences) between similar-hash subtrees. Our technique detects code fragments which have not changed, or changed little, during the software evolution. By parameterizing the similarity metric, we can flexibly decide what is considered to be identical or not during the software evolution. Finally, we visualize the evolution of the code structure by emphasizing both changing and constant code patterns. We demonstrate our technique on a versioned code base containing a variety of changes ranging from simple to complex.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
结构分析和可视化c++代码演变使用语法树
提出了一种在c++源代码中检测和可视化演化模式的方法。我们的方法包括三个步骤。首先,我们从给定c++源代码的每个版本中提取一个带注释的语法树(AST)。接下来,我们基于结合结构和类型信息的度量对提取的语法节点进行哈希,并在相似哈希子树之间构造匹配(对应)。我们的技术检测在软件发展过程中没有变化或变化很小的代码片段。通过参数化相似度度量,我们可以灵活地决定在软件进化过程中哪些是相同的,哪些是不相同的。最后,我们通过强调变化和不变的代码模式来可视化代码结构的演变。我们在包含从简单到复杂的各种更改的版本化代码库上演示我们的技术。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Applying lehman's laws to game evolution Enhancement of CRD-based clone tracking Identifying clone removal opportunities based on co-evolution analysis What can commit metadata tell us about design degradation? Tracking performance failures with rizel
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1