← Archive
lm-003176 · 2026-08

全域計算方法論 v0.1

下載 MD 檔 ⬇
📎 附件 · Companion files — 隨文交付的程式 / 證明 / 資料,可獨立下載重驗

全域計算方法論 v0.1

異質計算的全域一致組合:從局部作用域到世界級 Runtime

Global Computation Methodology v0.1: Globally Coherent Composition of Heterogeneous Computation

  • 編號:EML-GCM-2026-01-v0.1
  • 日期:2026-08-23
  • 作者:Neo.K
  • 協作:Aletheia / GPT
  • 狀態:定義論文 / 理論綱領 / Runtime 方法論草案
  • 邊界聲明:本文不宣稱提出新的通用可計算性定理,也不宣稱存在對所有異質系統皆最優的全域調度器。

摘要

現代計算系統已逐步從單一處理器、單一程式模型與單一資料表示,演化為 CPU、GPU、FPGA、AI accelerator、edge、cloud、sensor、distributed runtime、continuous simulation、probabilistic inference 與 quantum processing 等多種計算形式共存的環境。現有 heterogeneous computing、task scheduling、dataflow runtime 與 hybrid systems 研究已分別處理硬體異質性、任務調度、資料依賴與連續—離散混合動力等問題,但當「計算模型本身」也被視為 Runtime 可選、可切換、可嵌套的狀態時,仍需要更高層的方法論描述。

本文提出「全域計算方法論」(Global Computation Methodology, GCM)。其核心不是讓整個世界使用同一種計算,而是在指定 World boundary 下,使不同作用域可以採用不同計算形態與轉移律,再由全域約束、耦合、資源與歷史條件形成一個一致的組合演化。

本文核心命題是:

Global ComputationOne Computation Everywhere\boxed{ \text{Global Computation} \neq \text{One Computation Everywhere} }

而是:

Global Computation=Globally Coherent Heterogeneous Computation.\boxed{ \text{Global Computation} = \text{Globally Coherent Heterogeneous Computation}. }

本文提出最小 Runtime 形式:

MG=W,P,L,D,Λ,C,S,Π,H,\mathcal M_G = \langle W,\mathfrak P,\mathfrak L,\mathcal D,\Lambda,\mathcal C,\mathcal S,\Pi,\mathcal H \rangle,

並定義局部計算配置、全域組合算子、可物化支援、Observer 投影與歷史保留。本文進一步區分 globality、locality、active support、materialization、observation 與 history,主張全域一致性不要求全域同質、全域物化或 all-to-all coupling。


1. 問題設定

1.1 單一計算模型的侷限

任何成熟的計算模型都會選擇某些 primitive,例如:

  • state transition;
  • tape / memory;
  • messages;
  • actors;
  • dataflow edges;
  • differential equations;
  • stochastic kernels;
  • quantum channels。

這些模型的價值來自清楚界定其基本操作。但當系統本身包含多種不同結構時,問題就變成:

是否應強迫整個世界被翻譯成同一種 primitive 才能進行全域計算?

本文回答:不必。

全域計算可以保留異質表示,只要求跨域組合具有合法語義。


1.2 現代異質計算提供的工程背景

Heterogeneous many-core 與 accelerator programming 已長期研究如何把應用映射到不同計算資源;近年 task/dataflow runtime 更進一步把 host task、GPU kernel、accelerator invocation 統一成 runtime 可調度對象。OpenMP Cluster 等工作也直接研究 distributed heterogeneous task scheduling。這些成果證明一件事:「哪裡執行」與「何時執行」本來就可以由 Runtime 決定,而不是寫死在單一程序中。

本文在此基礎上把問題再推高一層:

除了資源映射之外,計算形態、轉移律、解析度與觀察方式是否也能成為 Runtime 的配置變量?


2. 基本對象

2.1 World

本文使用:

W\boxed{\mathbf W}

作為 World primitive。

重要的是:

W任何特定 Runtime tuple.\boxed{ \mathbf W \neq \text{任何特定 Runtime tuple}. }

Runtime 結構只是對 World 的可執行表示。

在工程層,令:

WtW_t

表示時間 tt 的可執行 world-state presentation。

2.2 Domains

令:

Dt={D1,,Dn}\mathcal D_t = \{D_1,\ldots,D_n\}

為時間 tt 下的作用域集合。

DiD_i 可以表示:

  • 一段物理場;
  • 一個資料庫區域;
  • 一個 agent;
  • 一個程序;
  • 一個圖子結構;
  • 一個幾何區域;
  • 一個遠端服務;
  • 一個 accelerator;
  • 一個 recursive sub-world。

Domain 不是本體論上的永久分割,而是 Runtime 為計算建立的作用範圍。


3. 計算形態與轉移律

令:

P\mathfrak P

為計算形態空間。

它可以由既有的 24 範式實現:

P=P24,\mathfrak P=\mathfrak P_{24},

也可以在後續版本擴張。

令:

L\mathfrak L

為轉移律族。

最小例:

L3={F,K,Q},\mathfrak L_3=\{F,K,Q\},

