Key updates: - Document MIR 26→15 instruction reduction plan (transitioning status) - Add Core-15 target instruction set in INSTRUCTION_SET.md - Save AI conference analyses validating Box Theory and 15-instruction design - Create MIR annotation system proposal for optimization hints - Update SKIP_PHASE_10_DECISION.md with LLVM direct migration rationale Technical insights: - RefNew/RefGet/RefSet can be eliminated through Box unification - GC/sync/async all achievable with 15 core instructions - BoxCall lowering can automatically insert GC barriers - 2-3x performance improvement expected with LLVM - Build time reduction 50%, binary size reduction 40% Status: Design complete, implementation pending
Paper 10: Everything is Box × MIR15:1ヶ月で言語フルチェーンを通す設計原理
Status: Planning
Target: Top-tier PL Conference (PLDI/POPL/ICFP)
Lead Author: Nyash Team
📋 論文概要
タイトル
Everything is Box × MIR15: Design Principles for Building a Full Language Chain in One Month
中心的主張
- 箱理論(Everything is Box)+ 15命令MIRが、VM/JIT/AOT/GC/非同期を等価に貫通
- 設計の純度と最小命令集合により、1ヶ月での完全言語実装を実現
- trace_hashによる等価性検証で、全実行形態の意味論的一致を証明
主要貢献
- 理論的貢献:15命令で全計算パラダイムを表現可能であることの証明
- 実装的貢献:5つの実行形態(Interpreter/VM/JIT/AOT/WASM)の完全実装
- 検証手法:trace_hashによる実行等価性の自動検証システム
📊 実証データ計画
等価性検証(最重要)
実行形態マトリクス:
- VM × {GC on, GC off}
- JIT × {GC on, GC off}
- AOT × {GC on, GC off}
全6パターンでI/Oトレース完全一致を実証
性能ベンチマーク
相対性能比較:
- Interpreter: 1.0x (baseline)
- VM: 2.1x
- JIT: 13.5x
- AOT: 15.2x (予測値)
開発速度分析
従来言語との比較:
- Go: 3年(2007-2009)
- Rust: 4年(2010-2014)
- Nyash: 20日(2025年8月)
🔬 先行研究との比較
言語設計哲学
- Smalltalk: Everything is an Object → Nyash: Everything is a Box(より純粋)
- Lisp: S式の統一性 → Nyash: Box+15命令の統一性(より実装容易)
中間表現
- LLVM IR: ~60命令 → Nyash MIR: 15命令(75%削減)
- WebAssembly: ~170命令 → Nyash MIR: 15命令(91%削減)
- JVM Bytecode: ~200命令 → Nyash MIR: 15命令(92.5%削減)
実行戦略
- V8/SpiderMonkey: 複雑な多段階JIT → Nyash: シンプルなAOT中心
- Go: 独自コンパイラ → Nyash: LLVM活用で高速化
📝 論文構成(予定)
1. Introduction(2ページ)
- 問題提起:なぜ言語実装に年単位かかるのか?
- 解決策:Box理論×最小MIRによる複雑性削減
- 貢献の要約
2. Box Theory and Design Philosophy(3ページ)
- Everything is Box哲学の詳細
- 複雑さの局所化戦略
- 型システムとの統合
3. MIR15: Minimal Instruction Set(4ページ)
- 15命令の詳細定義
- なぜ15で十分か(理論的証明)
- 他の命令セットとの比較
4. Implementation(3ページ)
- 20日間の開発タイムライン
- 5つの実行形態の実装詳細
- AI協調開発の役割
5. Evaluation(4ページ)
- trace_hash等価性検証
- 性能ベンチマーク
- 開発効率の定量分析
6. Discussion(2ページ)
- なぜ1ヶ月で可能だったか
- 限界と今後の課題
- 他言語への適用可能性
7. Related Work(2ページ)
- 言語設計の歴史
- 最小命令セットの研究
- 高速言語実装の試み
8. Conclusion(1ページ)
🎯 執筆スケジュール
- Week 1: 実証データ収集(trace_hash検証)
- Week 2: Introduction + Box Theory執筆
- Week 3: MIR15 + Implementation執筆
- Week 4: Evaluation + 残り執筆
- Week 5: 推敲・図表整備
📚 参考文献(予定)
- Smalltalk-80: The Language and its Implementation
- Structure and Interpretation of Computer Programs (SICP)
- The LLVM Compiler Infrastructure
- WebAssembly Specification
- Go Programming Language Specification