From 3a095c0a43842aa399aaca9a0fda671bf7b8fb5a Mon Sep 17 00:00:00 2001 From: opaopa6969 Date: Sat, 1 Aug 2026 22:20:50 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20backend-coverage-matrix=20=E3=81=AB=20J?= =?UTF-8?q?AVA=5FCODE=5FLEGACY=5FASTCREATOR=20=E3=82=92=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=20(5=E2=86=926=20backends)=20(#60)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SPEC.md 1.3 は6バックエンドを記載するが、docs/backend-coverage-matrix.md は 5バックエンド表記で JAVA_CODE_LEGACY_ASTCREATOR が欠落していた。 - 冒頭見出し "5 Execution Backends" → "6 Execution Backends" - バックエンド一覧表に compile-legacy-astcreator 行を追加 (実装クラス: LegacyAstCreatorJavaCodeCalculator, 凍結・リグレッション比較用) - Feature Coverage 表に compile-legacy-astcreator 列を追加 (JavaCodeCalculatorV3 継承・tokenReduer() override のみなので compile-hand と同一 coverage) - docs/INDEX.md の "5 backends" 表記2箇所を "6 backends" に更新 Closes #60 --- docs/INDEX.md | 4 +-- docs/backend-coverage-matrix.md | 53 +++++++++++++++++---------------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/docs/INDEX.md b/docs/INDEX.md index 88dfc1d6..6c89515a 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -25,14 +25,14 @@ | # | Document | Description | |---|----------|-------------| -| 1 | [Implementation Guide](./implementation-guide-dialogue.en.md) | Learn the 5 backends through dialogue between Senior and Newcomer | +| 1 | [Implementation Guide](./implementation-guide-dialogue.en.md) | Learn the 6 backends through dialogue between Senior and Newcomer | | 2 | [Parser Generator Comparison & @eval Strategy](./parser-generator-comparison-and-eval-strategy.en.md) | unlaxer vs ANTLR/PEG.js/Tree-sitter comparison and @eval annotation design | ## Analysis | Document | Description | |----------|-------------| -| [backend-coverage-matrix.md](./backend-coverage-matrix.md) | Backend coverage matrix for the 5 execution backends | +| [backend-coverage-matrix.md](./backend-coverage-matrix.md) | Backend coverage matrix for the 6 execution backends | | [feature-parity-diff.md](./feature-parity-diff.md) | Feature parity diff between hand-written path and UBNF (P4) path | ## Other Documentation diff --git a/docs/backend-coverage-matrix.md b/docs/backend-coverage-matrix.md index c0ddfdd1..ffb20597 100644 --- a/docs/backend-coverage-matrix.md +++ b/docs/backend-coverage-matrix.md @@ -1,10 +1,11 @@ # Backend Coverage Matrix -## 5 Execution Backends +## 6 Execution Backends | Backend | 実装クラス | 主要用途 | |---------|-----------|---------| | compile-hand | JavaCodeCalculatorV3 | 本番 (10^9 tx/month) | +| compile-legacy-astcreator | LegacyAstCreatorJavaCodeCalculator | 凍結(リグレッション比較用)。JavaCodeCalculatorV3 を継承し tokenReduer() のみ override | | P4-typed | P4TypedAstEvaluator | DAP, LSP (sealed switch) | | P4-reflection | GeneratedP4ValueAstEvaluator | レガシー (reflection) | | ast-hand | AstNumberExpressionEvaluator | リテラル演算のみ | @@ -12,30 +13,32 @@ ## Feature Coverage -| 機能 | compile-hand | P4-typed | P4-reflection | ast-hand | compile-dsl | -|------|:-----------:|:--------:|:-------------:|:--------:|:-----------:| -| 四則演算 (+,-,*,/) | ✅ | ✅ | ✅ | ✅ | ✅ | -| 変数参照 ($var) | ✅ | ✅ | ✅ | ❌ | ✅ | -| 比較演算 (==,<,>) | ✅ | ✅ | ✅ | ❌ | ✅ | -| Boolean演算 (&,\|,^) | ✅ | ✅ | ✅ | ❌ | ✅ | -| if/else | ✅ | ✅ | ✅ | ❌ | ✅ | -| ternary (cond?a:b) | ✅ | ✅ | ✅ | ❌ | ✅ | -| match/case | ✅ | ✅ | ✅ | ❌ | ✅ | -| Math 14関数 | ✅ | ✅ | ❌ | ❌ | ❌ | -| min/max 可変引数 | ✅ | ✅ | ❌ | ❌ | ❌ | -| Not演算子 | ✅ | ✅ | ❌ | ❌ | ❌ | -| toNum() | ✅ | ✅ | ❌ | ❌ | ❌ | -| String methods (関数形式) | ✅ | ✅ | ❌ | ❌ | ❌ | -| String methods (ドット形式) | ✅ | ✅ | ❌ | ❌ | ❌ | -| String predicates | ✅ | ✅ | ❌ | ❌ | ❌ | -| isPresent() | ✅ | ✅ | ❌ | ❌ | ❌ | -| **MethodInvocation (call)** | ✅ | ✅ | ✅ | ❌ | ✅ | -| **External呼び出し** | ✅ | ✅ | ✅ | ❌ | ✅ | -| **Side effect** | ✅ | ✅ | **❌** | ❌ | ✅ | -| 変数宣言 (var) | ✅ | 部分的 | ✅ | ❌ | ✅ | -| String連結 (+) | ✅ | ✅ | ❌ | ❌ | ✅ | -| String slice ($s[0:3]) | ✅ | ❌ | ❌ | ❌ | ❌ | -| inTimeRange/inDayTimeRange | ✅ | ✅ | ❌ | ❌ | ✅ | +| 機能 | compile-hand | compile-legacy-astcreator | P4-typed | P4-reflection | ast-hand | compile-dsl | +|------|:-----------:|:------------------------:|:--------:|:-------------:|:--------:|:-----------:| +| 四則演算 (+,-,*,/) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| 変数参照 ($var) | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | +| 比較演算 (==,<,>) | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | +| Boolean演算 (&,\|,^) | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | +| if/else | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | +| ternary (cond?a:b) | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | +| match/case | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | +| Math 14関数 | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| min/max 可変引数 | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| Not演算子 | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| toNum() | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| String methods (関数形式) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| String methods (ドット形式) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| String predicates | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| isPresent() | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| **MethodInvocation (call)** | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | +| **External呼び出し** | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | +| **Side effect** | ✅ | ✅ | ✅ | **❌** | ❌ | ✅ | +| 変数宣言 (var) | ✅ | ✅ | 部分的 | ✅ | ❌ | ✅ | +| String連結 (+) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| String slice ($s[0:3]) | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | +| inTimeRange/inDayTimeRange | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | + +> **注**: `compile-legacy-astcreator` は `JavaCodeCalculatorV3` を継承し `tokenReduer()` のみを override する(`LegacyAstCreatorJavaCodeCalculator:15-33`)。Java コード生成能力は `compile-hand` と等価のため、Feature Coverage は `compile-hand` と同一。SPEC.md 1.3 に準拠(ステータス: 凍結・リグレッション比較用)。 ## Fallback Chain