分別表示 deterministic function-like transition、classical stochastic kernel 與 quantum channel-like transition。

對每個 domain:

pi(t)P,i(t)L.p_i(t)\in\mathfrak P, \qquad \ell_i(t)\in\mathfrak L.

因此局部計算不是單純:

DiDi,D_i\mapsto D_i',

而是:

Φi(t)=Φ(Di,pi(t),i(t),ci(t))\boxed{ \Phi_i(t) = \Phi \left( D_i, p_i(t), \ell_i(t), c_i(t) \right) }

其中 cic_i 是局部上下文與約束。


4. 全域組合

4.1 為什麼不能只是求和

若各域演化為:

Φ1,Φ2,,Φn,\Phi_1,\Phi_2,\ldots,\Phi_n,

則全域計算一般不能寫成:

ΦG=iΦi.\Phi_G=\sum_i\Phi_i.

原因包括:

  1. domains 可能重疊;
  2. operation 可能不交換;
  3. 某些 domain 依賴其他 domain 的輸出;
  4. 某些操作受共享資源限制;
  5. 某些更新具有優先權或 transaction semantics;
  6. legality 可能取決於全域 invariant。

因此引入:

CG(t)\mathcal C_G(t)

表示全域 constraint/coupling structure。

定義:

ΦG(t)=ComposeCG(t)(Φ1(t),,Φn(t)).\boxed{ \Phi_G(t) = \operatorname{Compose}_{\mathcal C_G(t)} \left( \Phi_1(t),\ldots,\Phi_n(t) \right). }

世界演化:

Wt+1=ΦG(t)(Wt).\boxed{ W_{t+1} = \Phi_G(t)(W_t). }

4.2 Globally coherent heterogeneous computation

「heterogeneous」表示不同 domain 可以使用不同:

  • state representation;
  • computational form;
  • transition law;
  • precision;
  • hardware;
  • update cadence;
  • observation interface。

「globally coherent」表示這些差異不能破壞指定 World boundary 下的 legality、dependency 與 invariant。

因此:

pipj\boxed{ p_i\neq p_j }

完全可以與:

CoherentW(Di,Dj)\boxed{ \operatorname{Coherent}_W(D_i,D_j) }

同時成立。


5. Globality 是相對 World boundary 的 typed notion

本文拒絕把 Global 理解為絕對「全宇宙」。

給定 World boundary:

WX,\mathbf W_X,

一個操作可以滿足:

GlobalWX(U)\mathrm{Global}_{\mathbf W_X}(\mathcal U)

同時對更大結構 H\mathbf H 只是局部:

LocalH(U).\mathrm{Local}_{\mathbf H}(\mathcal U).

因此:

GlobalW(U)LocalH(U)\boxed{ \mathrm{Global}_{W}(\mathcal U) \land \mathrm{Local}_{H}(\mathcal U) }

並不矛盾。

這使 global computation 可以遞歸使用:

W0W1W2W_0 \supset W_1 \supset W_2 \supset\cdots

每一層都有自己的 globality。


6. Computation 與 Observation 分離

世界演化:

Wt+1=ΦG(Wt)W_{t+1} = \Phi_G(W_t)

Observer OO 不必取得完整 WtW_t

定義:

YO(t)=ΠO(Wt).\boxed{ Y_O(t)=\Pi_O(W_t). }

因此:

ComputationObservation.\boxed{ \text{Computation} \neq \text{Observation}. }

以及:

Local Observation⇏Local-only Computation.\boxed{ \text{Local Observation} \not\Rightarrow \text{Local-only Computation}. }

這一區分對大規模 Runtime 特別重要。若每一個觀察行為都要求重新計算世界,Observer 就不是投影,而是 computation trigger。


7. Resolution 與 Materialization

令:

λ\lambda

表示 Runtime resolution / materialization level。

同一對象在粗解析度可能只是 summary:

X(λc),X^{(\lambda_c)},

在細解析度則展開成:

Expandλf(X(λc))={x1,,xm,R}.\operatorname{Expand}_{\lambda_f} \left( X^{(\lambda_c)} \right) = \{x_1,\ldots,x_m,\mathcal R\}.

關鍵是:

Coarse RepresentationNon-existence.\boxed{ \text{Coarse Representation} \neq \text{Non-existence}. }

以及:

MaterializationComputation Start.\boxed{ \text{Materialization} \neq \text{Computation Start}. }

Runtime 可以維持 dependency、seed、checkpoint、aggregate 或 invariant,而不必把所有細節同時 materialize。


8. 有限活動支援

若世界允許無界擴張,但真實機器資源有限,則必須區分「潛在可展開空間」與「目前活動支援」。

令:

At=suppactive(Wt).A_t = \operatorname{supp}_{\mathrm{active}}(W_t).

工程要求:

At<.\boxed{ |A_t|<\infty. }

但不要求存在一個固定最大世界深度。

因此:

Finite Active Realization+Unbounded Extensibility.\boxed{ \text{Finite Active Realization} + \text{Unbounded Extensibility}. }

9. Scheduling 與 Routing

全域計算需要 routing/scheduling policy:

