返回全部动态

SLICE:规范级隔离的契约强制执行框架

原标题:SLICE: Specification-Level Isolation of Contract Enforcement

arXiv cs.SE一手来源研究质量 81

AI 摘要

SLICE 是一个针对代码生成中输入契约强制执行的框架,通过图结构规范分解、功能体生成和契约断言生成三个阶段,分别处理功能实现与输入条件验证。在 ContractEval 基准上,SLICE 在四个 LLM 上相比最强基线平均提升了 6.58% 的规范满足率(SSR)。该框架旨在解决生成代码时对输入契约的过度或不足强制问题。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

SLICE: Specification-Level Isolation of Contract Enforcement Abstract Programming problems commonly specify both the computation a function should perform and the conditions that its inputs must satisfy. Large language models are widely used to generate code from these problem specifications, and the generated function must implement the required computation while enforcing the stated input conditions. The stated input conditions collectively form an input contract. Enforcing this contract is di


发布时间:2026-08-25 12:00
抓取时间:2026-08-25 12:20
来源机构:arXiv
阅读原文arxiv.org