# 動態計算路由 v0.2
## 多域、多範式與異質轉移律的 Runtime 組合、授權與全域提交

**Dynamic Computational Routing: Runtime Composition, Authority, and Global Commit Across Domains, Computational Forms, and Transition Laws**

- 系列：Global Computation Methodology Series
- 文件編號：Paper-03
- 版本：v0.2
- 日期：2026-08-24
- 作者：Neo.K
- 協作：Aletheia / GPT
- 狀態：第二輪正式核心論文
- Canonical anchors：Series-00 v0.2、Paper-01 v0.2、Paper-02 v0.2
- 外部接口：時空可達性、可供性與控制權系列 v0.1
- 編碼：UTF-8 Markdown
- 數學 delimiter：僅使用 ` $...$ ` 與 `$$...$$`

---

## 摘要

當 24／72 從靜態分類表升級為 versioned、addressable、extensible computational configuration basis 後，Global Computation Methodology（GCM）的下一個問題不再是「有哪些計算形態」，而是：一個 Runtime 憑什麼把某個 operation 路由到某個 configuration、executor、representation bridge 與 resource，並在異質 local execution 後形成合法的 global commit？

本文將第一輪的 Dynamic Computational Routing（DCR）升級為一套 **World-relative route contract**。本文不把 routing 簡化成 scheduling，也不把 routing 簡化成 optimization。對 operation request $\boldsymbol\omega$ 與 candidate route $\boldsymbol\zeta$，本文區分：addressability、reachability、admissibility、authority、executability、reconciliation 與 committability。這些 predicate 彼此不可偷換：

$$
\boxed{
\text{Addressable}
\neq
\text{Reachable}
\neq
\text{Admissible}
\neq
\text{Authorized}
\neq
\text{Executable}
\neq
\text{Committable}.
}
$$

更重要地：

$$
\boxed{
\text{Can Execute}
\neq
\text{May Execute}.
}
$$

本文定義 pre-execution gate：

$$
\mathsf{PreExecOK}_{\nu}^{(v)}
(A,\boldsymbol\omega,\boldsymbol\zeta)
$$

只有當 configuration 可被 registry 解析、所需 executor／resource／bridge 在目前 Runtime state 中可達、route 符合 Foundation 與 World constraints、caller 在指定 scope 具有 authority、bridge 與 executor contracts 可滿足時，route 才進入 executable set。任何 latency、cost、energy、fidelity 或 learned score 的 optimization，都只能在此集合中進行：

$$
\boxed{
\text{Admissibility / Authority / Contract Gates First}
\rightarrow
\text{Optimization Second}.
}
$$

Local executor 仍只產生 proposal $\delta_i$，而不是直接修改 canonical World state。不同 domain 的 proposals 經 Paper-01 定義的 reconciliation、verification 與 commit gate 後，才可能形成 $W_{\nu+1}$：

$$
\boxed{
\text{Route}
\rightarrow
\text{Execute}
\rightarrow
\text{Propose}
\rightarrow
\text{Reconcile}
\rightarrow
\text{Verify}
\rightarrow
\text{Commit / Reject / Rollback}.
}
$$

本文亦建立 typed executor contract、typed representation bridge、authority profile、route disposition、configuration-switching contract、resource-aware reachability 與 route receipt。Reachability 被明確視為動態且可非單調：新增 accelerator 可能擴張 reachable set，device failure、resource exhaustion、revoked capability、network partition 或 policy change 亦可能使其縮小。因此：

$$
\boxed{
\nu_2>\nu_1
\not\Rightarrow
\mathfrak A_{\mathrm{run},\nu_1}
\subseteq
\mathfrak A_{\mathrm{run},\nu_2}.
}
$$

本文對既有 heterogeneous task runtime、dataflow scheduling、Ptolemy heterogeneous Models of Computation、Legion privilege/coherence、FMI Scheduled Execution、MLIR legality/type conversion、reachability analysis、assume--guarantee contracts 與 capability-based authority 做公平區分。本文不宣稱這些概念由 GCM 首創；GCM 的研究主張是將它們提升為同一個 World-boundary-relative composition methodology 中的不同 typed obligations，並將「route 被選中」與「World 可以 commit」嚴格分離。

---

## 關鍵詞

dynamic computational routing；heterogeneous runtime；computational configuration；reachability；admissibility；authority；least authority；executor contract；representation bridge；reconciliation；commit；rollback；resource-aware routing；Global Computation Methodology

---

# 1. 問題設定：有地址之後，還不能直接執行

Paper-02 已建立：

$$
\Gamma_\nu:
\mathcal D_\nu
\rightarrow
\mathfrak G^{(v)},
$$

使每個 domain 可以綁定 versioned full Runtime configuration。

但：

$$
\Gamma_\nu(D_i)=\gamma_i
$$

只代表 Runtime 知道某個 configuration 的 typed address 與 record。

它沒有推出：

1. executor 現在存在；
2. executor 現在可被呼叫；
3. input representation 可以合法轉換；
4. required resource 現在可用；
5. route 不違反 World constraints；
6. caller 有權執行；
7. local result 可以和其他 domain 組合；
8. candidate 可以通過 global verification；
9. candidate 可以 commit 成 canonical World state。

因此：

$$
\boxed{
\text{Configuration Candidate}
\not\Rightarrow
\text{Admissible Route}.
}
$$

以及：

$$
\boxed{
\text{Addressable}
\not\Rightarrow
\text{Executable}.
}
$$

Paper-03 的任務，就是建立兩者之間缺失的 Runtime semantics。

---

# 2. 本文不主張什麼

本文不主張：

1. heterogeneous scheduling 是新問題；
2. task graph、dataflow runtime、CPU/GPU accelerator orchestration 是 GCM 首創；
3. hierarchical heterogeneous Models of Computation 是 GCM 首創；
4. capability／privilege／authorization 是 GCM 首創；
5. assume--guarantee contract 或 compositional verification 是 GCM 首創；
6. transaction validation、commit、rollback 是 GCM 首創；
7. representation conversion、type legality 或 materialization 是 GCM 首創；
8. reachability analysis 是 GCM 首創；
9. external scheduling、clocked model partitions 或 multi-rate execution 是 GCM 首創；
10. AI Router 必然優於 deterministic scheduler；
11. routing 必須使用 optimization；
12. globality 要求 global barrier 或 single global clock；
13. route selection 有權修改 Foundation；
14. local executor success 自動等於 global success。

本文研究的是更上層的共同契約：

$$
\boxed{
\text{How a Heterogeneous Runtime May Legally Route,
Execute, Reconcile, and Commit
Within a Specified World Boundary}.
}
$$

---

# 3. 既有研究與 GCM 的位置

## 3.1 Heterogeneous task runtime 已相當成熟

StarPU 已將 heterogeneous scheduling、task dependencies、data transfer 與 asynchronous execution 整合進 CPU/GPU 等異質架構的 Runtime。[1] 2026 年 Boné 等人的 task-based data-flow methodology 進一步展示同一應用中協調 SYCL、Triton、OpenMP offload 與 vendor libraries 的實際方法。[2]

De Matteis 等人也研究 dataflow architecture 上的 streaming task graph scheduling。[3]

因此：

$$
\boxed{
\text{Heterogeneous Resource Scheduling}
\text{ is prior art}.
}
$$

GCM 不以「可以把 task 派到不同 accelerator」作為新主張。

---

## 3.2 Heterogeneous Models of Computation 也不是新事物

Ptolemy II 長期允許 hierarchy 中不同層級使用不同 director／Model of Computation，並研究不同 domain 的 heterogeneous composition。[4,5]

因此：

$$
\boxed{
\text{Different Local Semantics Can Coexist}
\text{ is prior art}.
}
$$

GCM 的 route contract 必須在此基礎上再處理 World boundary、authority、configuration address、resource reachability、representation bridge、global verification 與 history lineage。

---

## 3.3 Privilege 與 coherence 已存在成熟 Runtime 模型

Legion 的 logical-region programming model 將 region privilege 與 coherence 放進 task launch requirements，並限制 child task 所要求的 privilege 必須是 parent authority 的子集。[6,7]

這是重要 prior art，因為它直接表明：

$$
\boxed{
\text{Task Can Run}
\neq
\text{Task May Access Arbitrary State}.
}
$$