St.\mathcal S_t.

它決定:

  1. 哪個 domain 被激活;
  2. 使用哪個 computational form;
  3. 使用哪個 transition law;
  4. 配置到哪個 resource;
  5. 使用哪個 resolution;
  6. 哪些可以並行;
  7. 哪些必須排序;
  8. 哪些可 defer;
  9. 哪些需要 checkpoint;
  10. 哪些需要 escalation。

可寫成:

St:(Wt,Ct,Rt,Qt){(Di,pi,i,λi,ri,τi)}.\boxed{ \mathcal S_t: (W_t,\mathcal C_t,\mathcal R_t,\mathcal Q_t) \mapsto \{(D_i,p_i,\ell_i,\lambda_i,r_i,\tau_i)\}. }

10. History 與 Noncommutativity

如果:

ΦaΦbΦbΦa,\Phi_a\circ\Phi_b \neq \Phi_b\circ\Phi_a,

則 schedule 本身攜帶語義。

即使:

WT(1)=WT(2),W_T^{(1)}=W_T^{(2)},

也可能:

HT(1)HT(2).H_T^{(1)}\neq H_T^{(2)}.

因此:

State Equality⇏History Equality.\boxed{ \text{State Equality} \not\Rightarrow \text{History Equality}. }

全域 Runtime 必須允許 endpoint state 與 provenance/history 分離保存。


11. 最小 Runtime tuple

綜合以上:

MG=W,P,L,D,Λ,C,S,Π,H.\boxed{ \mathcal M_G = \langle W, \mathfrak P, \mathfrak L, \mathcal D, \Lambda, \mathcal C, \mathcal S, \Pi, \mathcal H \rangle. }

注意:

MGW.\boxed{ \mathcal M_G \neq \mathbf W. }

這是 Runtime 方法論,不是 World 的本體定義。


12. 與現有領域的關係

12.1 Heterogeneous computing

既有 heterogeneous computing 主要處理不同處理器與 accelerator 的 programming model、task mapping、communication overhead 與 scheduling。GCM 接受這些成果,但把 heterogeneity 擴張到 computational form / transition law / resolution。

12.2 Dataflow / task runtime

Dataflow 與 task graph runtime 已證明 temporal/spatial scheduling 可以由 Runtime 控制。GCM 將這種 scheduling 思想延伸到多種計算語義共存。

12.3 Hybrid systems

Hybrid systems 已長期把 continuous dynamics 與 discrete events 放在同一 formal model 內。GCM 與其關係密切,但不把 continuous/discrete coupling 當成唯一 heterogeneity。

12.4 Edge-cloud collaborative scheduling

Edge/cloud resource scheduling 顯示「where to compute」本身就是動態問題。GCM 進一步加入「how to compute」「at what resolution」「under which transition law」。


13. 可反駁命題

命題 A

若一個 heterogeneous Runtime 宣稱 active support bounded,但其每 tick cost 仍隨 dormant history 線性增長,則它尚未真正實現 bounded active computation。

命題 B

若 Observer 切換解析度必須推進 world state,則 computation/observation separation 尚未成立。

命題 C

若異質 local solvers 的結果無法在指定 World boundary 下形成 legality-preserving composition,則該系統只是 solver collection,而不是 global computation Runtime。

命題 D

若 computational form switching 沒有可追溯 state receipt,則歷史語義不可驗證。


14. 工程架構草案

World State Store
    ↓
Domain Resolver
    ↓
Computational Form Router
    ↓
Transition-Law Binder
    ↓
Resource / Resolution Scheduler
    ↓
Local Executors
    ↓
Global Constraint Reconciler
    ↓
Commit / Receipt / History
    ↓
Observer Projection

Observer 位於 commit 後的投影路徑,不應成為唯一 canonical state holder。


15. 最終定義

本文的最終定義:

Global Computation=the constraint-consistent composition and evolution of heterogeneous computational domains relative to a designated World boundary.\boxed{ \text{Global Computation} = \text{the constraint-consistent composition and evolution of heterogeneous computational domains relative to a designated World boundary}. }

中文:

全域計算,是在指定世界邊界下,對異質計算域進行受約束的一致組合與演化。

它不是第 73 種計算範式,而是操作計算範式空間的方法論。


參考文獻與相關工作

  1. Fang, J., Huang, C., Tang, T., & Wang, Z. Parallel Programming Models for Heterogeneous Many-Cores: A Survey. 2020.
  2. De Matteis, T. et al. Streaming Task Graph Scheduling for Dataflow Architectures. 2023.
  3. Taha, W. M., Taha, A.-E. M., & Thunberg, J. Hybrid Systems. 2020.
  4. Boné, A. et al. A task-based data-flow methodology for programming heterogeneous systems with multiple accelerator APIs. 2026.
  5. Towards an Optimized Heterogeneous Distributed Task Scheduler in OpenMP Cluster. IEEE SC24-W, 2024.
  6. CaRCS: Joint Optimization of Computing-Aware Routing and Collaborative Scheduling in Computing Power Networks. IEEE Network, 2025.