# 可執行語義圖：脫離原始碼後的程式重建與再執行

**Executable Semantic Graph: Program Reconstruction and Re-Execution Beyond Source Code**

**系列：** 程式底空間與本體反演系列（Program Base Space and Ontology Inversion, PBSOI）  
**篇次：** Paper 05  
**版本：** v0.1  
**作者：** Neo.K  
**機構：** EveMissLab  
**日期：** 2026-09-14  
**狀態：** 執行模型理論初稿／PoC 理論化版本

**公司：** 一言諾科技有限公司  

---

## 摘要

前述 PBSOI 系列已依序建立程式底空間、程式碼誘導語義圖、程式本體反演與共通程式底空間。這些工作仍可被理解為分析層：程式碼被轉換成圖，圖被用來理解、比較或驗證程式。然而，若圖只是輔助理解的衍生物，則原始碼仍然保有最終的執行特權。本文進一步提出更強的問題：**若一個語義圖已保存足夠的控制、資料、狀態、效果與操作語義，那麼程式是否可以在原始碼被移除後，直接由圖重新執行？**

本文提出「可執行語義圖」（Executable Semantic Graph, ESG），將其定義為具備完整或條件完整執行語義的程式圖。本文區分分析圖與執行圖，提出操作節點、控制節點、狀態節點、資料邊、效果邊、入口與出口、執行環境契約、錯誤語義及外部邊界等必要結構，並建立圖執行器：

$$
\mathcal E_G
:
(G,X,\Omega)
\rightarrow
Y
$$

其中 $G$ 為語義圖、 $X$ 為輸入、 $\Omega$ 為執行環境， $Y$ 為輸出與效果。

本文進一步形式化「source-independent execution」：若原始程式 $C_L$ 被反演為圖 $G$，且在指定語境 $\mathcal C$ 下滿足：

$$
\forall x\in X_{\mathcal C},
\quad
\operatorname{Exec}_L(C_L,x)
\equiv_{\mathcal C}
\mathcal E_G(G,x)
$$

則稱 $G$ 在 $\mathcal C$ 下為 $C_L$ 的可執行語義重建。此等價不要求圖保存原始變數名稱、原始語法或函式庫拼寫，只要求保留所宣告的語義不變量。

本文同時討論可執行語義圖與 SSA、IR、bytecode、dataflow runtime、workflow graph 的關係，並強調本研究不主張所有程式都應改以圖執行，也不主張任意 CISG 都天然可執行。真正的研究問題是：**哪些程式語義是執行所必需、哪些只是表面資訊、哪些可以被正規化、哪些必須保留為語言特定殘差或外部執行契約？**

本系列先前的小型 PoC 已在受限 Python 語義子集中完成兩項測試：一個包含算術、局部狀態與條件分支的函式，以及 RepoLumen 的 `_transition_id` 函式，均可由原始碼自動轉換為語義圖，之後在獨立 runtime 目錄中移除 compiler 與原始函式 source，只載入圖與 generic graph runtime 重新執行；隨機測試分別達到 $10000/10000$ 與 $1000/1000$ 一致。本文將此結果視為「受限語義可脫離原始碼執行」的存在性證據，而非任意程式可完全圖化執行的普遍證明。

本文的核心命題是：

> **若程式語義可以被完整或條件完整地保存於一個可驗證結構中，那麼原始碼可以從「唯一執行來源」退化為「程式語義結構的一種投影與編輯介面」。**

---

## 關鍵詞

可執行語義圖、Executable Semantic Graph、ESG、程式底空間、CISG、程式本體反演、Graph Runtime、語義執行、source-independent execution、跨語言執行、語義重建、中介表示

---

# 一、問題的提出

## 1.1 圖如果只能看，仍然不是程式

前述 CISG 可將 repository 轉換為：

$$
G_C
=
(V,E,T_V,T_E,A,Q,\Gamma)
$$

並用於：

- 程式理解；
- dependency analysis；
- change impact；
- anomaly detection；
- function motif；
- architecture comparison。

但若執行時仍必須回到：

$$
C_L
$$

則圖的地位仍然是：

