生成式AI工具能否确保绿色代码?一项调查研究
Do Generative AI Tools Ensure Green Code? An Investigative Study
AI总结:
针对ChatGPT、BARD和Copilot三款生成式AI工具,研究调查其生成代码对可持续编码实践的遵循情况,发现其默认存在非绿色行为,凸显深入研究与修复的必要性。
摘要:
软件可持续性正成为一个首要关注点,其目标是优化资源利用、最小化环境影响,并推动更绿色、更具韧性的数字生态系统。软件的可持续性或“绿色程度”通常取决于可持续编码实践的采用情况。随着围绕生成式AI的生态系统日趋成熟,许多软件开发人员如今依赖这些工具通过自然语言提示生成代码。尽管这些工具具有潜在优势,但关于AI生成代码在可持续性方面的研究仍严重不足。具体而言,基于其对可持续编码实践的采用情况,AI生成代码究竟有多环保?在本文中,我们展示了对AI生成代码可持续性方面进行早期调查的结果,调查涵盖三款流行的生成式AI工具——ChatGPT、BARD和Copilot。结果凸显了这些工具在多条规则和多种场景下生成代码时默认的非绿色行为。这强调了进一步深入调查以及有效修复策略的必要性。
英文摘要:
Software sustainability is emerging as a primary concern, aiming to optimize resource utilization, minimize environmental impact, and promote a greener, more resilient digital ecosystem. The sustainability or "greenness" of software is typically determined by the adoption of sustainable coding practices. With a maturing ecosystem around generative AI, many software developers now rely on these tools to generate code using natural language prompts. Despite their potential advantages, there is a significant lack of studies on the sustainability aspects of AI-generated code. Specifically, how environmentally friendly is the AI-generated code based upon its adoption of sustainable coding practices? In this paper, we present the results of an early investigation into the sustainability aspects of AI-generated code across three popular generative AI tools - ChatGPT, BARD, and Copilot. The results highlight the default non-green behavior of tools for generating code, across multiple rules and scenarios. It underscores the need for further in-depth investigations and effective remediation strategies.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。