全域計算方法論 v0.2
異質計算的全域一致組合:World-relative Coherence、Typed Runtime 與 Commit Semantics
Global Computation Methodology: Globally Coherent Composition of Heterogeneous Computation
- 系列:Global Computation Methodology Series
- 文件編號:Paper-01
- 版本:v0.2
- 日期:2026-08-24
- 作者:Neo.K
- 協作:Aletheia / GPT
- 狀態:第二輪正式核心論文
- Canonical anchor:Series-00 v0.2
- 編碼:UTF-8 Markdown
- 數學 delimiter:僅使用
$...$與$$...$$
摘要
現代計算系統早已不是單一處理器、單一程式模型、單一資料表示或單一時間尺度的封閉機器。CPU、GPU、FPGA、AI accelerator、edge、cloud、distributed runtime、dataflow、discrete-event simulation、continuous solver、probabilistic inference、symbolic engine 與其他 domain-specific executor 可以同時存在於一個系統中。既有 heterogeneous computing、task/dataflow runtime、actor-oriented modeling、hybrid systems、contract-based design 與 co-simulation 已分別建立大量成熟成果;因此,單純主張「異質模型可以被組合」或「Runtime 可以動態選擇執行資源」並不足以構成新的理論貢獻。
Global Computation Methodology(GCM,全域計算方法論)研究的是另一個層次的問題:在指定 World boundary 下,當不同 domain 採取不同 computational configuration、transition law、representation、resolution、resource binding、clock discipline 與 observation interface 時,如何在不要求全域同質、全域同步、all-to-all coupling 或完整物化的前提下,形成可驗證、可提交、可回退與可追溯的全域一致計算。
本文將第一輪的最小 Runtime tuple 升級為 typed formal core,明確分離 World primitive、canonical executable world state、Runtime control state、Observer state 與 Foundation version:
其中不要求這些對象彼此屬於同一 state space;上式表示其語義角色不可互相偷換。本文進一步將 local execution 從「直接修改世界」改寫為 proposal semantics:局部 executor 先產生 typed effect proposal,再由 reconciliation、global verification 與 commit gate 決定是否形成新版本 。因此:
本文定義 World-relative globality、heterogeneous local configuration、global coherence predicate、ordinary Runtime transition 與 explicit Foundation revision,並建立一組 GCM-compliant Runtime 的最低形式義務。本文不宣稱 GCM 是第 73 種計算範式,也不宣稱 24/72 configuration basis 窮盡所有計算;GCM 是位於 configuration spaces 之上的 composition methodology。
關鍵詞
Global Computation Methodology;heterogeneous computation;models of computation;runtime composition;global coherence;World boundary;typed runtime;commit semantics;observer separation;foundation versioning;computational configuration space
1. 問題設定
1.1 從「使用哪個計算模型」到「如何讓多種計算共同構成一個世界」
任何計算形式都會選擇某些 primitive。典型例子包括:
- state transition;
- tape / memory;
- actor / message;
- task / dependency;
- dataflow token;
- graph rewriting;
- differential equation;
- stochastic kernel;
- logical inference;
- quantum channel;
- database transaction;
- event / clock / scheduler。
這些 formalism 各自具有自己的優勢、限制、可驗證性與工程生態。對單一問題而言,把所有計算壓入單一 formalism 有時很有價值;但對大型、遞歸、跨域或可動態重配置的系統而言,強迫所有局部結構共享完全相同的 primitive,未必是必要條件。
因此本文不問:
哪一種計算模型應該統治全部系統?
而問:
在指定 World boundary 中,不同計算形式能否保留自身語義,同時形成一個可判定其合法性、一致性與提交結果的全域 Runtime?
GCM 的第一核心命題是:
而本文採用的正面定義是:
1.2 本文不處理什麼
本文不宣稱:
- 提出新的 Church–Turing 型可計算性定理;
- 證明存在對所有 heterogeneous systems 皆最優的 scheduler;
- 首次提出 heterogeneous Models of Computation 的組合;
- 首次提出 CPU/GPU/accelerator heterogeneous task scheduling;
- 首次提出 privilege、coherence、assume–guarantee contract、co-simulation 或 representation conversion;
- 24/72 是所有計算可能性的完整列表;
- GCM 是「第 73 種計算範式」。
本文的目標是建立一個上層方法論,使上述既有技術與其他 future executor 可以在共同的 World-relative composition semantics 下被定址、約束、驗證與追溯。
2. 相關研究與定位
2.1 Heterogeneous Models of Computation
Ptolemy II 長期研究 actor-oriented hierarchical modeling,不同 hierarchy level 可以具有不同 director,而 director 定義不同 Model of Computation。Goderis 等人更直接分析 heterogeneous composition of Models of Computation,展示 dataflow、finite-state machine 與其他 MoC 的組合條件。[1,2]
因此:
GCM 不以「可以混合不同 MoC」作為首創性主張。GCM 的問題域更寬:MoC 只是 computational configuration 的一部分;Global coherence 還包括 World boundary、Foundation、cross-domain constraints、operation type、materialization、Observer separation、active realization 與 history/provenance。
2.2 Heterogeneous task runtime
StarPU 等 heterogeneous runtime 已能管理 task dependencies、不同 CPU/GPU implementations、data transfer、asynchronous execution 與動態 scheduling。2026 年的 task-based data-flow 研究也持續處理多 accelerator APIs 的共同編排。[3,4,11]
因此:
GCM 可把這類 runtime 視為 executor/resource layer,而不是重新發明其 scheduler。
2.3 Logical regions、privileges 與 mapping separation
Legion 使用 logical regions、privileges、coherence 與 mapping interface。其重要啟示之一,是 correctness-relevant requirements 與 performance-oriented mapping 可以被分離;privilege 亦不是單純 metadata,而會約束合法存取。
GCM 吸收這個一般性教訓,但把 scope 從 memory/data region 擴張到 World-relative operation、authority 與 commit。[5,6]
2.4 Representation conversion 與 legality
MLIR Dialect Conversion 已提供 conversion target legality、type conversion、partial/full conversion、materialization 與 rollback/backtracking 等成熟機制。這說明 representation bridge 不應被當成「只要能轉格式就算成功」。
GCM 後續的 bridge contract 應公平地站在這些既有成果之上,並處理跨 executor / domain representation 的 legality、information loss 與 invariant preservation。[8]
2.5 Co-simulation 與 Scheduled Execution
FMI 3.0.2 支援 Co-Simulation、Scheduled Execution、model partitions 與 Clocks,並允許 importer scheduler 控制 model partition 的 activation。這已證明 external scheduling、partition activation 與 multi-clock coupling 具有成熟工程基礎。
因此 GCM 不宣稱 external scheduler 或 clocked partition 是新概念;Paper-04 將進一步處理 World evolution、Runtime clock、Observer time 與 commit order 的型別分離。[7]
2.6 Contract-based composition
Assume–guarantee contracts 與 contract-based design 已廣泛用於 cyber-physical systems 的 decomposition、verification、simulation 與 synthesis。近年研究仍持續發展 compositional synthesis 與 layered control contracts。
GCM 的 composition contract 將借鑑這些思想,但不把 GCM 約化成單一 contract formalism。GCM 需要同時處理 computational configuration、World-relative admissibility、authority、materialization 與 history,且允許 domain-specific proof obligations。[9,10]
2.7 Dynamic runtime composition
Dynamic Systems of Systems 的 runtime composition 已是活躍研究領域。2025 年的 systematic review 將其主要挑戰整理為 modeling / analysis、resilient operations、system orchestration 與 constituent-system heterogeneity,並指出 interoperability、cross-toolchain workflow 與 standardized evaluation 仍是重要缺口。[12]
因此 GCM 不把「系統可在 Runtime 動態發現、整合或重組 constituent systems」當作新概念。本文的區別在於:GCM 以指定 World boundary 為 coherence 判定域,並把 executable world state、Runtime control、Observer、Foundation、proposal、verification 與 commit 放進同一 typed methodology。
3. Canonical 分層:World、Runtime、Observer 與 Foundation
3.1 World primitive
令:
表示研究或系統所指定的 World primitive / ontological target。
關鍵限制是:
因此 graph、tensor、field、database、scene graph、ledger、state machine、simulation state 或 object store 都可以是對 World 的表示,但不能在沒有明示前提下被偷換成 World 本身。
3.2 Canonical executable world state
令:
表示 Runtime 在 commit/version index 下的 canonical executable world-state presentation。
這裡:
首先只是版本/提交序號。若某一 domain 的 World model 具有 physical time、logical time、simulation time 或多個 clocks,必須另外型別化,而不是把它們默默壓入 。
3.3 Runtime control state
令:
表示 Runtime control state,例如:
- scheduler state;
- routing cache;
- resource availability;
- active support;
- materialization cache;
- deferred work;
- executor health;
- checkpoint metadata;
- current policy state。
因此 Runtime 可以發生:
而不必推出:
3.4 Observer state
令:
表示 Observer-associated state,例如 focus、query context、viewport、projection parameters、requested representation 或 interaction state。
這建立:
一個純 projection / inspection operation 可以改變 ,甚至改變部分 中的 materialization cache,但若它未被明確型別為 intervention,則:
3.5 Foundation version
令:
表示 Foundation / axiom / schema / invariant-definition version。
普通 Runtime transition 必須保持:
Foundation revision 必須是 explicit、versioned operation:
因此 scheduler tuning、AI planning、ordinary executor、Observer interaction、resource optimization 或 local solver convergence 都不得偷偷修改 Foundation。
3.6 分層不可偷換
本文採用語義角色分離:
這不要求五者一定是數學上互斥的 underlying sets;要求的是 formal semantics 不得將某一層的 mutation 無標註地解釋為另一層的 mutation。
4. Globality 是 World-boundary-relative typed notion
4.1 指定 World boundary
令:
表示目前 GCM 判定 global coherence 的 World boundary。
定義:
表示 的 legality、dependency、invariant 或 commit status 必須相對 判定。
Global 不表示:
- 整個宇宙;
- 所有機器;
- 所有節點互相連線;
- all-to-all communication;
- 所有狀態同時 materialize;
- 所有 domain 共享單一 clock。
所以:
4.2 Nested globality
若:
則某 operation 可以同時:
因此 global/local 不是互斥本體類別,而是 boundary-indexed relation。
這使 GCM 可以自然處理:
- recursive sub-world;
- nested simulation;
- organization / subsystem;
- edge / cluster / cloud hierarchy;
- agent 內部子系統;
- multi-level scene / environment;
- compositional scientific models。
5. Domains 與 heterogeneous local configurations
5.1 Domain family
令:
表示版本 下 Runtime 使用的 domain family。
Domain 是 computation scope,不預設為物理空間。
因此:
可以是:
- graph substructure;
- database partition;
- logical region;
- process;
- task group;
- agent;
- service;
- physical field region;
- symbolic theory module;
- recursive sub-world;
- remote accelerator context。
5.2 Computational configuration space
令:
為 computational configuration space。
本文接受 Series-00 的:
以及:
但本文再次固定:
它們是 extensible configuration basis。
Paper-02 將正式處理 configuration space 的完整 addressing、extension rule 與 routing profile;本文只需要知道每個 domain 可以被綁定到不同 configuration。
5.3 Configuration assignment
令:
為 configuration assignment,其中 是完整 configuration record space。
最小可寫為:
其中:
- :computational form / configuration;
- :transition-law family;
- :compute resolution;
- :resource binding or resource class;
- :domain-specific execution contract reference。
完整 contract、reachability、authority 與 routing semantics 由 Paper-03 深化。
6. Local executor 不直接等於 World mutation
6.1 Proposal semantics
第一輪直觀表示常寫:
這在高層描述上仍可使用,但第二輪若要支援 heterogeneous executor、rollback、global verification 與 history,就需要把 local execution 與 canonical commit 分開。
對 domain ,定義 local executor:
接收 local view / input context,產生 effect proposal:
不是 ,而是 candidate effect / proposal。
因此:
6.2 Proposal set
令:
為當前 global step 中被選取的 proposals。
Proposals 可能:
- 作用於互斥 domains;
- 作用於重疊 domains;
- 可交換;
- 不可交換;
- 有 dependency;
- 有 priority;
- 要求 representation bridge;
- 具有不同 local time / cadence;
- 具有不同 failure modes。
因此一般不能寫成:
7. 全域一致組合
7.1 Constraints 與 couplings
令:
表示指定 World boundary 下的 constraints / couplings。
它可以包含:
- cross-domain dependency;
- overlap constraints;
- conserved quantity;
- transaction constraints;
- schema constraints;
- safety invariant;
- causal / ordering constraint;
- resource exclusivity;
- domain interface contract;
- Foundation-derived proof obligation。
注意:
不再表示 configuration;configuration 使用 。
7.2 Reconciliation
定義 reconciliation operator:
其輸入為:
輸出 candidate state:
或 conflict / rejection result。
形式上:
使用 partial map 是因為不是每組 proposals 都必然存在合法 reconciliation。
7.3 Global coherence predicate
令:
表示 candidate 是否在 Foundation 、World boundary 與 constraints 下滿足 global coherence。
其最低條件可抽象為:
這些 predicate 的具體 proof system 可以依 domain 不同而不同。GCM 不要求所有 domain 使用同一 theorem prover 或同一 verification formalism。
7.4 Global coherence 不要求 homogeneity
若:
或:
並不妨礙:
因此:
同理:
同步只是部分 Runtime 的可能策略,不是 globality 的定義。
8. Verify 與 Commit semantics
8.1 Verify 不等於 Optimization
令:
判定 candidate 是否符合 Foundation 與 World-level invariants。
這不是 optimization objective。
因此:
以及:
某一 Runtime 可以完全沒有 optimization,只要其 configuration 與 execution path 已被指定,仍可執行合法 global computation。
8.2 Commit gate
定義:
若:
且 required verification obligations 全部成立,則:
否則 canonical World state 不應因 local executor 已完成就被默默更新。
因此:
8.3 Ordinary Runtime transition
普通 Runtime transition 可以抽象為:
且 Foundation 不變:
若 candidate 被拒絕,仍可能有:
但:
或 history 中新增 failure / rejection receipt。
這一點對 debug、audit 與 adaptive routing 非常重要。
9. Operation type 與權限邊界
本文不完整展開 Paper-03 的 authority algebra,但為避免層次偷換,先固定 operation kinds:
至少必須滿足:
所以即使某 Agent 技術上可以執行某 function,也不能只因為 capability 存在就推出其具有 commit 或 Foundation revision 權限。
詳細的:
與:
由 Paper-03 正式展開。
10. GCM v0.2 typed core
Series-00 保留第一輪 compact signature:
本文採用 expanded typed core:
本文只對其中與 global composition core 直接相關者給出 formal semantics;其餘分配如下:
- 、 、 :Paper-02;
- 、 、 、executor / bridge contract:Paper-03;
- 、 、compute/observer resolution、clock/domain relativity:Paper-04;
- bounded active support / horizon / resources:Paper-05;
- 、receipt DAG、partial order、replay:Paper-06。
而且始終:
11. Computation、Observation、Materialization 的上層分離
Paper-04 將完整形式化三者,但 Paper-01 必須先固定:
令:
為 Observer projection。
則:
同時:
因此一個 globally coherent Runtime 可以只 materialize 當前 active / requested subset,而以 summary、seed、checkpoint、dependency、latent representation 或其他合法 representation 保留未展開部分。
12. History 是 Global Computation 的獨立語義層
如果 local operations 不交換:
則 execution ordering 可能具有語義。
即使:
也不能推出:
因此:
Paper-06 將完整處理 typed receipt DAG、causal order、execution order、commit order、replay、rollback 與 history quotient;本文只固定 history 不是可由 endpoint state 自動抹除的附帶資料。
13. GCM-compliant Global Step
綜合本文,單一 global step 的抽象結構可寫為:
這不是唯一實作流程;它是 semantic obligations 的 reference decomposition。
不同 Runtime 可以:
- pipeline 各階段;
- 進行 speculative execution;
- 使用 optimistic concurrency;
- 使用 deterministic scheduling;
- 使用 distributed reconciliation;
- 在部分 domain 採用 static configuration;
- 省略 optimization;
- 以 proof、test、contract、type checker 或 domain verifier 完成 verification。
只要不破壞本文的 canonical separation 與 commit semantics,就不要求實作完全相同。
14. 形式命題
以下命題作為第二輪可驗證/可反駁的核心。
命題 1:Heterogeneity Preservation
若 GCM composition 合法,則不要求:
或:
因此:
命題 2:Boundary-relative Globality
若:
則某 operation 可以:
故 globality 不是 absolute universe-wide predicate。
命題 3:Observer Non-Mutation under Projection-only Operation
對被型別為 projection-only 的 Observer operation :
應滿足:
若某觀察行為確實對 World 造成 intervention,則必須改以 World operation 明示建模,而不是保留 Observer-only 標籤。
命題 4:Foundation Constancy of Ordinary Runtime
對普通 Runtime transition:
任何 Foundation change 必須產生 explicit versioned revision。
命題 5:Local Success Does Not Entail Global Commit
即使:
若:
則:
作為 canonical commit result。
命題 6:Full Materialization Is Not Required for Global Dependency
若未 materialize domain 的全部細節,但 Runtime 仍保存足以維持 dependency、invariant 與合法重建的 representation,則:
不要求:
命題 7:Optimization Is Optional to Semantics
若 routing / execution path 已被合法指定,GCM semantics 不要求存在:
或:
故:
15. 失敗條件與可反駁性
若一個實作宣稱自己是 GCM-compliant Runtime,但出現以下情況,則至少表示本文核心尚未實現:
- World / Runtime collapse:把某個 runtime tuple 直接宣稱為 World primitive,且無 representation boundary;
- Local auto-commit:local executor success 自動成為 canonical world mutation,沒有 reconciliation / verification gate;
- Observer leakage:單純切換 viewport、query、zoom 或 projection 會無標註推進 world state;
- Foundation leakage:ordinary scheduler / optimizer / AI planner 可無版本紀錄修改 Foundation;
- Homogeneity requirement:所有 domain 必須先翻譯成同一 computational form 才能被視為 global;
- Globality inflation:把 global 說成宇宙級 all-to-all,而沒有指定 World boundary;
- Optimization collapse:將 legality、proof obligation、authority 或 history truth 全部當作一個 objective function;
- History erasure:只因 endpoint state 相同就宣稱 execution history 等價;
- Materialization collapse:把「未完整展開」等同「不存在」或「未計算」。
這些失敗條件使 GCM 不只是一組形容詞,而具有可以被 implementation test 反駁的結構。
16. Reference Runtime 的最低義務
本文不指定唯一 architecture,但任何 Reference Runtime 至少應提供以下能力或可驗證等價物:
Foundation Registry
World State Store
Runtime Control State
Domain Registry
Configuration Registry
Local Executor Interface
Constraint / Coupling Registry
Reconciliation
Verification
Commit / Reject / Rollback Boundary
Observer Projection Boundary
History / Receipt Interface
後續 TW-02 將把這些義務落成完整 Reference Runtime Architecture。
17. 與 02–06 的依賴關係
Paper-01 是整套六篇正式論文的 formal core,但不企圖獨占後續問題。
17.1 Paper-02
回答:
computational configurations 如何被系統化定址、擴張與比較?
重點是 、 、transition-law family 與 extensible configuration basis。
17.2 Paper-03
回答:
Runtime 如何決定某 configuration / executor 是否可達、可用、合法、有權並可組合?
重點是 reachability、affordance、admissibility、authority、routing、executor / bridge contracts。
17.3 Paper-04
回答:
computation、observation、materialization、resolution、clock 與 domain relativity 如何分離?
17.4 Paper-05
回答:
如何用有限 active support 承載可無界擴張的 World dependency?
17.5 Paper-06
回答:
如何保存 noncommutative execution、provenance、partial order、replay、rollback 與 Foundation lineage?
18. 討論
18.1 GCM 是 methodology,而不是 mega-model
若 GCM 強迫所有局部系統先翻譯成一個統一 mega-state machine,則它反而失去 heterogeneous composition 的價值。
GCM 的統一性主要存在於:
- addressing;
- typing;
- scope;
- composition contract;
- admissibility;
- commit semantics;
- provenance;
- governance boundary。
而不是要求所有 executor 共享一種內部數學。
18.2 全域一致不等於中央控制
本文的 global coherence predicate 不要求存在單一中央 scheduler。
未來可以研究:
- centralized reconciliation;
- distributed consensus-like commit;
- hierarchical commit;
- federated verification;
- optimistic local execution;
- decentralized contract checking。
只要最終相對指定 World boundary 的 coherence obligations 能被滿足即可。
因此:
18.3 World primitive 必須允許 domain-specific ontology
GCM 不指定所有 World 都是物理時空。
World 可以是:
- simulation world;
- software world;
- data world;
- game world;
- mathematical structure;
- physical model;
- organizational workflow;
- agent environment。
因此來自時空本體論的 temporal/spatial structure,只能在對應 World ontology 中成為 module,不得反向綁架 GCM 的一般定義。
19. 限制與未解問題
本文仍留下重要 open problems:
- Global coherence predicate 是否可分解成一般性的最小 contract algebra?
- 不同 domain verifier 的 proof evidence 如何組合?
- bridge information loss 的可接受界線如何型別化?
- 若 domains 動態產生/消失,boundary coherence 如何增量維護?
- Foundation migration 如何驗證 backward compatibility?
- distributed commit 是否需要特定 consistency model?
- speculative execution 與 rollback 的 history semantics 如何定義?
- local clock / physical time / logical time 與 commit index 如何組合?
- bounded active realization 是否可能保持語義 bounded、但 runtime cost 隨 dormant history 無界成長?
- AI Router 是否能在不取得 Foundation revision 權限的情況下自主擴張 execution strategy?
這些問題分別由 02–06、三份技術白皮書與 Reference Runtime MVP 推進。
20. 最終定義
本文將 Global Computation 定義為:
中文:
全域計算,是在指定 World boundary 下,對異質計算域進行型別化的組合、約束、一致性驗證與可追溯提交,使局部計算可以異質而整體演化仍維持指定的不變量與合法性。
因此最核心的公式不是:
而是:
這也正式確立:
GCM 是操作、組合與驗證 computational configuration spaces 的方法論,而不是在既有範式後面再增加一格。
參考文獻
- Goderis, A., Brooks, C., Altintas, I., Lee, E. A., & Goble, C. (2009). Heterogeneous composition of models of computation. Future Generation Computer Systems, 25(5), 552–560. DOI: 10.1016/j.future.2008.06.014.
- Ptolemy Project. Ptolemy II: Heterogeneous Concurrent Modeling and Design. University of California, Berkeley. https://ptolemy.berkeley.edu/ptolemyII/
- Augonnet, C., Thibault, S., Namyst, R., & Wacrenier, P.-A. (2009). StarPU: A Unified Platform for Task Scheduling on Heterogeneous Multicore Architectures. Euro-Par 2009, LNCS 5704, 863–874. DOI: 10.1007/978-3-642-03869-3_80.
- StarPU Project. StarPU: A Unified Runtime System for Heterogeneous Multicore Architectures. https://starpu.gitlabpages.inria.fr/
- Bauer, M., Treichler, S., Slaughter, E., & Aiken, A. (2012). Legion: Expressing Locality and Independence with Logical Regions. SC 2012. DOI: 10.1109/SC.2012.71.
- Legion Programming System. Overview; Logical Regions; Privileges. https://legion.stanford.edu/
- Modelica Association. Functional Mock-up Interface Specification 3.0.2. https://fmi-standard.org/docs/3.0.2/
- LLVM Project. MLIR Dialect Conversion. https://mlir.llvm.org/docs/DialectConversion/
- Yu, S.-J. (2025). Automating Contract-based Design for Cyber-Physical Systems. Technical Report UCB/EECS-2025-84, University of California, Berkeley.
- Ghasemi, K., Sadraddini, S., & Belta, C. (2024). Compositional synthesis for linear systems via convex optimization of assume-guarantee contracts. Automatica, 170, 111816. DOI: 10.1016/j.automatica.2024.111816.
- Boné, A., Aguirre, A., Álvarez, D., Martínez-Ferrer, P. J., & Beltran, V. (2026). A task-based data-flow methodology for programming heterogeneous systems with multiple accelerator APIs. Future Generation Computer Systems, 180, 108383. DOI: 10.1016/j.future.2026.108383.
- Ashfaq, M., Sadik, A. R., Das, T., Waseem, M., Mäkitalo, N., & Mikkonen, T. (2025). Runtime Composition in Dynamic System of Systems: A Systematic Review of Challenges, Solutions, Tools, and Evaluation Methods. arXiv:2510.12616.
Canonical Handoff
後續文件不得無標註破壞以下 Paper-01 核心:
若後續實驗要求修改上述定義,應先修改 Series-00 canonical anchor 並留下 explicit versioned revision。