GCM 的 authority model 更一般化到 Observe、Compute、Materialize、ModifyState、Commit、ModifyRule、ModifyFoundation，但不宣稱 least privilege 或 privilege inheritance 是本文首創。

---

## 3.4 External scheduler 與 clocks 已有標準化接口

FMI 3.0.2 的 Scheduled Execution 允許 importer／external scheduler 啟動 model partitions，並以 Clocks、priority 與 activation time 管理執行。[8]

因此 Paper-03 不把「外部 Runtime 可以驅動多個 partition」當作新發明。完整 clock／time semantics 將由 Paper-04 處理。

---

## 3.5 Conversion legality 與 rollback 已有成熟工程先例

MLIR Dialect Conversion 具備 conversion target、legal／dynamic／illegal operation、TypeConverter、materialization，以及 conversion rollback 等機制。[9]

GCM representation bridge 不等於 MLIR lowering，但其工程教訓很重要：

> 表示轉換不能只看「能不能轉」，還要問 target legality、type contract、materialization 與 failure semantics。

---

## 3.6 Reachability、contract composition 與 authority 皆有既有理論

控制理論中的 reachability analysis 研究從初始集合在 admissible inputs 下可到達的狀態集合。[10] Assume--guarantee contracts 長期用於 compositional verification；近期研究仍在利用 subsystem contracts 降低 interconnected-system verification 複雜度。[11]

Capability-based security 與 Principle of Least Authority 亦早已研究「某 component 應只取得完成任務所需的最小 authority」。[12]

GCM 借用這些成熟思想，但重新放進 Runtime route contract：

$$
\boxed{
\text{Reachability},
\text{Admissibility},
\text{Authority},
\text{Execution},
\text{Commit}
}
$$

是不同 predicate，不能以單一 score 取代。

---

# 4. Canonical 前置分層

Paper-03 完全承接 Series-00 與 Paper-01：

$$
\mathbf W
=
\text{World primitive},
$$

$$
W_\nu
=
\text{canonical executable World state},
$$

$$
\Xi_\nu
=
\text{Runtime control state},
$$

$$
O_\nu
=
\text{Observer state},
$$

$$
\mathcal F^{(v)}
=
\text{Foundation version}.
$$

因此：

$$
\boxed{
\mathcal M_G
\neq
\mathbf W.
}
$$

Paper-03 的 Router 屬於：

$$
\Xi_\nu,
$$

不是：

$$
\mathbf W.
$$

Router 可以改變：

- route plan；
- resource binding；
- scheduler state；
- candidate configuration；
- bridge selection；
- cache；
- queue；
- retry policy。

但普通 routing decision 不得因此自動修改：

$$
\mathcal F^{(v)}.
$$

---

# 5. Operation request 必須先 typed

定義 operation request：

$$
\boxed{
\boldsymbol\omega
=
\left\langle
\mathsf{id},
\mathsf{type},
\mathsf{target},
\mathsf{scope},
\mathsf{input},
\mathsf{desiredEffect},
\mathsf{post},
\mathsf{requester}
\right\rangle.
}
$$

其中：

$$
\mathsf{type}
\in
\{
\mathsf{Observe},
\mathsf{Compute},
\mathsf{Materialize},
\mathsf{ModifyState},
\mathsf{Commit},
\mathsf{ModifyRule},
\mathsf{ModifyFoundation}
\}.
$$

這一步不能省略。

如果 operation 沒有型別，Runtime 就無法可靠判定：

- authority；
- effect boundary；
- invariant obligations；
- commit permission；
- history class；
- rollback requirement。

因此：

$$
\boxed{
\text{Untyped Request}
\not\Rightarrow
\text{Executable Route}.
}
$$

---

# 6. Domain resolution

對 operation $\boldsymbol\omega$，先建立 domain resolution：

$$
\boxed{
\mathsf{ResolveDomain}_{\nu}
(\boldsymbol\omega,W_\nu)
\rightarrow
\mathcal D_{\boldsymbol\omega}
\subseteq
\mathcal D_\nu.
}
$$

一個 operation 可以只涉及單一 domain：

$$
\mathcal D_{\boldsymbol\omega}
=
\{D_i\},
$$

也可以跨多 domain：

$$
|\mathcal D_{\boldsymbol\omega}|>1.
$$

注意：

$$
D_i
\not\Rightarrow
\text{physical spatial region}.
$$

它可以是：

- simulation subsystem；
- graph region；
- task scope；
- service boundary；
- database partition；
- agent scope；
- hardware-local region；
- physical region。

---

# 7. 從結構可能到可尋址候選

最新可供性研究指出：結構中存在某條路，並不代表 embedded agent 能定址、導航或控制它。GCM 將這一點抽象為：

$$
\boxed{
\text{Structurally Possible}
\not\Rightarrow
\text{Addressable}.
}
$$

結構性 possibility 可以來自 World model、registered law、formal relation 或 domain theory；addressability 則是 Runtime 是否具有 stable identifier、configuration description、interface 與 contract reference。兩者不是同一層。

因此 Paper-03 的 route lifecycle 可以從：

$$
\boxed{
\text{Structurally Possible}
\rightarrow
\text{Addressable}
\rightarrow
\text{Reachable}
\rightarrow
\text{Admissible}
\rightarrow
\text{Authorized}
\rightarrow
\text{Executable}
\rightarrow
\text{Reconciled}
\rightarrow
\text{Committable}
}
$$

來閱讀；其中箭頭表示判定階段，不表示前一階段邏輯蘊涵下一階段。

---

## 7.1 Addressability：Runtime 是否知道候選是什麼

Paper-02 已建立 versioned configuration registry。

令：

$$
\mathsf{Addr}^{(v)}(\gamma)=1
$$

表示 full Runtime configuration $\gamma$ 可由 canonical registry 在 version $v$ 下解析。

對 operation $\boldsymbol\omega$，candidate generation 先得到：

$$
\boxed{
\mathcal K_\nu^{\mathrm{addr}}
(\boldsymbol\omega)
=
\left\{
\boldsymbol\zeta
\mid
\mathsf{Addr}^{(v)}(\boldsymbol\zeta)=1
\right\}.
}
$$

這裡 $\boldsymbol\zeta$ 表示 candidate route record，而不是單一 24／72 cell。

因此：

$$
\boxed{
\text{Basis Cell}
\neq
\text{Route Candidate}.
}
$$

---

# 8. Candidate route record

本文定義最小 route candidate：

$$
\boxed{
\boldsymbol\zeta
=
\left\langle
\mathcal D_{\boldsymbol\omega},
\gamma,
E,
\mathsf{Br},
q,
\sigma,
\chi
\right\rangle.
}
$$

其中：

- $\mathcal D_{\boldsymbol\omega}$：target domain set；
- $\gamma\in\mathfrak G^{(v)}$：full Runtime configuration；
- $E$：executor or executor family；
- $\mathsf{Br}$：representation bridge or bridge chain；
- $q\in\mathcal Q_\nu$：resource binding；
- $\sigma$：scheduling / ordering metadata；
- $\chi$：composition contract reference。

這個 record 可以在未執行前存在。

因此：

$$
\boxed{
\boldsymbol\zeta
\text{ exists}
\not\Rightarrow
\boldsymbol\zeta
\text{ is legal}.
}
$$

---

# 9. Reachability：目前 Runtime 是否真的到得了

## 9.1 Runtime reachability

定義：

$$
\boxed{
\mathsf{Reach}_\nu
(A,\boldsymbol\zeta)
\in
\{0,1\}.
}
$$

它表示 Agent／Runtime $A$ 在目前 control state $\Xi_\nu$ 下，是否真正能取得並調用 route 所需的：

- executor；
- representation bridge；
- device；
- service；
- memory；
- network path；
- dataset；
- model；
- compiler/runtime support；
- required control interface。

因此：

$$
\boxed{
\text{Structurally Available}
\not\Rightarrow
\text{Currently Reachable}.
}
$$

---

## 9.2 Reachable set

定義：

$$
\boxed{
\mathfrak A_{\mathrm{run},\nu}(A)
=
\left\{
\boldsymbol\zeta
\mid
\mathsf{Reach}_\nu(A,\boldsymbol\zeta)=1
\right\}.
}
$$

它不是常數。

resource state：

