受控执行的代数语义:幺半范畴、效应代数与共同边界
Algebraic Semantics of Governed Execution: Monoidal Categories, Effect Algebras, and Coterminous Boundaries
AI总结:
提出一种基于交互树和参数化余归纳的受控执行代数语义,通过三公理治理代数记录诱导对称幺半范畴,实现程序的可组合治理与可表达性等价。
摘要:
我们提出了一种受控执行的代数语义,其中治理被公理化、可组合且与可表达性共同存在。该框架在32个Rocq模块中机械化(约12,000行代码,454个定理,0个待定),基于交互树和参数化余归纳。一个三公理治理代数记录(安全性、透明性、恰当性)诱导出一个对称幺半范畴,具有经过验证的五边形、三角形和六边形一致性,其中每个张量组合都保持治理。一个代数效应系统约束处理子代数,使得在安全片段中只能构造保持治理的处理子;空能力集内的程序可证明仅发出可观察性指令。能力索引的组合将程序与机器检查的能力边界捆绑在一起,一个双重保证定理确立了在全体组合算子下within_caps和gov_safe同时成立。最终结果是共同边界:在我们的形式模型中,每个通过四个原始态射构造子可表达的程序在解释下都是受控的,且每个受控程序都是这样一个程序的像。图灵完备性在治理内部得以保留;无中介的I/O被排除在受控片段之外。治理拒绝被建模为安全的余归纳发散。治理代数是参数化的:任何实例化三个公理的系统都继承所有派生性质,包括收敛性、组合封闭性和目标保持性。提取的OCaml代码作为NIF在BEAM运行时中运行,通过基于属性的测试(70,000+随机输入,零分歧)确认了规范与运行时解释器之间的行为等价性。
英文摘要:
We present an algebraic semantics for governed execution in which governance is axiomatized, compositional, and coterminous with expressibility. The framework, mechanized in 32 Rocq modules (~12,000 lines, 454 theorems, 0 admitted), is built on interaction trees and parameterized coinduction. A three-axiom GovernanceAlgebra record (safety, transparency, properness) induces a symmetric monoidal category with verified pentagon, triangle, and hexagon coherence, where every tensor composition preserves governance. An algebraic effect system constrains the handler algebra so that only governance-preserving handlers can be constructed in the safe fragment; programs in the empty capability set provably emit only observability directives. Capability-indexed composition bundles programs with machine-checked capability bounds, and a dual guarantee theorem establishes that within_caps and gov_safe hold simultaneously under all composition operators. The capstone result is the coterminous boundary: within our formal model, every program expressible via the four primitive morphism constructors is governed under interpretation, and every governed program is the image of such a program. Turing completeness is preserved inside governance; unmediated I/O is excluded from the governed fragment. Governance denial is modeled as safe coinductive divergence. The governance algebra is parametric: any system instantiating the three axioms inherits all derived properties, including convergence, compositional closure, and goal preservation. Extracted OCaml runs as a NIF in the BEAM runtime, with property-based testing (70,000+ random inputs, zero disagreements) confirming behavioral equivalence between the specification and the runtime interpreter.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。