次回の更新記事:【論文著者監修・コメント】AIエージェントへの人間…(公開予定日:2026年07月27日)
AIDB Daily Papers

LM2Alloy:大規模言語モデルを活用した形式仕様生成と本番ソフトウェア向け自動テスト導出の研究

原題: LM2Alloy: Investigating LLM-Generated Formal Specifications for Automated Test Derivation in Production Software
著者: Tasmim Rashid, Muhammad Zubair Malik
公開日: 2026-07-20 | 分野: LLM AI テスト ソフトウェアエンジニアリング cs.SE

※ 日本語タイトル・ポイントはAIによる自動生成です。正確な内容は原論文をご確認ください。

ポイント

  • 大規模言語モデルを用いて要件文書やソースコードからAlloy形式仕様を生成し実行可能なテストケースを導出する手法を調査した。
  • 形式的な中間表現を導入することでカバレッジ指向の生成では見落とされがちな制約レベルの欠陥を発見できることが新規性である。
  • 既存のテストスイートが見逃していた実際のバグを発見しコードベースの仕様生成が文書ベースよりもテスト生成の分散を抑えられた。

Abstract

We present an exploratory study on using Large Language Models (LLMs) to generate Alloy formal specifications from both requirements documentation and production source code, and to derive executable test cases from those specifications. We evaluate on two real open-source Python libraries: Flipper, a feature flag management system, and Cerberus, a data validation library. In both cases, the LLM produced workable Alloy specifications and executable tests without any manual correction. For Flipper, our pipeline uncovered a genuine bug that the existing test suite had missed: the library silently accepts duplicate flag names, directly contradicting its documented uniqueness requirement. A direct LLM baseline--generating tests from the same README but skipping the Alloy step--achieved 68% branch coverage yet failed to catch this bug across all three independent runs. This suggests that introducing a formal intermediate representation can surface constraint-level defects that coverage-oriented generation may miss. For Cerberus, the code-derived specification captured an implicit abstraction over sized types that the documentation-derived spec omitted, producing two additional tests. Across both libraries, code-based specifications showed lower variance in test generation (mean SD = 2.15) than documentation-based ones (mean SD = 5.0), though whether this generalises remains an open question. Index Terms--formal specifications, Alloy, large language models, automated testing, specification drift, software validation.

Paper AI Chat

この論文のPDF全文を対象にAIに質問できます。

質問の例:

AIチャット機能を利用するには、ログインまたは会員登録(無料)が必要です。

会員登録 / ログイン

関連するAIDB記事