$$
\mathcal Q_\nu
$$

改變時，reachable set 可能改變。

例如新增 GPU：

$$
\mathfrak A_{\mathrm{run},\nu+1}
\supset
\mathfrak A_{\mathrm{run},\nu},
$$

但 device failure、quota exhaustion、network partition、service revocation、model removal、bridge failure 亦可能造成：

$$
\mathfrak A_{\mathrm{run},\nu+1}
\subset
\mathfrak A_{\mathrm{run},\nu}.
$$

因此：

$$
\boxed{
\nu_2>\nu_1
\not\Rightarrow
\mathfrak A_{\mathrm{run},\nu_1}
\subseteq
\mathfrak A_{\mathrm{run},\nu_2}.
}
$$

這是從「動態技術可達性」研究回投到 GCM 的一般化版本。

---

# 10. Admissibility：做得到不代表合法

對 World boundary $B_W$ 、Foundation $\mathcal F^{(v)}$ 與 constraints $\mathcal C_\nu$，定義：

$$
\boxed{
\mathsf{Adm}_{B_W,\nu}^{(v)}
(\boldsymbol\omega,\boldsymbol\zeta)
\in
\{0,1\}.
}
$$

最低 admissibility obligations 可以包含：

$$
\mathsf{TypeOK},
$$

$$
\mathsf{DomainOK},
$$

$$
\mathsf{LawOK},
$$

$$
\mathsf{InvariantPreOK},
$$

$$
\mathsf{BridgePreOK},
$$

$$
\mathsf{EffectBoundaryOK},
$$

$$
\mathsf{FoundationOK}.
$$

因此：

$$
\boxed{
\mathsf{Reach}_\nu(A,\boldsymbol\zeta)=1
\not\Rightarrow
\mathsf{Adm}_{B_W,\nu}^{(v)}=1.
}
$$

一個 Runtime 可能技術上能寫某個 state、呼叫某個 solver 或轉換某種 representation，但 Foundation 不允許該 effect。

---

# 11. Authority：合法 operation 也不代表 caller 有權執行

依 Series-00，定義：

$$
\boxed{
\mathsf{Auth}_\nu(A,o,S)
}
$$

表示 Agent $A$ 在 scope $S$ 對 operation $o$ 具有 authority。

最小 authority profile：

$$
\boxed{
\mathsf{AuthProfile}(A)
=
\left\langle
P_{\mathrm{observe}},
P_{\mathrm{compute}},
P_{\mathrm{materialize}},
P_{\mathrm{state}},
P_{\mathrm{commit}},
P_{\mathrm{rule}},
P_{\mathrm{foundation}}
\right\rangle.
}
$$

因此：

$$
P_{\mathrm{observe}}=1
\not\Rightarrow
P_{\mathrm{state}}=1,
$$

$$
P_{\mathrm{state}}=1
\not\Rightarrow
P_{\mathrm{commit}}=1,
$$

$$
P_{\mathrm{commit}}=1
\not\Rightarrow
P_{\mathrm{rule}}=1,
$$

$$
P_{\mathrm{rule}}=1
\not\Rightarrow
P_{\mathrm{foundation}}=1.
$$

---

## 11.1 Operation control contract

最新時空控制／管理研究提出 manager contract：target、scope、must-keep kernel、allowed modification、verification、rollback 與 permission 必須一起表達。GCM 將其抽象為一般 operation control contract：

$$
\boxed{
\mathfrak C_{\mathrm{op}}
=
\left\langle
T,
S,
\mathcal I_{\mathrm{keep}},
\Delta_{\mathrm{allow}},
\mathsf{AdmReq},
\mathsf{VerifyReq},
\mathsf{RollbackReq},
\mathsf{PermReq}
\right\rangle.
}
$$

其中：

- $T$：target；
- $S$：scope；
- $\mathcal I_{\mathrm{keep}}$：必須保持的 invariants；
- $\Delta_{\mathrm{allow}}$：允許 effects；
- $\mathsf{AdmReq}$：admissibility obligations；
- $\mathsf{VerifyReq}$：verification obligations；
- $\mathsf{RollbackReq}$：rollback / recovery obligations；
- $\mathsf{PermReq}$：required authority classes。

因此 route candidate 中的 $\chi$ 應引用一份 operation / composition contract，而不是只放一個自由文字 policy 名稱。

對 operation $\boldsymbol\omega$，定義 required authority set：

$$
\boxed{
\mathsf{ReqAuth}(\boldsymbol\omega)
\subseteq
\{
\mathsf{Observe},
\mathsf{Compute},
\mathsf{Materialize},
\mathsf{ModifyState},
\mathsf{Commit},
\mathsf{ModifyRule},
\mathsf{ModifyFoundation}
\}.
}
$$

再定義：

$$
\boxed{
\mathsf{AuthOK}_\nu
(A,\boldsymbol\omega,S)
:=
\bigwedge_{a\in\mathsf{ReqAuth}(\boldsymbol\omega)}
\mathsf{Auth}_\nu(A,a,S).
}
$$

這允許一個 executor 在只有 Compute authority 時產生隔離 proposal，但若 operation 要把 proposal 寫入 canonical World，仍可額外要求 ModifyState 與 Commit authority。

因此：

$$
\boxed{
\text{Authority to Propose}
\neq
\text{Authority to Commit}.
}
$$

---

## 11.2 Reachability 與 authority 互相獨立

可能：

$$
\mathsf{Reach}_\nu(A,o)=1,
$$

但：

$$
\mathsf{Auth}_\nu(A,o,S)=0.
$$

例如 Runtime 擁有一個 filesystem writer，但 caller 只有 read authority。

反過來也可能：

$$
\mathsf{Auth}_\nu(A,o,S)=1,
$$

但：

$$
\mathsf{Reach}_\nu(A,o)=0.
$$

例如 caller 合法擁有 GPU execution 權限，但 GPU 當下離線。

因此：

$$
\boxed{
\text{Can Execute}
\neq
\text{May Execute}.
}
$$

---

## 11.3 Router 不得自行提升 authority

對 ordinary routing operation：

$$
\boxed{
\mathsf{AuthOut}
\preceq
\mathsf{AuthIn}
\oplus
\mathsf{ExplicitDelegation}.
}
$$

其中 $\preceq$ 表示 authority 不得超過已持有或被明確授予的範圍。

因此：

$$
\boxed{
\text{Route Search}
\not\Rightarrow
\text{Privilege Escalation}.
}
$$

AI planner、optimizer、scheduler、executor registry 都不能因「找到更有效的方法」就自行取得更深層 authority。

---

# 12. Pre-execution gate

把前述條件合併，定義：

$$
\boxed{
\begin{aligned}
&\mathsf{PreExecOK}_{\nu}^{(v)}
(A,\boldsymbol\omega,\boldsymbol\zeta)
\\
&:=
\mathsf{Addr}^{(v)}(\boldsymbol\zeta)
\land
\mathsf{Reach}_\nu(A,\boldsymbol\zeta)
\land
\mathsf{Adm}_{B_W,\nu}^{(v)}(\boldsymbol\omega,\boldsymbol\zeta)
\land
\mathsf{AuthOK}_\nu(A,\boldsymbol\omega,S)
\land
\mathsf{ExecContractOK}_\nu(\boldsymbol\zeta)
\land
\mathsf{BridgeOK}_\nu(\boldsymbol\zeta).
\end{aligned}
}
$$

安全候選集合為：

$$
\boxed{
\mathcal K_\nu^{\mathrm{safe}}
(\boldsymbol\omega,A)
=
\left\{
\boldsymbol\zeta
\in
\mathcal K_\nu^{\mathrm{addr}}
\mid
\mathsf{PreExecOK}_{\nu}^{(v)}=1
\right\}.
}
$$

如果：

$$
\mathcal K_\nu^{\mathrm{safe}}=\varnothing,
$$

Runtime 不應假造一條 route。

它應進入 Defer、Refuse 或 Escalate。

---

# 13. Admissibility First，Optimization Second

假設 route policy 有 objective：

$$
J(\boldsymbol\zeta)
=
\alpha_L L
+
\alpha_C C
+
\alpha_E E
+
\alpha_F F
+
\alpha_R R,
$$

可代表 latency、cost、energy、fidelity loss、risk 等。

