iconLogo
Published:2025/12/4 0:13:25

コンパイラ(機械語に変換するやつ)のテストを爆速にする方法💖 超要約:コンパイラのテストを賢くして、バグを減らすんだって!

🌟 ギャル的キラキラポイント✨ ● コンパイラ(プログラムを機械語に変えるソフト)のテストを賢くする研究だよ! ● 特定の条件に合うプログラムを自動で作って、ピンポイントでテストするんだって! ● バグが減って、速くて安全なソフトが作れるようになるって、最高じゃん?

詳細解説 ● 背景 コンパイラって、プログラムをパソコンが分かる言葉(機械語)に変換するスゴいソフト💻✨。でも、複雑すぎてバグ(プログラムのミス)が起きやすいの。バグがあると、プログラムが変な動きしたり、セキュリティが弱くなったりするから困っちゃう😥! ● 方法 既存のテスト方法だと、テストしたい機能にピッタリのプログラムを作るのが難しかったの。そこで、文法レベル(プログラムの構造)に着目👀!特定の機能に効くプログラム構造を自動生成して、ピンポイントでテストする「ターゲットファジング」って方法を提案💖! ● 結果 ターゲットファジングを使うと、コンパイラのテストが効率的になるみたい!色んなプログラム構造を試せるから、バグの見落としも減らせるかも👀💡。 ● 意義(ここがヤバい♡ポイント) テストが楽になるから、開発者さんの負担が減るし、高品質なソフトが早く作れるようになるってこと!結果、安全で使いやすいソフトが増えるから、みんなハッピー😘🎉!

リアルでの使いみちアイデア💡 ● スマホアプリ📱の開発会社が、アプリの動作を速く、安全にするためにコンパイラのテストに使う! ● IT企業の新規事業で、AIとか自動運転🚗みたいな、めっちゃ高度な技術を支えるソフトの品質を上げるために使う!

もっと深掘りしたい子へ🔍 ● コンパイラ ● ファジング ● ソフトウェアテスト

続きは「らくらく論文」アプリで

Targeted Testing of Compiler Optimizations via Grammar-Level Composition Styles

Zitong Zhou / Ben Limpanukorn / Hong Jin Kang / Jiyuan Wang / Yaoxuan Wu / Akos Kiss / Renata Hodovan / Miryung Kim

Ensuring the correctness of compiler optimizations is critical, but existing fuzzers struggle to test optimizations effectively. First, most fuzzers use optimization pipelines (heuristics-based, fixed sequences of passes) as their harness. The phase-ordering problem can enable or preempt transformations, so pipelines inevitably miss optimization interactions; moreover, many optimizations are not scheduled, even at aggressive levels. Second, optimizations typically fire only when inputs satisfy specific structural relationships, which existing generators and mutations struggle to produce. We propose targeted fuzzing of individual optimizations to complement pipeline-based testing. Our key idea is to exploit composition styles - structural relations over program constructs (adjacency, nesting, repetition, ordering) - that optimizations look for. We build a general-purpose, grammar-based mutational fuzzer, TargetFuzz, that (i) mines composition styles from an optimization-relevant corpus, then (ii) rebuilds them inside different contexts offered by a larger, generic corpus via synthesized mutations to test variations of optimization logic. TargetFuzz is adaptable to a new programming language by lightweight, grammar-based, construct annotations - and it automatically synthesizes mutators and crossovers to rebuild composition styles. No need for hand-coded generators or language-specific mutators, which is particularly useful for modular frameworks such as MLIR, whose dialect-based, rapidly evolving ecosystem makes optimizations difficult to fuzz. Our evaluation on LLVM and MLIR shows that TargetFuzz improves coverage by 8% and 11% and triggers optimizations 2.8$\times$ and 2.6$\times$, compared to baseline fuzzers under the targeted fuzzing mode. We show that targeted fuzzing is complementary: it effectively tests all 37 sampled LLVM optimizations, while pipeline-fuzzing missed 12.

cs / cs.SE