Async/Await の設計空間探索
## 日本語訳:
現代のプログラミングは、イベントループやコールバックではなく `async/await` を用いた「直線的な非同期性(straight-line asynchrony)」を主に採用しています。題名『Async/Await の設計領域の探求』という新しい研究では、重要な移植性の欠陥が明らかになっています。7 つの主要なランタイムにおいて、単純な非同期プログラムに対して 4 つ異なる出力が生成され、3 つのプログラムバリエーションについては、どの 2 つのランタイムも合意していないことが判明しました。原因は、タスクの開始、終了、取消しを制御する 9 つの微妙な設計次元にあり、これらは「生命開始(Start-of-Life)」、「生命終了(End-of-Life)」、「取消し(Cancellation)」の 3 つのカテゴリーに分類されます。主要な次元には、Eagerness、Extent、Destruction、Propagation、Awareness、Direction、Persistence が含まれます。例えば、Swift と Python+Trio は双方「動的 Extent(Dynamic Extent)」を採用していますが、Swift は Cancelled Destruction を用いるのに対し、Trio は Awaited Destruction を採用しており、その結果 Swift では "AC"、Trio では "ABC" が出力されます。非同期プログラムのコアカルキュラスに対する形式的な意味論を用いて著者たちは、抽象機械状態をマッピングし、これらの相違点を精密に説明しました。この研究は、堅牢な非同期システムが、9 つの隠れた意味論的次元を慎重に評価せずに、横断的な言語間の一貫性に頼ることはできないと結論付けています。
## 原文:
## Summary:
Modern programming has largely adopted "straight-line asynchrony" using `async/await` instead of event loops or callbacks. A new study titled “A Design Space Exploration of Async/Await” reveals a critical portability flaw: seven popular runtimes produce four different outputs for simple async programs, and for three program variants, no two runtimes agree. The cause is nine subtle design dimensions governing how tasks start, end, and handle cancellation, grouped into Start-of-Life, End-of-Life, and Cancellation. Key dimensions include Eagerness, Extent, Destruction, Propagation, Awareness, Direction, and Persistence. For example, Swift and Python+Trio both use "Dynamic Extent," but Swift employs Cancelled Destruction while Trio uses Awaited Destruction, causing Swift to print "AC" and Trio to print "ABC." Using a formal semantics on a core calculus of asynchronous programs, the authors mapped abstract machine states to precisely explain these divergences. The study concludes that robust async systems cannot rely on cross-language consistency without carefully evaluating these nine hidden semantic dimensions.