GCM 不允許：

$$
\arg\min_{\boldsymbol\zeta\in\mathcal K_\nu^{\mathrm{addr}}}J
$$

直接繞過 legality。

合法的 optimization 是：

$$
\boxed{
\boldsymbol\zeta^*
\in
\arg\min_{\boldsymbol\zeta\in\mathcal K_\nu^{\mathrm{safe}}}
J(\boldsymbol\zeta).
}
$$

但即使沒有 $J$，Runtime 仍可以使用：

- deterministic rule；
- static priority；
- human-selected route；
- theorem-proved route；
- table lookup；
- planner；
- search；
- learned router；
- bandit；
- heuristic。

因此：

$$
\boxed{
\text{Routing}
\neq
\text{Optimization Only}.
}
$$

以及：

$$
\boxed{
\text{Mathematics}
\neq
\text{Optimization}.
}
$$

---

# 14. Local Executor Contract

每個 executor $E_i$ 必須暴露最小 contract：

$$
\boxed{
\mathfrak E_i
=
\left\langle
\mathsf{id}_i,
\mathsf{Cap}_i,
\mathsf{In}_i,
\mathsf{Out}_i,
\mathsf{Pre}_i,
\mathsf{Eff}_i,
\mathsf{Inv}_i,
\mathsf{Res}_i,
\mathsf{Cost}_i,
\mathsf{Fail}_i,
\mathsf{Hist}_i
\right\rangle.
}
$$

其中：

- $\mathsf{Cap}_i$：supported configuration / operation capabilities；
- $\mathsf{In}_i$：input schema；
- $\mathsf{Out}_i$：output schema；
- $\mathsf{Pre}_i$：preconditions；
- $\mathsf{Eff}_i$：possible effects；
- $\mathsf{Inv}_i$：executor-local invariants；
- $\mathsf{Res}_i$：resource requirements；
- $\mathsf{Cost}_i$：cost envelope / model；
- $\mathsf{Fail}_i$：failure semantics；
- $\mathsf{Hist}_i$：minimum provenance semantics。

Executor contract 不是 executor implementation 本身。

因此：

$$
\boxed{
\text{Contract Interface}
\neq
\text{Internal Algorithm}.
}
$$

GCM 允許 black-box executor，只要其 contract 足以支援 required validation。

---

# 15. Executor output 是 proposal，不是 commit

承接 Paper-01：

$$
\boxed{
E_i:
\left(
W_\nu\vert_{D_i},
\Xi_\nu,
\gamma_i,
\mathsf{input}
\right)
\rightarrow
\delta_i.
}
$$

其中：

$$
\delta_i
=
\text{candidate effect proposal}.
$$

因此：

$$
\boxed{
\text{Executor Output}
\neq
W_{\nu+1}.
}
$$

這使 speculative execution、parallel local solver、retry、rollback、reconciliation 與 global verification 都成為可能。

---

# 16. Representation Bridge 必須 typed

第一輪使用：

$$
B_{p\rightarrow q}:S_p\rightarrow S_q.
$$

第二輪為避免和 World boundary $B_W$ 混淆，canonical notation 改為：

$$
\boxed{
\mathsf{Br}_{p\rightarrow q}:
S_p
\rightharpoonup
S_q.
}
$$

使用 partial map 是因為並非所有 source state 都有合法 target representation。

---

## 16.1 Bridge contract

最小 bridge contract：

$$
\boxed{
\mathfrak C^{\mathrm{Br}}_{p\rightarrow q}
=
\left\langle
S_p,
S_q,
\mathsf{Pre},
\mathsf{Post},
\mathsf{InvKeep},
\epsilon,
\mathsf{Rev},
\mathsf{Cost},
\mathsf{Fail}
\right\rangle.
}
$$

其中：

- $\mathsf{Pre}$：source admissibility；
- $\mathsf{Post}$：target guarantees；
- $\mathsf{InvKeep}$：必須保留的 invariants；
- $\epsilon$：loss / error description；
- $\mathsf{Rev}$：reversibility class；
- $\mathsf{Cost}$：conversion cost；
- $\mathsf{Fail}$：failure semantics。

---

## 16.2 Lossless、lossy、unknown

若：

$$
\mathsf{Br}_{q\rightarrow p}
\circ
\mathsf{Br}_{p\rightarrow q}
=I
$$

在 specified contract domain 上成立，可視為 lossless round trip。

更一般地：

$$
d
\left(
x,
\mathsf{Br}_{q\rightarrow p}
(\mathsf{Br}_{p\rightarrow q}(x))
\right)
\le
\epsilon,
$$

表示有界 loss。

若連 error semantics 都未知：

$$
\mathsf{BridgeStatus}
=
\mathsf{Unknown},
$$

就不能因「程式碼可以轉型」而宣稱 route semantically safe。

因此：

$$
\boxed{
\text{Representable}
\not\Rightarrow
\text{Semantically Preserved}.
}
$$

---

# 17. Bridge chain

跨多種 representation 時：

$$
S_0
\xrightarrow{\mathsf{Br}_{0\to1}}
S_1
\xrightarrow{\mathsf{Br}_{1\to2}}
\cdots
\xrightarrow{\mathsf{Br}_{n-1\to n}}
S_n.
$$

整條 chain 的合法性不是每段「能跑」的簡單 conjunction。

還必須檢查：

- intermediate type compatibility；
- accumulated loss；
- invariant preservation；
- provenance；
- cost；
- round-trip requirements；
- failure / rollback path。

因此：

$$
\boxed{
\operatorname{ComposeBridges}
\neq
\operatorname{ConcatenateFunctions}.
}
$$

---

# 18. Route graph：跨 domain routing 是一張圖，不是一條線

對一組 operations，可建立 route graph：

$$
\boxed{
\mathcal G_\nu^{\mathrm{route}}
=
(V_\nu,E_\nu).
}
$$

每個 vertex 可以代表：

- executor invocation；
- bridge；
- materialization request；
- verification stage；
- synchronization point；
- external service call。

edge 可以至少分成：

$$
\mathsf{data},
\quad
\mathsf{dependency},
\quad
\mathsf{resource},
\quad
\mathsf{bridge},
\quad
\mathsf{ordering}.
$$

完整 causal / history edge typing 由 Paper-06 處理。

因此：

$$
\boxed{
\text{Routing}
\supset
\text{Scheduling}.
}
$$

Scheduling 主要回答 when / where；GCM routing 還回答 what configuration、what law、what representation、what authority、what bridge 與 what commit obligations。

---

# 19. Global composition：Compose 不等於 Concatenate

即使 executor：

$$
E_a
$$

與：

$$
E_b
$$

各自成功，也不能直接推出：

$$
E_b\circ E_a
$$

在 World boundary $B_W$ 下合法。

可能存在：

- write/write conflict；
- resource conflict；
- invariant conflict；
- incompatible representation；
- noncommutative operation；
- domain overlap；
- stale read；
- incompatible local clocks；
- authority mismatch；
- Foundation-derived prohibition。

因此：

$$
\boxed{
\operatorname{Compose}
\neq
\operatorname{Concatenate}.
}
$$

---

# 20. Reconciliation 與 global commit

本文不重新發明 Paper-01 的 commit semantics，而是把 route execution 接入既有 core。

Local proposals：

$$
\Delta_\nu
=
\{\delta_1,\ldots,\delta_k\}.
$$

Reconciliation：

$$
\mathsf{Reconcile}_{B_W,\mathcal C_\nu}
:
(W_\nu,\Delta_\nu)
\rightharpoonup
\widetilde W_{\nu+1}.
$$

Global verification：

$$
\mathsf{Verify}^{(v)}_{B_W}
(W_\nu,\widetilde W_{\nu+1}).
$$

若通過：

$$
W_{\nu+1}
:=
\widetilde W_{\nu+1}.
$$

否則：

$$
W_{\nu+1}=W_\nu
$$

仍是合法 outcome。

因此：

$$
\boxed{
\text{Local Execution Success}
\not\Rightarrow
\text{Global Commit}.
}
$$

---

# 21. Committability 是 post-execution predicate

Addressability、reachability、admissibility、authority 多數可以在 execution 前判定或近似判定。

但 committability 可能取決於真正產生的 proposals。

定義：

