Harnessing the Power of LLMs: Automating Unit Test Generation for High-Performance Computing

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Karanjai, Rabimba, Hussain, Aftab, Rabin, Md Rafiqul Islam, Xu, Lei, Shi, Weidong, Alipour, Mohammad Amin
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916315412824064
author Karanjai, Rabimba
Hussain, Aftab
Rabin, Md Rafiqul Islam
Xu, Lei
Shi, Weidong
Alipour, Mohammad Amin
author_facet Karanjai, Rabimba
Hussain, Aftab
Rabin, Md Rafiqul Islam
Xu, Lei
Shi, Weidong
Alipour, Mohammad Amin
contents Unit testing is crucial in software engineering for ensuring quality. However, it's not widely used in parallel and high-performance computing software, particularly scientific applications, due to their smaller, diverse user base and complex logic. These factors make unit testing challenging and expensive, as it requires specialized knowledge and existing automated tools are often ineffective. To address this, we propose an automated method for generating unit tests for such software, considering their unique features like complex logic and parallel processing. Recently, large language models (LLMs) have shown promise in coding and testing. We explored the capabilities of Davinci (text-davinci-002) and ChatGPT (gpt-3.5-turbo) in creating unit tests for C++ parallel programs. Our results show that LLMs can generate mostly correct and comprehensive unit tests, although they have some limitations, such as repetitive assertions and blank test cases.
format Preprint
id arxiv_https___arxiv_org_abs_2407_05202
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Harnessing the Power of LLMs: Automating Unit Test Generation for High-Performance Computing
Karanjai, Rabimba
Hussain, Aftab
Rabin, Md Rafiqul Islam
Xu, Lei
Shi, Weidong
Alipour, Mohammad Amin
Software Engineering
Artificial Intelligence
Unit testing is crucial in software engineering for ensuring quality. However, it's not widely used in parallel and high-performance computing software, particularly scientific applications, due to their smaller, diverse user base and complex logic. These factors make unit testing challenging and expensive, as it requires specialized knowledge and existing automated tools are often ineffective. To address this, we propose an automated method for generating unit tests for such software, considering their unique features like complex logic and parallel processing. Recently, large language models (LLMs) have shown promise in coding and testing. We explored the capabilities of Davinci (text-davinci-002) and ChatGPT (gpt-3.5-turbo) in creating unit tests for C++ parallel programs. Our results show that LLMs can generate mostly correct and comprehensive unit tests, although they have some limitations, such as repetitive assertions and blank test cases.
title Harnessing the Power of LLMs: Automating Unit Test Generation for High-Performance Computing
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2407.05202