arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.12981cs.SEcs.AIcs.LG
收藏

基于协议的开发:通过不变式和连续证据治理生成的软件

Protocol-Driven Development: Governing Generated Software Through Invariants and Continuous Evidence

Jun He, Deying Yu

AI总结:

本文提出了一种基于协议的开发方法,通过定义协议的不变式和连续证据来治理生成的软件,其核心贡献是将协议作为主要软件 artifact,而非代码,从而实现对生成软件的持续验证和治理。

摘要:

自动化程序合成降低了生成实现的成本,但引入了更复杂的治理问题:确定哪些生成的 artifact 是可接受的。自然语言规范存在歧义,基于示例的测试仅覆盖行为空间的一部分。单独使用这些方法无法提供足够的控制边界。我们引入了基于协议的开发(PDD),其中主要的软件 artifact 是可机器执行的协议,而非代码。我们定义协议为三元组 P = (S, B, O),指定结构、行为和操作不变式。其联合作为软件组件的可接受实现空间的定义。在 PDD 中,实现是通过受约束的搜索发现的可替换实现。只有满足协议并产生可验证的合规证据链的实现才被接受。接受基于协议的满足和记录的证据,而非对生成器的信任。对于部署的系统,我们扩展证据链为动态证据账本。运行时验证器将签名的观察、不变式检查和违规情况附加到账本中,使可监控的义务能够持续得到证明。这将实时故障回溯到生成循环中,而无需授予生成器运行时的权威。结合形式方法、属性测试、运行时验证、政策作为代码和软件可追溯性,PDD 定义了自动化软件工程的治理模型。其组织原则是代码是短暂的,而协议承载持久的权威。

英文摘要:

Automated program synthesis lowers the cost of producing implementations but introduces a harder governance problem: determining which generated artifacts are admissible. Natural-language specifications are ambiguous, and example-based tests sample only part of the behavioral space. Used alone, neither provides a sufficient control boundary. We introduce Protocol-Driven Development (PDD), where the primary software artifact is a machine-enforceable protocol rather than code. We define a protocol as the triplet P = (S, B, O), specifying structural, behavioral, and operational invariants. Their conjunction defines the admissible implementation space of a software component. Under PDD, implementations are replaceable realizations discovered through constrained search. An implementation is admitted only if it satisfies the protocol and produces a verifiable Evidence Chain of compliance. Admission is grounded in protocol satisfaction and recorded evidence rather than trust in the generator. For deployed systems, we extend the Evidence Chain into a Dynamic Evidence Ledger. Runtime verifiers append signed observations, invariant checks, and violations to the ledger, allowing monitorable obligations to be continuously attested. This connects live failures back to the generation loop without granting the generator runtime authority. Combining formal methods, property testing, runtime verification, policy-as-code, and software provenance, PDD defines a governance model for automated software engineering. Its organizing principle is that code is transient, while the protocol carries durable authority.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