$$
\boxed{
\mathsf{CommitOK}_{B_W,\nu}^{(v)}
(\Delta_\nu,\widetilde W_{\nu+1})
\in
\{0,1\}.
}
$$

因此：

$$
\boxed{
\mathsf{PreExecOK}=1
\not\Rightarrow
\mathsf{CommitOK}=1.
}
$$

這是 speculative / optimistic execution 可以存在的形式空間。

---

# 22. Route disposition 不只有 Execute

本文正式保留第一輪的五態 disposition：

$$
\boxed{
\mathsf{Disposition}
\in
\{
\mathsf{Execute},
\mathsf{Defer},
\mathsf{Refuse},
\mathsf{Idle},
\mathsf{Escalate}
\}.
}
$$

## 22.1 Execute

存在可接受 route：

$$
\mathcal K_\nu^{\mathrm{safe}}
\neq
\varnothing.
$$

---

## 22.2 Defer

操作理論上可接受，但暫時：

- resource 不足；
- dependency 未完成；
- required bridge 尚未 materialize；
- external service unavailable；
- required evidence 未到齊。

Defer 不代表永久拒絕。

---

## 22.3 Refuse

存在 hard violation，例如：

- Foundation prohibition；
- authority failure；
- invariant violation；
- explicitly illegal bridge；
- disallowed effect。

---

## 22.4 Idle

目前沒有需要執行的 operation，或 policy 明確選擇不動作。

Idle 不是 failure。

---

## 22.5 Escalate

Runtime 無權自行決定，但存在更高 authority、human review、special verifier 或 explicit Foundation-governance path 可處理。

因此：

$$
\boxed{
\text{Uncertain}
\not\Rightarrow
\text{Guess and Execute}.
}
$$

---

# 23. Configuration switching 也必須走 route contract

Paper-02 定義：

$$
\Gamma_\nu(D_i)
=
\gamma_i^{-},
$$

切換為：

$$
\Gamma_{\nu+1}(D_i)
=
\gamma_i^{+}.
$$

Paper-03 補充：configuration switch 是一種 typed Runtime operation。

最少需要：

$$
\boxed{
\mathsf{SwitchOK}^{(v)}_\nu
(D_i,\gamma_i^{-},\gamma_i^{+})
}
$$

檢查：

- target configuration addressability；
- bridge availability；
- state migration legality；
- invariant preservation；
- authority；
- resource reachability；
- rollback path；
- history receipt。

因此：

$$
\boxed{
\text{Configuration Switching}
\neq
\text{Unvalidated Mode Flip}.
}
$$

---

# 24. Resource-aware routing

令 current resource state：

$$
\mathcal Q_\nu.
$$

對 route $\boldsymbol\zeta$，resource cost 可以包含：

$$
\mathsf{ComputeCost}(\boldsymbol\zeta),
$$

$$
\mathsf{CommCost}(\boldsymbol\zeta),
$$

$$
\mathsf{BridgeCost}(\boldsymbol\zeta),
$$

$$
\mathsf{ReconcileCost}(\boldsymbol\zeta),
$$

$$
\mathsf{HistoryCost}(\boldsymbol\zeta).
$$

因此 global cost：

$$
\boxed{
C_G
=
C_{\mathrm{exec}}
+
C_{\mathrm{comm}}
+
C_{\mathrm{bridge}}
+
C_{\mathrm{reconcile}}
+
C_{\mathrm{verify}}
+
C_{\mathrm{history}}.
}
$$

只把最快 local kernel 選出來，不保證 global runtime 最快。

---

# 25. Resource reachability 與 resource optimization 必須分離

如果 GPU memory 不足：

$$
\mathsf{Reach}_\nu(A,\boldsymbol\zeta_{\mathrm{GPU}})=0.
$$

這不是「GPU route 分數比較差」。

它是 route 不在 current reachable set。

因此：

$$
\boxed{
\text{Unavailable}
\neq
\text{Suboptimal}.
}
$$

同理，authority failure 也不能被 performance score 抵消。

---

# 26. Asynchronous routing，但 Global 不等於 Global Barrier

不同 domain 可以具有不同 execution cadence：

$$
D_i:\sigma_i,
$$

$$
D_j:\sigma_j,
$$

且：

$$
\sigma_i
\neq
\sigma_j.
$$

這裡 $\sigma$ 是 scheduling / ordering metadata，不宣稱是 physical time。

因此：

$$
\boxed{
\text{Global Coherence}
\not\Rightarrow
\text{Global Synchronization}.
}
$$

Runtime 可以採：

- strong barrier；
- dependency-triggered execution；
- bounded staleness；
- causal ordering；
- batch commit；
- asynchronous local progress；
- event-driven reconciliation。

Paper-04 將正式區分 World evolution、Runtime clock、Observer time、commit order 與 materialization／resolution semantics。

---

# 27. Observer-aware routing，但 Observer 不持有 World

Observer request 可以影響：

- requested projection；
- requested output format；
- observer resolution；
- query scope；
- priority；
- presentation materialization。

但：

$$
\boxed{
\Delta O
\not\Rightarrow
\Delta W.
}
$$

如果 Observer 只發出：

$$
\mathsf{Observe}
$$

或：

$$
\mathsf{Materialize}
$$

operation，Router 不得偷偷將其升格成：

$$
\mathsf{ModifyState}.
$$

因此：

$$
\boxed{
\text{Observer-sensitive Routing}
\neq
\text{Observer-owned World Evolution}.
}
$$

---

# 28. AI-native Router 的正確位置

AI 可以作為 candidate generator、ranker、planner 或 explanation generator。

例如：

$$
\mathsf{AIPlan}
:
(\boldsymbol\omega,W_\nu,\Xi_\nu,\mathcal H_{\le\nu})
\rightarrow
\widehat{\mathcal K}_\nu.
$$

但 AI output 只是 proposal。

正式流程：

$$
\boxed{
\text{AI Proposes}
\rightarrow
\text{Runtime Validates}
\rightarrow
\text{Executor Produces Proposal}
\rightarrow
\text{World Commit Gate Decides}.
}
$$

因此：

$$
\boxed{
\text{AI Confidence}
\neq
\text{Authority}
\neq
\text{Admissibility Proof}.
}
$$

AI 也不得自行修改：

$$
\mathcal F^{(v)}.
$$

---

# 29. Foundation revision 不屬 ordinary routing

若 operation type 為：

$$
\mathsf{ModifyFoundation},
$$

則 ordinary Router 不應把它當一般 route 執行。

它必須轉交 explicit governance path：

$$
\boxed{
\mathsf{ReviseFoundation}:
\mathcal F^{(v)}
\rightarrow
\mathcal F^{(v+1)}.
}
$$

最低要求：

- explicit revision intent；
- version bump；
- migration specification；
- compatibility analysis；
- authority proof；
- audit record；
- rollback / fallback policy；
- affected World-state classification。

因此：

$$
\boxed{
\text{Adaptive Runtime}
\neq
\text{Self-Rewriting Foundation by Default}.
}
$$

---

# 30. Route receipt

Paper-03 定義 route receipt 最小欄位：

$$
\boxed{
\mathsf{RouteReceipt}_\nu
=
\left\langle
\mathsf{requestId},
\mathsf{routeId},
\mathsf{domains},
\mathsf{configuration},
\mathsf{executor},
\mathsf{bridge},
\mathsf{resource},
\mathsf{gateResults},
\mathsf{disposition},
\mathsf{proposalRefs},
\mathsf{commitStatus},
\mathsf{cost},
\mathsf{failure},
\mathsf{parentRefs}
\right\rangle.
}
$$

Paper-03 只要求 route provenance 足以 audit。

完整：

- partial-order history；
- causal edge；
- replay semantics；
- history quotient；
- compression；
- retention；
- Foundation lineage；

由 Paper-06 處理。

因此本文不再用 $R_t$ 同時表示 route、receipt 或 archive status。

---

# 31. Full Runtime pipeline

第二輪 canonical pipeline 可寫成：

```text
1. Parse / Type Operation
2. Resolve World Boundary and Domain Scope
3. Enumerate Addressable Configurations
4. Construct Candidate Routes
5. Check Current Reachability
6. Check Admissibility
7. Check Authority
8. Validate Executor / Bridge Contracts
9. Select Route Policy
10. Schedule / Order
11. Execute Local Executors
12. Produce Local Proposals
13. Reconcile Cross-Domain Effects
14. Verify Global Invariants
15. Commit / Reject / Rollback
16. Emit Route / Commit Receipts
17. Project / Materialize for Observers
```

