高性能计算应用中平台特定代码气味的识别和消除

Chunyan Wang, S. Hirasawa, H. Takizawa, Hiroaki Kobayashi
{"title":"高性能计算应用中平台特定代码气味的识别和消除","authors":"Chunyan Wang, S. Hirasawa, H. Takizawa, Hiroaki Kobayashi","doi":"10.15803/IJNC.5.1_180","DOIUrl":null,"url":null,"abstract":"A code smell is a code pattern that might indicate a code or design problem, which makes the application code hard to evolve and maintain. Automatic detection of code smells has been studied to help users find which parts of their application codes should be refactored. However, code smells have not been defined in a formal manner. Moreover, existing detection tools are designed mainly for object-oriented applications, but rarely provided for high performance computing (HPC) applications. HPC applications are usually optimized for a particular platform to achieve a high performance, and hence have special code smells called platform-specific code smells (PSCSs). The purpose of this work is to develop a code smell alert system to help users find PSCSs of HPC applications to improve the performance portability across different platforms. This paper presents a PSCS alert system that is based on an abstract syntax tree (AST) and XML. Code patterns of PSCSs are defined in a formal way using the AST information represented in XML. XML Path Language (XPath) is used to describe those patterns. A database is built to store the transformation recipes written in XSLT files for eliminating detected PSCSs. The recall and precision evaluation results obtained by using real applications show that the proposed system can detect potential PSCSs accurately. The evaluation on performance portability of real applications demonstrates that eliminating PSCSs leads to significant performance  changes and therefore the code portions with detected PSCSs have to be refactored to improve the performance portability across multiple platforms.Â","PeriodicalId":270166,"journal":{"name":"Int. J. Netw. Comput.","volume":"2 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2015-01-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":"{\"title\":\"Identification and Elimination of Platform-Specific Code Smells in High Performance Computing Applications\",\"authors\":\"Chunyan Wang, S. Hirasawa, H. Takizawa, Hiroaki Kobayashi\",\"doi\":\"10.15803/IJNC.5.1_180\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"A code smell is a code pattern that might indicate a code or design problem, which makes the application code hard to evolve and maintain. Automatic detection of code smells has been studied to help users find which parts of their application codes should be refactored. However, code smells have not been defined in a formal manner. Moreover, existing detection tools are designed mainly for object-oriented applications, but rarely provided for high performance computing (HPC) applications. HPC applications are usually optimized for a particular platform to achieve a high performance, and hence have special code smells called platform-specific code smells (PSCSs). The purpose of this work is to develop a code smell alert system to help users find PSCSs of HPC applications to improve the performance portability across different platforms. This paper presents a PSCS alert system that is based on an abstract syntax tree (AST) and XML. Code patterns of PSCSs are defined in a formal way using the AST information represented in XML. XML Path Language (XPath) is used to describe those patterns. A database is built to store the transformation recipes written in XSLT files for eliminating detected PSCSs. The recall and precision evaluation results obtained by using real applications show that the proposed system can detect potential PSCSs accurately. The evaluation on performance portability of real applications demonstrates that eliminating PSCSs leads to significant performance  changes and therefore the code portions with detected PSCSs have to be refactored to improve the performance portability across multiple platforms.Â\",\"PeriodicalId\":270166,\"journal\":{\"name\":\"Int. J. Netw. Comput.\",\"volume\":\"2 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2015-01-10\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"9\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Int. J. Netw. Comput.\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.15803/IJNC.5.1_180\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Int. J. Netw. Comput.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.15803/IJNC.5.1_180","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9

摘要

代码气味是一种代码模式,它可能指示代码或设计问题,这使得应用程序代码难以发展和维护。已经研究了代码气味的自动检测,以帮助用户发现应该重构应用程序代码的哪些部分。但是,代码气味还没有以正式的方式定义。此外,现有的检测工具主要是为面向对象的应用设计的,很少为高性能计算应用提供检测工具。HPC应用程序通常针对特定平台进行优化,以实现高性能,因此具有特殊的代码气味,称为特定于平台的代码气味(pscs)。本工作的目的是开发一个代码气味警报系统,帮助用户发现HPC应用程序的pscs,以提高不同平台的性能可移植性。提出了一种基于抽象语法树(AST)和XML的PSCS报警系统。pscs的代码模式使用XML表示的AST信息以正式的方式定义。XML路径语言(XPath)用于描述这些模式。构建一个数据库来存储用XSLT文件编写的转换食谱,以消除检测到的pscs。实际应用的查全率和查准率评价结果表明,该系统能够准确地检测出潜在的pscs。对实际应用程序的性能可移植性的评估表明,消除pscs会导致显著的performanceÂ变化,因此必须重构具有检测到的pscs的代码部分,以提高跨多个platforms.Â的性能可移植性
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Identification and Elimination of Platform-Specific Code Smells in High Performance Computing Applications
A code smell is a code pattern that might indicate a code or design problem, which makes the application code hard to evolve and maintain. Automatic detection of code smells has been studied to help users find which parts of their application codes should be refactored. However, code smells have not been defined in a formal manner. Moreover, existing detection tools are designed mainly for object-oriented applications, but rarely provided for high performance computing (HPC) applications. HPC applications are usually optimized for a particular platform to achieve a high performance, and hence have special code smells called platform-specific code smells (PSCSs). The purpose of this work is to develop a code smell alert system to help users find PSCSs of HPC applications to improve the performance portability across different platforms. This paper presents a PSCS alert system that is based on an abstract syntax tree (AST) and XML. Code patterns of PSCSs are defined in a formal way using the AST information represented in XML. XML Path Language (XPath) is used to describe those patterns. A database is built to store the transformation recipes written in XSLT files for eliminating detected PSCSs. The recall and precision evaluation results obtained by using real applications show that the proposed system can detect potential PSCSs accurately. The evaluation on performance portability of real applications demonstrates that eliminating PSCSs leads to significant performance  changes and therefore the code portions with detected PSCSs have to be refactored to improve the performance portability across multiple platforms.Â
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术文献互助群
群 号:604180095
Book学术官方微信