$$
\text{Derived View}
$$

而非：

$$
\text{Executable Representation}
$$

因此一個更強的問題自然出現：

$$
\boxed{
\text{Graph 能否不依賴原始碼直接執行？}
}
$$

---

## 1.2 這個問題其實不是「圖能不能執行」

現有世界早已有：

- dataflow graph；
- computation graph；
- workflow graph；
- bytecode graph；
- automata；
- state machine；
- Petri net；
- TensorFlow graph；
- compiler IR。

所以「圖可以執行」本身毫不新奇。

本文真正研究的是：

> **由既存程式碼反演出的語義圖，能否在去除原始碼後仍保持足夠語義，使其成為同一程式的另一個可執行投影？**

也就是：

$$
C_L
\xrightarrow{\rho_L}
G
\xrightarrow{\mathcal E_G}
Y
$$

而中間可以：

$$
\cancel{C_L}
$$

---

# 二、分析圖與執行圖的區分

## 2.1 分析圖

一般 CISG 可以只保存：

- function；
- call；
- module；
- dependency；
- branch hint；
- effect hint。

此時：

$$
G_{\mathrm{analysis}}
$$

可能足以回答：

> 哪個函式呼叫哪個函式？

但不足以回答：

> 給定輸入 $x$，實際應算出什麼？

---

## 2.2 執行圖

定義可執行語義圖：

$$
G_E
=
(
V_E,
E_E,
\Sigma_E,
\Omega_E,
\Lambda_E,
\Gamma_E
)
$$

其中：

- $V_E$：可執行節點；
- $E_E$：具執行語義的邊；
- $\Sigma_E$：狀態與環境；
- $\Omega_E$：操作集合；
- $\Lambda_E$：控制與排程規則；
- $\Gamma_E$：證據、來源、版本與語義契約。

只有當：

$$
\operatorname{Semantics}(G_E)
$$

足以決定執行時，圖才是 ESG。

因此：

$$
\boxed{
\text{CISG}
\not\Rightarrow
\text{ESG}
}
$$

但可以存在轉換：

$$
\operatorname{Lower}_{E}
:
G_C
\rightarrow
G_E
$$

---

# 三、可執行語義圖的基本元素

## 3.1 輸入節點

定義：

$$
V_{\mathrm{input}}
$$

表示外部提供的值。

例如：

$$
v_0=\operatorname{Arg}(0)
$$

---

## 3.2 常數節點

$$
v_c
=
\operatorname{Const}(c)
$$

例如：

$$
\operatorname{Const}(10)
$$

---

## 3.3 操作節點

定義：

$$
o
\in
\Omega_E
$$

例如：

$$
\operatorname{ADD}
$$

$$
\operatorname{MUL}
$$

$$
\operatorname{GT}
$$

$$
\operatorname{SHA256}
$$

$$
\operatorname{UTF8}
$$

重要的是：

$$
\operatorname{SHA256}
$$

不必等同於 Python 的：

```text
hashlib.sha256
```

或 Rust 的：

```text
Sha256::digest
```

它是一個正規化操作語義。

---

## 3.4 控制節點

例如：

$$
\operatorname{Branch}(c,t,f)
$$

表示：

$$
c=\text{true}
\Rightarrow
t
$$

$$
c=\text{false}
\Rightarrow
f
$$

也可以有：

$$
\operatorname{Loop}
$$

$$
\operatorname{Switch}
$$

$$
\operatorname{Try}
$$

$$
\operatorname{Throw}
$$

$$
\operatorname{Return}
$$

---

## 3.5 狀態節點

純函式圖可以只處理：

$$
x\rightarrow y
$$

但現實程式大量依賴狀態：

$$
S_t
\rightarrow
S_{t+1}
$$

因此 ESG 必須能表示：

$$
\operatorname{Read}(S,k)
$$

$$
\operatorname{Write}(S,k,v)
$$

$$
\operatorname{Mutate}(S,\phi)
$$

---

## 3.6 效果節點

例如：

$$
\operatorname{FileWrite}
$$

$$
\operatorname{DBQuery}
$$