注意：implementation 可以對無副作用的 pure checks 重新排序以降低成本。

但語義上：

$$
\boxed{
\text{Optimization May Not Override a Failed Hard Gate}.
}
$$

---

# 32. 最小形式演算法

```text
Input:
    operation request omega
    requester A
    world state W_nu
    runtime state Xi_nu
    observer state O_nu
    foundation F^(v)
    constraints C_nu
    resource state Q_nu

D = ResolveDomain(omega, W_nu)
K_addr = EnumerateAddressableRoutes(omega, D, Gamma_nu)

K_safe = {}

for zeta in K_addr:
    if not Reachable(A, zeta, Xi_nu, Q_nu):
        continue
    if not Admissible(omega, zeta, W_nu, F^(v), C_nu):
        continue
    if not Authorized(A, omega, scope(omega)):
        continue
    if not ExecutorContractOK(zeta):
        continue
    if not BridgeOK(zeta):
        continue
    K_safe.add(zeta)

if K_safe is empty:
    return Defer / Refuse / Escalate / Idle

zeta_star = SelectByPolicy(K_safe)
proposals = ExecuteAsProposals(zeta_star)

candidate = Reconcile(W_nu, proposals, C_nu)

if candidate is undefined:
    EmitRejectReceipt()
    return Reject / Retry / Escalate

if Verify(candidate, W_nu, F^(v), C_nu) == PASS:
    W_(nu+1) = Commit(candidate)
    EmitCommitReceipt()
else:
    W_(nu+1) = W_nu
    RollbackOrDiscard(proposals)
    EmitRejectReceipt()

ProjectOrMaterialize(W_(nu+1), O_nu)
```

這個演算法不是唯一實作。

它只是最小 conformance skeleton。

---

# 33. Route policy 與 Foundation semantics 必須分離

Route policy：

$$
\mathcal S_\nu
$$

可以改變：

- priority；
- heuristic；
- learned model；
- cost weights；
- cache strategy；
- placement；
- retry policy。

但：

$$
\boxed{
\mathcal S_\nu
\neq
\mathcal F^{(v)}.
}
$$

因此 policy tuning：

$$
\mathcal S_\nu
\rightarrow
\mathcal S_{\nu+1}
$$

不自動意味：

$$
\mathcal F^{(v)}
\rightarrow
\mathcal F^{(v+1)}.
$$

這一條對 AI-adaptive Runtime 特別重要。

---

# 34. Failure modes

## 34.1 Configuration thrashing

若 route 每個 commit 都切換 configuration：

$$
\gamma_a
\leftrightarrow
\gamma_b
$$

可能造成 bridge / warmup / cache cost 大於收益。

可用 hysteresis、minimum residency 或 switch penalty。

---

## 34.2 Bridge explosion

多種 representation 兩兩直接轉換，可能出現：

$$
O(n^2)
$$

bridge family。

需要 canonical intermediate representation、bridge graph planning 或 domain-specific hubs。

---

## 34.3 Reconciliation bottleneck

Local executor 很快，但：

$$
C_{\mathrm{reconcile}}
\gg
C_{\mathrm{exec}}.
$$

此時增加 local parallelism 可能無法增加 global throughput。

---

## 34.4 Authority confusion

把「executor 存在」誤當成「caller 有權使用」，會造成 ambient authority 或 privilege escalation。

---

## 34.5 Foundation leakage

Router、AI planner 或 optimizer 因 local failure 自行修改 invariants / Foundation，會破壞 GCM 的 version boundary。

---

## 34.6 Stale reachability

Registry 認為 resource 存在，但 device / service 已失效。

因此 reachability 必須能被重新驗證，而不是永久 cache。

---

## 34.7 Hidden history cost

Router 若每次 decision 都掃描完整：

$$
\mathcal H,
$$

即使 active task 很少，也可能產生不可接受的 hidden cost。

Paper-05、06 將處理 bounded active support 與 history representation。

---

## 34.8 Observer-triggered recomputation

單純 zoom / inspect / query 導致 World solver 重跑，是 observation / computation leakage。

Paper-04 將正式處理。

---

## 34.9 Policy score laundering

將 hard violation 變成 weighted penalty，例如：

$$
J
=
\text{latency}
+
0.001\times\text{illegalPenalty},
$$

可能讓 optimizer 選出「便宜但違法」route。

因此 hard gate 不應被一般 weighted objective 稀釋。

---

# 35. Canonical invariants for Paper-03

本文新增或強化以下 invariants。

## I-03-01 Addressability Separation

$$
\boxed{
\text{Addressable}
\not\Rightarrow
\text{Reachable}.
}
$$

---

## I-03-02 Reachability / Authority Separation

$$
\boxed{
\mathsf{Reach}(A,o)
\not\Rightarrow
\mathsf{Auth}(A,o).
}
$$

$$
\boxed{
\mathsf{Auth}(A,o)
\not\Rightarrow
\mathsf{Reach}(A,o).
}
$$

---

## I-03-03 Hard-Gate Priority

$$
\boxed{
\neg\mathsf{PreExecOK}
\Rightarrow
\text{No Ordinary Execute}.
}
$$

---

## I-03-04 Admissibility Before Optimization

$$
\boxed{
\text{Optimization}
\text{ operates only within legal candidate sets}.
}
$$

---

## I-03-05 Proposal / Commit Separation

$$
\boxed{
\text{Executor Output}
\neq
\text{Canonical World Commit}.
}
$$

---

## I-03-06 Local Success Is Insufficient

$$
\boxed{
\text{Local Success}
\not\Rightarrow
\text{Global Commit}.
}
$$

---

## I-03-07 Authority Non-Escalation

$$
\boxed{
\mathsf{AuthOut}
\preceq
\mathsf{AuthIn}
\oplus
\mathsf{ExplicitDelegation}.
}
$$

---

## I-03-08 Foundation Constancy

Ordinary routing must preserve：

$$
\boxed{
\mathcal F^{(v)}
\rightarrow
\mathcal F^{(v)}.
}
$$

---

## I-03-09 Bridge Explicitness

若 representation 改變：

$$
S_p
\rightarrow
S_q,
$$

則必須有 explicit bridge / proof obligation；不能只靠 implicit coercion。

---

## I-03-10 Reachability Non-Monotonicity

$$
\boxed{
\nu_2>\nu_1
\not\Rightarrow
\mathfrak A_{\mathrm{run},\nu_1}
\subseteq
\mathfrak A_{\mathrm{run},\nu_2}.
}
$$

---

## I-03-11 Globality Does Not Imply Barrier

$$
\boxed{
\text{Global Coherence}
\not\Rightarrow
\text{Global Barrier}.
}
$$

---

## I-03-12 Observer Safety

$$
\boxed{
\mathsf{Observe}
\not\Rightarrow
\mathsf{ModifyState}.
}
$$

---

# 36. 形式命題

## 命題 A：Candidate Insufficiency

若：

$$
\boldsymbol\zeta
\in
\mathcal K_\nu^{\mathrm{addr}},
$$

不能推出：

$$
\boldsymbol\zeta
\in
\mathcal K_\nu^{\mathrm{safe}}.
$$

這是 Paper-02 與 Paper-03 的責任邊界。

---

## 命題 B：Can / May Independence

一般不存在：

$$
\mathsf{Reach}(A,o)
\Leftrightarrow
\mathsf{Auth}(A,o).
$$

因此任何將 capability matching 與 authorization 合併成單一布林的 Runtime，都可能喪失必要語義。

---

## 命題 C：Optimization Cannot Legalize

若：

$$
\mathsf{Adm}(\boldsymbol\zeta)=0,
$$

則任何有限 objective improvement：

