要約
コードの最適化は、意図した機能を維持しながら、コード効率を向上させるプロセスです。
このプロセスでは、非効率性を効果的に特定して対処するために、実行時にコード実行動作を深く理解する必要があることがよくあります。
最近の研究では、言語モデルがコードの最適化を自動化する上で重要な役割を果たすことができることが示されています。
ただし、これらのモデルは、実行時にコードがどのように実行されるかについての知識が不十分な場合があります。
この制限に対処するために、研究者はコード実行情報を言語モデルに統合する戦略を開発しました。
これらの戦略は、さまざまなソフトウェアエンジニアリングタスクにおける言語モデルの有効性を高める可能性を示しています。
ただし、コード実行の動作と効率性との密接な関係にもかかわらず、これらの戦略がコードの最適化に及ぼす特定の影響は、ほとんど説明されていません。
この調査では、コード実行情報を言語モデルに組み込むことがコードを最適化する能力にどのように影響するかを調査します。
具体的には、3つの異なるトレーニング戦略を適用して、4つのコード実行の側面(ライン実行、ラインカバレッジ、ブランチカバレッジ、および可変状態)をCodet5+に組み込み、コードのよく知られた言語モデルです。
我々の結果は、実行認識モデルがコードの最適化における標準のCodet5+モデルと比較して、限られた利点を提供することを示しています。
要約(オリジナル)
Code optimization is the process of enhancing code efficiency, while preserving its intended functionality. This process often requires a deep understanding of the code execution behavior at run-time to identify and address inefficiencies effectively. Recent studies have shown that language models can play a significant role in automating code optimization. However, these models may have insufficient knowledge of how code execute at run-time. To address this limitation, researchers have developed strategies that integrate code execution information into language models. These strategies have shown promise, enhancing the effectiveness of language models in various software engineering tasks. However, despite the close relationship between code execution behavior and efficiency, the specific impact of these strategies on code optimization remains largely unexplored. This study investigates how incorporating code execution information into language models affects their ability to optimize code. Specifically, we apply three different training strategies to incorporate four code execution aspects — line executions, line coverage, branch coverage, and variable states — into CodeT5+, a well-known language model for code. Our results indicate that execution-aware models provide limited benefits compared to the standard CodeT5+ model in optimizing code.
arxiv情報
著者 | Federico Di Menna,Luca Traini,Gabriele Bavota,Vittorio Cortellessa |
発行日 | 2025-03-11 09:46:07+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google