$$
\operatorname{NetworkRequest}
$$

$$
\operatorname{SpawnProcess}
$$

這些操作不能只被當作普通純函式。

因此：

$$
\Omega_E
=
\Omega_{\mathrm{pure}}
\cup
\Omega_{\mathrm{state}}
\cup
\Omega_{\mathrm{effect}}
$$

---

# 四、圖執行器

## 4.1 基本形式

定義：

$$
\mathcal E_G
:
(G,X,\Sigma,\Omega)
\rightarrow
(Y,\Sigma',F)
$$

其中：

- $G$：可執行語義圖；
- $X$：輸入；
- $\Sigma$：初始狀態；
- $\Omega$：允許操作與執行環境；
- $Y$：輸出；
- $\Sigma'$：執行後狀態；
- $F$：外部效果。

因此程式執行不是只有：

$$
x\rightarrow y
$$

更完整是：

$$
(X,\Sigma)
\rightarrow
(Y,\Sigma',F)
$$

---

## 4.2 純運算模式

對純函式：

$$
\mathcal E_G(G,x)
=
y
$$

可直接沿 dependency 執行。

---

## 4.3 控制流模式

若存在 branch：

$$
b
=
\operatorname{GT}(x,10)
$$

則：

$$
b
\rightarrow
\operatorname{Branch}
$$

並依條件啟用不同子圖。

---

## 4.4 狀態機模式

對 stateful 程式：

$$
(G,\Sigma_t)
\rightarrow
\Sigma_{t+1}
$$

執行器必須保存：

- write order；
- transaction；
- rollback；
- visibility；
- synchronization。

---

# 五、Source-Independent Execution

## 5.1 定義

給定 source：

$$
C_L
$$

反演：

$$
\rho_L(C_L)=G
$$

若存在語境：

$$
\mathcal C
$$

使：

$$
\forall x\in X_{\mathcal C},
\quad
\operatorname{Exec}_L(C_L,x)
\equiv_{\mathcal C}
\mathcal E_G(G,x)
$$

則稱：

$$
G
$$

是 $C_L$ 在 $\mathcal C$ 下的**可執行語義重建**。

---

## 5.2 原始碼移除條件

真正的 source-independent experiment 應要求：

1. 圖已生成；
2. compiler / parser 不參與 runtime；
3. 原始函式 source 不存在於 runtime package；
4. runtime 只讀取 canonical graph；
5. 輸出與指定語義一致。

因此：

$$
C_L
\rightarrow
G
\rightarrow
\cancel{C_L}
\rightarrow
\mathcal E_G(G)
$$

才是真正有意義的測試。

---

# 六、語義等價不是字串等價

## 6.1 不需要保存原變數名稱

例如：

```text
base
```

可以消失。

圖只需要保存：

$$
v_7
$$

以及：

$$
v_7
=
\operatorname{ADD}
(
\operatorname{MUL}(v_0,3),
v_1
)
$$

只要 variable name 不影響語義：

$$
\text{Name Preservation}
$$

不是必要條件。

---

## 6.2 不需要保存原 library spelling

例如：

```text
hashlib.sha256
```

可正規化為：

$$
\operatorname{SHA256}
$$

因此：

$$
\text{Surface API Identity}
\neq
\text{Semantic Operation Identity}
$$

---

## 6.3 必須保存不可忽略語義

例如：

- overflow；
- integer width；
- evaluation order；
- error behavior；
- ownership；
- effects。

若這些會影響所宣告的等價語境，就不能消失。

---

# 七、第一輪 PoC

## 7.1 Arithmetic + Branch

第一個實驗包含：

- 兩個輸入；
- local intermediate；
- multiplication；
- addition；
- comparison；
- conditional branch；
- two returns。

source 被轉成語義圖後，graph runtime 直接執行。

隨機測試：

$$
10000/10000
$$

與原函式一致。

---

## 7.2 RepoLumen `_transition_id`

第二個實驗採用 RepoLumen 真實函式：

```text
_transition_id(from_snapshot_id, to_snapshot_id)
```

其行為被反演為：

$$
\operatorname{ARG}_0
\rightarrow
\operatorname{STR}
$$

$$
\operatorname{ARG}_1
\rightarrow
\operatorname{STR}
$$

$$
(\operatorname{ARG}_0,"\backslash0",\operatorname{ARG}_1)
\rightarrow
\operatorname{CONCAT}
$$

再：

$$
\operatorname{UTF8}
\rightarrow
\operatorname{SHA256}
\rightarrow
\operatorname{HEX}
\rightarrow
\operatorname{SLICE}_{0:24}
\rightarrow
\operatorname{PREFIX}(\text{"hist\_"})
$$

隨機測試：

$$
1000/1000
$$

一致。

---

## 7.3 物理隔離測試

另外建立 runtime-only directory，其中只有：

- graph runtime；
- graph JSON；
- runner。

不包含：

- source compiler；
- AST compiler；
- original function source。

圖仍可產生預期輸出。

因此至少在此受限語義子集中：

$$
\boxed{
C
\rightarrow
G
\rightarrow
\cancel{C}
\rightarrow
E(G)
}
$$

實驗成立。

---

# 八、PoC 證明了什麼，沒有證明什麼

## 8.1 已支持

PoC 支持：

$$
\exists
\mathcal S
$$

其中 $\mathcal S$ 是某個非平凡程式語義子集，使：

$$
C
\rightarrow
G
\rightarrow
E(G)
$$

可在 source 移除後保持行為。

---

## 8.2 尚未支持

它尚未證明：

$$
\forall C,
\quad
\exists G
$$

可完全忠實執行任意程式。

尤其尚未完整處理：

- aliasing；
- pointer；
- closures；
- generator；
- coroutine；
- reflection；
- dynamic dispatch；
- concurrency；
- signal；
- external I/O；
- native extension；
- undefined behavior；
- self-modifying code。

所以本文主張的是存在性與研究方向，而不是已完成 universal graph machine。

---

# 九、SSA 與 ESG

## 9.1 SSA 的重要性

若：

```text
x = x + 1
x = x * 2
```

直接以 mutable variable 表示，資料關係較模糊。

SSA 可改為：

$$
x_1
=
\operatorname{ADD}(x_0,1)
$$

$$
x_2
=
\operatorname{MUL}(x_1,2)
$$

使 dependency 明確。

---

## 9.2 Phi Node

對 branch：

$$
x_1=f(a)
$$

或：

$$
x_2=g(a)
$$

合併：

$$
x_3
=
\phi(x_1,x_2)
$$

因此：

$$
\operatorname{PHI}
$$

可以成為 ESG 的基本 operation。

---

# 十、記憶體與別名

## 10.1 Value Graph 不足以描述真實程式

若：

```text
a = obj
b = obj
b.x = 3
```

則：

$$
a
$$

與：

$$
b
$$

可能指向同一 state region。

因此必須表示：

$$
\operatorname{Alias}(a,b)
$$

或更一般：

$$
\operatorname{PointsTo}(v,S)
$$

---

## 10.2 Memory State

可定義：

$$
M_t
$$

則 load：

$$
(v,M_t)
\xrightarrow{\operatorname{LOAD}}
x
$$

store：

$$
(M_t,a,v)
\xrightarrow{\operatorname{STORE}}
M_{t+1}
$$

---

## 10.3 語言特定記憶體殘差

Rust borrow rule、C raw pointer、GC reference 不應被全部壓成同一個 generic memory edge。

所以 ESG 應容許：

$$
M_{\mathrm{common}}
+
M_L^{\mathrm{specific}}
$$

與 Paper 04 的 CPBS 一致。

---

# 十一、效果系統

## 11.1 純計算與效果必須區分

$$
f(x)
=
x+1
$$

與：

$$
f(x)
=
\operatorname{WriteFile}(x)
$$

不能只看輸入輸出形狀。

因此可設：

$$
\operatorname{EffectType}(v)
$$

例如：

- pure；
- state；
- I/O；
- network；
- database；
- nondeterministic；
- privileged。

---

## 11.2 Effect Boundary

若 ESG 到達：

$$
B_{\mathrm{network}}
$$

則 runtime 必須有合法 adapter：

$$
A_{\mathrm{network}}
$$

否則：

$$
\mathcal E_G
$$

應停止或進入模擬模式。

---

# 十二、執行環境契約

## 12.1 ESG 不是自足宇宙

即使沒有 source，仍然需要：

$$
\Omega
$$

表示執行環境。

例如 SHA256 的語義可以由 runtime primitive 提供。

---

## 12.2 Primitive Contract

對 operation：

$$
o
$$

需要：

$$
K(o)
=
(
\text{input type},
\text{output type},
\text{effect},
\text{failure},
\text{determinism}
)
$$

---

## 12.3 未註冊操作

若圖包含：

$$
o^\ast
$$

但：

$$
o^\ast
\notin
\Omega
$$

則：

$$
\mathcal E_G(G)
$$

不得偷偷猜測。

應返回：

$$
\operatorname{UnresolvedOperation}(o^\ast)
$$

---

# 十三、例外與錯誤語義

## 13.1 Error 不是一般 Return

若原語言：

```text
raise Error
```

不能簡單正規化成：

$$
\operatorname{Return}(\text{Error})
$$

除非語境允許。

---

## 13.2 Error Edge

可以表示：

$$
o
\xrightarrow{\mathrm{error}}
h
$$

其中：

$$
h
$$

是 handler。

若無 handler：

$$
o
\xrightarrow{\mathrm{error}}
B_{\mathrm{uncaught}}
$$

---

# 十四、並行與時間

## 14.1 順序圖不足以描述並行

若：

$$
A
\parallel
B
$$

則不能強制建立：

$$
A\rightarrow B
$$

或：

$$
B\rightarrow A
$$

---

## 14.2 Happens-Before

可加入：

$$
A
\prec_{\mathrm{hb}}
B
$$

表示 happens-before。

---

## 14.3 排程器

可執行圖需要：

$$
\Lambda_E
$$

指定：

- deterministic schedule；
- cooperative schedule；
- thread runtime；
- event loop；
- distributed scheduler。

---

# 十五、圖本身能否成為 Canonical Source

## 15.1 弱版本

弱版本主張：

> 圖可以作為可執行 artifact，但 source 仍是 canonical source。

即：

$$
C
\rightarrow
G
$$

---

## 15.2 強版本

強版本主張：

$$
G^\ast
$$

成為 canonical program ontology。

各種語言只是：

$$
\pi_L(G^\ast)
$$

於是：

$$
G^\ast
\rightarrow
C_{\mathrm{Python}}
$$

$$
G^\ast
\rightarrow
C_{\mathrm{Rust}}
$$

$$
G^\ast
\rightarrow
C_{\mathrm{WASM}}
$$

---

## 15.3 本文目前只支持條件版本

本文不直接宣稱：

$$
G^\ast
$$

已足以取代所有 source。

目前只提出：

$$
\boxed{
\text{在可明確指定語義子集與執行契約下，圖可成為獨立執行來源。}
}
$$

---

# 十六、從 ESG 再生成原始碼

## 16.1 Reprojection

若：

$$
G_E
$$

保存足夠語義，可定義：

$$
\pi_L
:
G_E
\rightarrow
C_L
$$

---

## 16.2 不要求原樣重建

若原始碼：

```text
a = x + 1
```

重建為：

```text
result = 1 + x
```

在指定交換律語境下仍可能等價。

所以：

$$
\operatorname{Reproject}(G)
\neq
\operatorname{RecoverOriginalText}(C)
$$

---

## 16.3 Text Identity 與 Program Identity

因此：

$$
C_1\neq C_2
$$

但可能：

$$
\rho(C_1)
\equiv
\rho(C_2)
$$

這再次支持：

$$
\text{Program Identity}
\neq
\text{Source Text Identity}
$$

---

# 十七、可執行語義圖的驗證

## 17.1 Differential Execution

給定原程式與圖：

$$
C
$$

與：

$$
G
$$

生成測試：

$$
X_T
$$

比較：

$$
\operatorname{Exec}(C,x)
$$

與：

$$
\mathcal E_G(G,x)
$$

---

## 17.2 Property-Based Testing

可大量生成：

$$
x_i
$$

驗證：

$$
\forall i,
\quad
P(
\operatorname{Exec}(C,x_i),
\mathcal E_G(G,x_i)
)
$$

---

## 17.3 Symbolic Equivalence

對受限語義子集，可進一步研究：

$$
\operatorname{SMT}
$$

或 symbolic execution。

---

## 17.4 Effect Equivalence

不只比較 return value：

$$
Y_C=Y_G
$$

還要比較：

$$
F_C
\equiv
F_G
$$

與：

$$
\Sigma_C'
\equiv
\Sigma_G'
$$

---

# 十八、ESG 與傳統 IR 的差異

## 18.1 相似處

ESG 與 compiler IR 都可能具有：

- SSA；
- basic block；
- typed op；
- control flow；
- effect。

---

## 18.2 差異處

ESG 額外強調：

- provenance；
- source-independent knowledge identity；
- uncertainty；
- unresolved boundary；
- multi-language normalization；
- ontology inversion；
- re-projection；
- human / AI semantic inspection。

因此 ESG 的目標不是只服務：

$$
\text{Compilation}
$$

而是同時服務：

$$
\text{Execution}
+
\text{Understanding}
+
\text{Verification}
+
\text{Transformation}
$$

---

# 十九、安全與治理

## 19.1 圖執行不應直接獲得所有能力

效果節點應受：

$$
\operatorname{Capability}
$$

控制。

例如：

$$
\operatorname{FileDelete}
$$

必須具有：

$$
\operatorname{Cap}_{\mathrm{filesystem-delete}}
$$

---

## 19.2 Graph Signing

可定義：

$$
\operatorname{Sign}(G,\operatorname{ID}(G))
$$

確保：

- 圖未被修改；
- runtime 知道版本；
- source-to-graph provenance 可追溯。

---

## 19.3 Graph Mutation

若 runtime 或 AI 修改：

$$
G
\rightarrow
G'
$$

應產生：

$$
\Delta G
$$

並重新驗證。

---

# 二十、可證偽條件

## 20.1 行為不可保存

若對一個明確受限語義子集，反演後的圖仍無法在合理實作下保持：

$$
\operatorname{Exec}(C)
\equiv
\mathcal E_G(G)
$$

則 ESG 的可執行重建命題在該子集失敗。

---

## 20.2 必須攜帶原 source 才能執行

若 runtime 實際上仍需要：

- original source；
- AST parser；
- language runtime eval；

才能工作，則不能稱 source-independent execution。

---

## 20.3 正規化破壞語義

若：

$$
N(G)
$$

為了跨語言統一而改變：

- overflow；
- ordering；
- effects；
- errors；
- state；

則可執行共同圖失敗。

---

## 20.4 Graph runtime 成本失控

若：

$$
T_G
\gg
T_C
$$

且無法透過 compilation / JIT / graph optimization 改善，ESG 可能只適合作為 analysis IR，而非 runtime representation。

---

# 二十一、核心命題

## 命題 1：條件可執行命題

存在非平凡程式子集：

$$
\mathcal S
$$

使：

$$
C\in\mathcal S
\Rightarrow
\exists G:
\mathcal E_G(G)
\equiv
\operatorname{Exec}(C)
$$

---

## 命題 2：原始碼可移除命題

對符合條件的 $G$：

$$
C
\rightarrow
G
\rightarrow
\cancel{C}
\rightarrow
E(G)
$$

可以成立。

---

## 命題 3：語義而非文字保存命題

執行等價不要求：

$$
\text{TextIdentity}
$$

而要求：

$$
\text{SemanticInvariantPreservation}
$$

---

## 命題 4：CISG 非天然可執行命題

$$
G_C
\not\Rightarrow
G_E
$$

需要額外 lowering、operation semantics 與 runtime contract。

---

## 命題 5：效果一級化命題

$$
\text{Effects}
$$

必須作為執行語義一級結構，而不是附註。

---

## 命題 6：執行環境顯式命題

$$
\mathcal E_G
$$

必須顯式依賴：

$$
\Omega
$$

而非假設所有 primitive 自然存在。

---

## 命題 7：可再投影命題

若 $G_E$ 語義足夠完整，可以研究：

$$
G_E
\rightarrow
C_L
$$

使 source 成為圖的可生成投影。

---

## 命題 8：圖可成為程式工件命題

在受限條件下：

$$
G_E
$$

可以不再只是程式分析結果，而成為：

$$
\boxed{
\text{Executable Program Artifact}
}
$$

---

# 二十二、後續工程路線

下一階段應依序加入：

1. SSA；
2. explicit data-flow；
3. explicit state region；
4. error edges；
5. effect typing；
6. external capability contract；
7. alias / points-to；
8. async / concurrency subset。

測試應逐步從：

$$
\text{pure deterministic functions}
$$

擴張到：

$$
\text{stateful deterministic programs}
$$

再到：

$$
\text{bounded effects}
$$

最後才碰：

$$
\text{dynamic / concurrent systems}
$$

---

# 二十三、與下一篇的關係

Paper 06 將研究：

$$
D(G_C)
\rightarrow
\Delta
$$

即：

> 當程式已經被恢復成結構圖後，哪些 Bug、異常與架構缺陷可以直接變成圖論、約束求解與狀態可達性問題？

Paper 05 建立：

$$
G
$$

可以具有真正執行語義。

Paper 06 則進一步利用：

$$
G
$$

作為缺陷計算的直接輸入。

---

# 二十四、結論

本文提出「可執行語義圖」ESG，研究由程式碼反演出的語義結構在何種條件下可以脫離原始碼獨立執行。

本文不主張：

$$
\text{所有原始碼都應消失}
$$

也不主張：

$$
\text{所有 CISG 都可直接執行}
$$

而是建立一個更精確的命題：

$$
\boxed{
\text{只要一個結構保存了執行所需的充分語義，它就可以成為程式的獨立執行表示。}
}
$$

因此：

$$
C_L
\xrightarrow{\rho_L}
G_E
\xrightarrow{\mathcal E_G}
(Y,\Sigma',F)
$$

可以成為一條完整程式路徑。

在此架構中，原始碼的角色開始改變。

它仍然可以是：

- 人類編輯面；
- diff 介面；
- 版本控制工件；
- 語言生態接口；
- debugging surface。

但它不再必然是：

$$
\boxed{
\text{唯一可執行本體}
}
$$

如果後續研究能進一步證明不同語言可以：

$$
C_A
\rightarrow
G^\ast
\rightarrow
C_B
$$

並且：

$$
G^\ast
$$

本身可執行，那麼程式語言在整個計算體系中的位置將發生根本變化：

$$
\text{Programming Language}
$$

將逐步由：

$$
\text{Program Ontology}
$$

轉化為：

$$
\boxed{
\text{Program Ontology 的投影、編輯與交互介面}
}
$$

而可執行語義圖則可能成為連接：

$$
\text{理解}
,
\text{驗證}
,
\text{轉譯}
,
\text{執行}
$$

的共同結構層。

---

# 參考與前置理論

1. Neo.K，《程式底空間：從原始碼表徵到計算關係的存在層》，PBSOI Paper 01。
2. Neo.K，《程式碼誘導語義圖：由實作生成而非由設計繪製的程式節點圖》，PBSOI Paper 02。
3. Neo.K，《程式本體反演：從可執行投影重建可觀測程式本體》，PBSOI Paper 03。
4. Neo.K，《共通程式底空間：跨語言語義正規化與表徵收斂》，PBSOI Paper 04。
5. Neo.K，《多重投影程式論：原始碼不再是程式本體》。
6. Neo.K，《從程式碼到意圖：程式概念的歷史轉換與後文本時代》。
7. Neo.K，《基本計算單位的歷史轉換：從指令、函數到張量、意圖與世界狀態》。
8. EveMissLab，Semantic Graph PoC v0.1。
9. EveMissLab，CISG RepoLumen PoC v0.1。