$$
J(\boldsymbol\zeta)<J(\boldsymbol\zeta')
$$

都不能推出：

$$
\mathsf{Adm}(\boldsymbol\zeta)=1.
$$

---

## 命題 D：Route Success Does Not Entail Commit

即使：

$$
\mathsf{PreExecOK}=1
$$

且 executor 正常完成，也可能：

$$
\mathsf{CommitOK}=0.
$$

---

## 命題 E：Configuration Switching Is a Controlled Operation

$$
\Gamma_\nu(D_i)
\neq
\Gamma_{\nu+1}(D_i)
$$

不代表 switching 可以跳過 bridge、authority、verification 與 receipt。

---

## 命題 F：Dynamic Reachability Can Contract

若 current resource/capability set 縮小：

$$
\mathcal Q_{\nu+1}
\subset
\mathcal Q_\nu,
$$

則可能：

$$
\mathfrak A_{\mathrm{run},\nu+1}
\subset
\mathfrak A_{\mathrm{run},\nu}.
$$

所以 Runtime 不能假設 capability accumulation 永遠單調。

---

# 37. Reference Runtime 的最低模組

Paper-03 對未來 TW-02 建議至少以下模組：

```text
Operation Type Registry
Domain Resolver
Configuration Registry
Executor Registry
Bridge Registry
Reachability Engine
Admissibility Validator
Authority Engine
Route Planner / Selector
Resource Manager
Scheduler
Proposal Collector
Reconciliation Engine
Global Verifier
Commit / Reject / Rollback Gate
Route Receipt Emitter
```

其中：

$$
\boxed{
\text{Planner}
\neq
\text{Validator}
\neq
\text{Commit Gate}.
}
$$

此分離對 AI-native Runtime 尤其重要。

---

# 38. 最小 API 契約

```text
resolve_operation(request) -> typed_operation
resolve_domains(typed_operation, world_state) -> domain_set
enumerate_routes(operation, domain_set, registry) -> candidate_routes
check_reachability(agent, route, runtime_state, resources) -> result
check_admissibility(operation, route, foundation, constraints) -> result
check_authority(agent, operation, scope) -> result
validate_executor_contract(route) -> result
validate_bridge_contract(route) -> result
select_route(safe_routes, policy) -> route | disposition
execute_as_proposal(route, inputs) -> proposal_set
reconcile(world_state, proposal_set, constraints) -> candidate_state | conflict
verify(candidate_state, foundation, constraints) -> pass | fail
commit(candidate_state) -> new_world_state
rollback(proposal_set) -> rollback_result
emit_route_receipt(...) -> receipt_ref
```

這裡沒有要求 AI。

因此 deterministic MVP 完全可以實作 GCM。

---

# 39. 與 Paper-04 的邊界

Paper-03 使用：

- scheduling relation；
- local cadence；
- compute resolution field；
- materialization request；
- Observer context。

但不在本文定義其完整 temporal / spatial semantics。

Paper-04 將處理：

$$
\text{Computation}
\neq
\text{Observation}
\neq
\text{Materialization},
$$

以及：

$$
\text{World Evolution}
\neq
\text{Runtime Clock}
\neq
\text{Observer Time}
\neq
\text{Commit Order}.
$$

因此本文避免把 $\sigma$ 偷偷解讀為 physical time。

---

# 40. 與 Paper-05 的邊界

Paper-03 會查 resource reachability，但不完整處理：

- active horizon；
- dormant region；
- bounded active support；
- recursive expansion；
- eviction / pinning；
- resource envelope over unbounded Worlds。

這些由 Paper-05 處理。

---

# 41. 與 Paper-06 的邊界

Paper-03 會 emit route receipt，但不完整定義：

$$
\mathcal H.
$$

Paper-06 將處理：

- noncommutative history；
- typed receipt DAG；
- causal / execution / commit edge；
- replay；
- rollback lineage；
- history equivalence；
- retention / compression。

因此：

$$
\boxed{
\text{Route Receipt}
\neq
\text{Complete History Theory}.
}
$$

---

# 42. MVP 實驗設計

## Experiment A — Addressable but Unreachable

註冊 GPU route，但 runtime 移除 GPU。

預期：

$$
\mathsf{Addr}=1,
\qquad
\mathsf{Reach}=0,
$$

且不得 Execute。

---

## Experiment B — Reachable but Unauthorized

executor 與 resource 都存在，但 caller 無 ModifyState authority。

預期：

$$
\mathsf{Reach}=1,
\qquad
\mathsf{Auth}=0,
$$

結果為 Refuse 或 Escalate。

---

## Experiment C — Authorized but Unreachable

caller 有 authority，但 resource offline。

預期 Defer，而不是 authority failure。

---

## Experiment D — Illegal Bridge

continuous state 要切到 discrete representation，但缺少合法 bridge contract。

預期 route 被拒於 execution 前。

---

## Experiment E — Lossy Bridge

建立有界 $\epsilon$ 的 bridge，測試不同 invariant tolerance 下 route 是否可接受。

---

## Experiment F — Local Success / Global Reject

兩個 executor 各自成功，但 proposal write/write conflict。

預期：

$$
\mathsf{LocalSuccess}=1,
$$

但：

$$
\mathsf{CommitOK}=0.
$$

---

## Experiment G — Dynamic Configuration Switch

Runtime 在 deterministic / stochastic 或 continuous / discrete configuration 間切換，檢查 switch receipt、bridge 與 rollback。

---

## Experiment H — AI Proposal Rejected by Validator

AI Router 提出 latency 最低 route，但該 route authority 不足。

預期 deterministic validator 拒絕。

---

## Experiment I — Reachability Contraction

運行中撤除 accelerator 或 remote service。

驗證：

$$
\mathfrak A_{\mathrm{run},\nu+1}
\subset
\mathfrak A_{\mathrm{run},\nu}.
$$

---

## Experiment J — No Global Barrier

不同 domain asynchronous execution，在 dependency / reconciliation boundary 才同步。

驗證 global coherence 不要求每步全域 barrier。

---

# 43. 評估指標

MVP 不應只測 throughput。

至少測：

$$
\mathsf{RouteDecisionLatency},
$$

$$
\mathsf{ExecutorUtilization},
$$

$$
\mathsf{BridgeCost},
$$

$$
\mathsf{ReconcileCost},
$$

$$
\mathsf{VerificationCost},
$$

$$
\mathsf{SwitchRate},
$$

$$
\mathsf{RejectPrecision},
$$

$$
\mathsf{UnauthorizedExecutionCount},
$$

$$
\mathsf{RollbackSuccessRate},
$$

$$
\mathsf{ReceiptOverhead}.
$$

對 correctness-first reference implementation：

$$
\mathsf{UnauthorizedExecutionCount}=0
$$

應比微小 throughput 增益更重要。

---

# 44. Open problems

1. $\mathsf{Reach}$ 應採 binary predicate、confidence interval、proof object 還是 multi-valued state？
2. 如何在 stale distributed resource registry 下安全計算 reachability？
3. authority delegation 應如何形式化 expiry、revocation、scope narrowing 與 provenance？
4. learned Router 如何提供可驗證 candidate rationale，而不把 confidence 當 proof？
5. bridge accumulated error 如何跨多 domain 傳播？
6. 多 bridge path 是否需要最短路、最低 loss、最低 risk 或 proof-carrying route？
7. executor contract 如何描述 probabilistic failure 與 nondeterministic effects？
8. global reconciliation 何時可以 incremental，而不必 scan 全 World？
9. authority check 與 reachability check 在 distributed Runtime 中如何避免 TOCTOU race？
10. configuration switch 的 state migration 如何建立 formal bisimulation / refinement obligation？
11. asynchronous domains 的 stale proposal 何時仍可 commit？
12. route cache 的 validity 如何跟 Foundation version、resource epoch 與 authority revision 綁定？
13. speculative execution 可否在無 commit authority 下進行？其 side effects 如何隔離？
14. external service executor 的 contract 要如何處理 unverifiable black-box behavior？
15. representation bridge 是否需要 proof-carrying metadata？
16. route disposition 中 Defer 與 Escalate 的 policy boundary 如何標準化？
17. Foundation revision 是否需要獨立 multi-party governance？
18. route receipt 應保存多少 policy internals 才兼顧 audit 與隱私？
19. multi-agent Router 如何避免 authority laundering？
20. GCM Conformance Suite 應要求哪些 minimum hard-gate tests？

---

# 45. 本文的研究貢獻

本文不把既有 scheduler、access control、contract verification 或 transaction 概念重新命名為新理論。

本文的貢獻集中在以下整合：

## 45.1 Route lifecycle typing

$$
\boxed{
\text{Addressable}
\rightarrow
\text{Reachable}
\rightarrow
\text{Admissible}
\rightarrow
\text{Authorized}
\rightarrow
\text{Executable}
\rightarrow
\text{Reconciled}
\rightarrow
\text{Committable}.
}
$$

這是一組 semantic gates，不宣稱 implementation 必須照同一函式呼叫順序執行所有 pure checks。

---

## 45.2 Capability 與 authority 分離

$$
\boxed{
\text{Can Execute}
\neq
\text{May Execute}.
}
$$

這使 GCM 的 control plane 不只是 scheduler。

---

## 45.3 Configuration address 與 route legality 分離

Paper-02 的 finite configuration basis 可以保持開放且可尋址，而不承擔全部 correctness semantics。

---

## 45.4 Local execution 與 World commit 分離

$$
\boxed{
\text{Local Proposal}
\neq
\text{Canonical World Mutation}.
}
$$

這把 heterogeneous execution、reconciliation、verification 與 rollback 放進同一 formal path。

---

## 45.5 Runtime reachability 的動態性

本文將「可達」從靜態 capability list 升級成 Runtime state-relative relation：

$$
\mathsf{Reach}_\nu.
$$

---

## 45.6 Typed bridge contract

representation change 不能再以 implicit conversion 偷渡，必須具有 explicit legality、invariant、loss、failure 與 provenance semantics。

---

## 45.7 Foundation governance boundary

Router 可以自適應，但：

$$
\boxed{
\text{Adaptive Routing}
\not\Rightarrow
\text{Implicit Foundation Revision}.
}
$$

---

# 46. 從第一輪到第二輪的關鍵升級

第一輪可概括為：

$$
\mathcal R_t:
(D_i,T_i,W_t,\mathcal C_t,\mathcal B_t)
\mapsto
(p_i,\ell_i,\lambda_i,r_i,\tau_i).
$$

第二輪不直接延用此式，因為：

- $t$ 不能混同 commit index 與 physical time；
- $\lambda$ 混合 resolution / materialization；
- routing output 不應只是一組配置值；
- authority 缺席；
- reachability 缺席；
- bridge contract 太弱；
- executor output 與 commit 邊界不足；
- Foundation version 未顯式。

第二輪因此改寫為 route relation：

$$
\boxed{
\mathsf{Route}^{(v)}_\nu
:
(A,\boldsymbol\omega,W_\nu,\Xi_\nu,O_\nu,
\mathcal F^{(v)},\mathcal C_\nu,\mathcal Q_\nu)
\rightharpoonup
(\boldsymbol\zeta,\mathsf{Disposition}).
}
$$

若 disposition 為 Execute，才進一步產生：

$$
\boldsymbol\zeta
\xrightarrow{\mathsf{Execute}}
\Delta_\nu
\xrightarrow{\mathsf{Reconcile}}
\widetilde W_{\nu+1}
\xrightarrow{\mathsf{Verify}}
\mathsf{Commit/Reject}.
$$

因此 Dynamic Computational Routing 不再只是「挑一個 solver」。

它是：

$$
\boxed{
\text{A Typed Control Plane for
Legally Composing Heterogeneous Computation}.
}
$$

---

# 47. 結論

Paper-02 讓 GCM 得到可尋址的 computational configuration space；Paper-03 則回答：

> 有了地址之後，Runtime 憑什麼走這條路？

答案不能只是一個 scheduler score。

真正的 route 必須同時面對：

$$
\boxed{
\text{Addressability},
\text{Reachability},
\text{Admissibility},
\text{Authority},
\text{Executor Contract},
\text{Bridge Contract},
\text{Resource State},
\text{Reconciliation},
\text{Verification},
\text{Commit}.
}
$$

因此：

$$
\boxed{
\text{Scheduling}
\subset
\text{Computational Routing}
\subset
\text{Global Runtime Composition}.
}
$$

但更重要的是：

$$
\boxed{
\text{Routing Success}
\neq
\text{World Commit Success}.
}
$$

GCM 的 Global Runtime 不是把不同計算方法混在一起就完成，而是要求異質 local computations 在指定 World boundary 中，經 explicit authority、contract、reconciliation 與 verification 後，才形成可追溯的 canonical commit。

這使下一篇 Paper-04 可以處理另一個長期被 Runtime 混寫的問題：

$$
\boxed{
\text{Computation}
\neq
\text{Observation}
\neq
\text{Materialization}.
}
$$

尤其當不同 domain、不同 observer、不同 resolution 與不同 clock 同時存在時，global computation 如何保持一致而不要求 full materialization 或 single global time。

---

# 參考文獻

[1] StarPU Project, “StarPU: A Unified Runtime System for Heterogeneous Multicore Architectures” and “Features,” Inria, current documentation, accessed 2026-08-24. https://starpu.gitlabpages.inria.fr/

[2] A. Boné, A. Aguirre, D. Álvarez, P. J. Martinez-Ferrer, and V. Beltran, “A task-based data-flow methodology for programming heterogeneous systems with multiple accelerator APIs,” *Future Generation Computer Systems*, vol. 180, 108383, 2026. https://doi.org/10.1016/j.future.2026.108383

[3] T. De Matteis, L. Gianinazzi, J. de Fine Licht, and T. Hoefler, “Streaming Task Graph Scheduling for Dataflow Architectures,” *Proceedings of HPDC 2023*, pp. 225--237, 2023. https://doi.org/10.1145/3588195.3592999

[4] J. Eker, J. Janneck, E. A. Lee, J. Liu, X. Liu, J. Ludvig, S. Sachs, and Y. Xiong, “Taming Heterogeneity: The Ptolemy Approach,” *Proceedings of the IEEE*, vol. 91, no. 1, pp. 127--144, 2003.

[5] Ptolemy Project, “Ptolemy II” and “Ptolemy II Domains,” UC Berkeley, current project documentation, accessed 2026-08-24. https://ptolemy.berkeley.edu/ptolemyII/

[6] Legion Programming System, “Privileges,” Stanford University, current documentation, accessed 2026-08-24. https://legion.stanford.edu/tutorial/privileges.html

[7] Legion Programming System, “Physical Regions,” Stanford University, current documentation, accessed 2026-08-24. https://legion.stanford.edu/tutorial/physical_regions.html

[8] Modelica Association Project FMI, *Functional Mock-up Interface Specification 3.0.2*, 2024-11-27. https://fmi-standard.org/docs/3.0.2/

[9] LLVM Project, “MLIR Dialect Conversion,” official documentation, accessed 2026-08-24. https://mlir.llvm.org/docs/DialectConversion/

[10] M. Althoff, G. Frehse, and A. Girard, “Set Propagation Techniques for Reachability Analysis,” *Annual Review of Control, Robotics, and Autonomous Systems*, vol. 4, pp. 369--395, 2021. https://doi.org/10.1146/annurev-control-071420-081941

[11] X. Tan, A. Papachristodoulou, and D. V. Dimarogonas, “A contract negotiation scheme for safety verification of interconnected systems,” *European Journal of Control*, vol. 80, Part A, 101053, 2024. https://doi.org/10.1016/j.ejcon.2024.101053

[12] D. Melicher, Y. Shi, A. Potanin, and J. Aldrich, “A Capability-Based Module System for Authority Control,” in *31st European Conference on Object-Oriented Programming (ECOOP 2017)*, LIPIcs, vol. 74, Article 20, pp. 20:1--20:27, 2017. https://doi.org/10.4230/LIPIcs.ECOOP.2017.20

[13] J. Kramer and J. Magee, “Dynamic Configuration for Distributed Systems,” *IEEE Transactions on Software Engineering*, vol. 11, no. 4, pp. 424--436, 1985.

---

## Canonical publication note

本文是 Global Computation Methodology Series 的正式 Paper-03 v0.2。本文中的 route / executor / bridge / authority semantics 應與 Series-00 v0.2、Paper-01 v0.2 與 Paper-02 v0.2 一致。後續若調整 route schema、authority types 或 bridge contracts，必須透過 explicit versioned specification 更新，不得以 ordinary Runtime policy change 偷偷修改 Foundation semantics。正式 source 必須保持 UTF-8 Markdown，數學只使用 ` $...$ ` 與 `$$...$$` canonical delimiters。
