OpenMP中的缺陷检测和纠正:基于静态分析和机器学习的解决方案

IF 3.4 3区 计算机科学 Q2 COMPUTER SCIENCE, INFORMATION SYSTEMS
Norah A. Al-Johany;Fathy E. Eassa;Sanaa A. Sharaf;Eynas H. Balkhair;Sara M. Assiri
{"title":"OpenMP中的缺陷检测和纠正:基于静态分析和机器学习的解决方案","authors":"Norah A. Al-Johany;Fathy E. Eassa;Sanaa A. Sharaf;Eynas H. Balkhair;Sara M. Assiri","doi":"10.1109/ACCESS.2025.3589175","DOIUrl":null,"url":null,"abstract":"Concurrency defects such as race conditions, deadlocks, and improper synchronization remain a critical challenge in developing reliable OpenMP-based parallel applications. Traditional static analysis tools often focus only on defect detection, offering limited or no automated correction capabilities. This paper presents a novel static analysis tool designed to detect and automatically correct concurrency-related defects in OpenMP programs. The tool performs lexical and syntactic analysis to extract OpenMP constructs, verify directive usage, and identify incorrect synchronization patterns. A rule-based correction engine is employed to repair detected defects through minimally invasive code transformations, such as inserting critical sections, correcting directive placement, and adjusting data-sharing clauses. To enhance predictive accuracy, the tool incorporates machine learning classifiers—Naive Bayes (NB), Decision Tree (DT), Random Forest (RF), and Linear Support Vector Machine (LSVM)—trained on various feature combinations, including Abstract Features (AF), Halstead Features (HF), and Semantic Features (SF). Evaluation results show that NB and LSVM achieved up to 99% accuracy with simple feature sets, while DT and RF exhibited lower performance across all combinations. The tool was validated on a curated dataset of annotated OpenMP programs, achieving a 99.15% correction rate with minimal execution overhead. These results confirm the effectiveness and practicality of the proposed solution in improving the correctness and maintainability of OpenMP applications. This work bridges the gap between static defect detection and automated correction, contributing a scalable and intelligent approach to reliable parallel software development.","PeriodicalId":13079,"journal":{"name":"IEEE Access","volume":"13 ","pages":"125499-125525"},"PeriodicalIF":3.4000,"publicationDate":"2025-07-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=11082155","citationCount":"0","resultStr":"{\"title\":\"Defect Detection and Correction in OpenMP: A Static Analysis and Machine Learning-Based Solution\",\"authors\":\"Norah A. Al-Johany;Fathy E. Eassa;Sanaa A. Sharaf;Eynas H. Balkhair;Sara M. Assiri\",\"doi\":\"10.1109/ACCESS.2025.3589175\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Concurrency defects such as race conditions, deadlocks, and improper synchronization remain a critical challenge in developing reliable OpenMP-based parallel applications. Traditional static analysis tools often focus only on defect detection, offering limited or no automated correction capabilities. This paper presents a novel static analysis tool designed to detect and automatically correct concurrency-related defects in OpenMP programs. The tool performs lexical and syntactic analysis to extract OpenMP constructs, verify directive usage, and identify incorrect synchronization patterns. A rule-based correction engine is employed to repair detected defects through minimally invasive code transformations, such as inserting critical sections, correcting directive placement, and adjusting data-sharing clauses. To enhance predictive accuracy, the tool incorporates machine learning classifiers—Naive Bayes (NB), Decision Tree (DT), Random Forest (RF), and Linear Support Vector Machine (LSVM)—trained on various feature combinations, including Abstract Features (AF), Halstead Features (HF), and Semantic Features (SF). Evaluation results show that NB and LSVM achieved up to 99% accuracy with simple feature sets, while DT and RF exhibited lower performance across all combinations. The tool was validated on a curated dataset of annotated OpenMP programs, achieving a 99.15% correction rate with minimal execution overhead. These results confirm the effectiveness and practicality of the proposed solution in improving the correctness and maintainability of OpenMP applications. This work bridges the gap between static defect detection and automated correction, contributing a scalable and intelligent approach to reliable parallel software development.\",\"PeriodicalId\":13079,\"journal\":{\"name\":\"IEEE Access\",\"volume\":\"13 \",\"pages\":\"125499-125525\"},\"PeriodicalIF\":3.4000,\"publicationDate\":\"2025-07-16\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=11082155\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"IEEE Access\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://ieeexplore.ieee.org/document/11082155/\",\"RegionNum\":3,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q2\",\"JCRName\":\"COMPUTER SCIENCE, INFORMATION SYSTEMS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Access","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11082155/","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0

摘要

并发性缺陷(如竞争条件、死锁和不适当的同步)仍然是开发可靠的基于openmp的并行应用程序的关键挑战。传统的静态分析工具通常只关注缺陷检测,提供有限或没有自动纠正功能。本文提出了一种新的静态分析工具,用于检测和自动纠正OpenMP程序中与并发相关的缺陷。该工具执行词法和语法分析,以提取OpenMP结构、验证指令使用并识别不正确的同步模式。采用基于规则的修正引擎,通过最小侵入性的代码转换来修复检测到的缺陷,例如插入关键部分、纠正指令位置和调整数据共享子句。为了提高预测准确性,该工具结合了机器学习分类器-朴素贝叶斯(NB),决策树(DT),随机森林(RF)和线性支持向量机(LSVM) -在各种特征组合上训练,包括抽象特征(AF),霍尔斯特德特征(HF)和语义特征(SF)。评估结果表明,NB和LSVM在简单特征集上的准确率高达99%,而DT和RF在所有组合上的准确率都较低。该工具在一个精心策划的带注释的OpenMP程序数据集上进行了验证,以最小的执行开销实现了99.15%的正确率。这些结果证实了该方案在提高OpenMP应用程序的正确性和可维护性方面的有效性和实用性。这项工作弥补了静态缺陷检测和自动纠正之间的差距,为可靠的并行软件开发提供了可伸缩和智能的方法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Defect Detection and Correction in OpenMP: A Static Analysis and Machine Learning-Based Solution
Concurrency defects such as race conditions, deadlocks, and improper synchronization remain a critical challenge in developing reliable OpenMP-based parallel applications. Traditional static analysis tools often focus only on defect detection, offering limited or no automated correction capabilities. This paper presents a novel static analysis tool designed to detect and automatically correct concurrency-related defects in OpenMP programs. The tool performs lexical and syntactic analysis to extract OpenMP constructs, verify directive usage, and identify incorrect synchronization patterns. A rule-based correction engine is employed to repair detected defects through minimally invasive code transformations, such as inserting critical sections, correcting directive placement, and adjusting data-sharing clauses. To enhance predictive accuracy, the tool incorporates machine learning classifiers—Naive Bayes (NB), Decision Tree (DT), Random Forest (RF), and Linear Support Vector Machine (LSVM)—trained on various feature combinations, including Abstract Features (AF), Halstead Features (HF), and Semantic Features (SF). Evaluation results show that NB and LSVM achieved up to 99% accuracy with simple feature sets, while DT and RF exhibited lower performance across all combinations. The tool was validated on a curated dataset of annotated OpenMP programs, achieving a 99.15% correction rate with minimal execution overhead. These results confirm the effectiveness and practicality of the proposed solution in improving the correctness and maintainability of OpenMP applications. This work bridges the gap between static defect detection and automated correction, contributing a scalable and intelligent approach to reliable parallel software development.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
IEEE Access
IEEE Access COMPUTER SCIENCE, INFORMATION SYSTEMSENGIN-ENGINEERING, ELECTRICAL & ELECTRONIC
CiteScore
9.80
自引率
7.70%
发文量
6673
审稿时长
6 weeks
期刊介绍: IEEE Access® is a multidisciplinary, open access (OA), applications-oriented, all-electronic archival journal that continuously presents the results of original research or development across all of IEEE''s fields of interest. IEEE Access will publish articles that are of high interest to readers, original, technically correct, and clearly presented. Supported by author publication charges (APC), its hallmarks are a rapid peer review and publication process with open access to all readers. Unlike IEEE''s traditional Transactions or Journals, reviews are "binary", in that reviewers will either Accept or Reject an article in the form it is submitted in order to achieve rapid turnaround. Especially encouraged are submissions on: Multidisciplinary topics, or applications-oriented articles and negative results that do not fit within the scope of IEEE''s traditional journals. Practical articles discussing new experiments or measurement techniques, interesting solutions to engineering. Development of new or improved fabrication or manufacturing techniques. Reviews or survey articles of new or evolving fields oriented to assist others in understanding the new area.
×
引用
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学术官方微信