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}
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 AccessCOMPUTER 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.