跳到正文
arXiv cs.AI· Sirui Jiang, Dongming Xiang, Shichao Wu, Yuxuan Zhou, Yihong Wu, Fangze Zhu, Wang Lin, Guanjun Liu·· 13 小时前AI 评分31

DocAuth:为形式化库的自然语言文档引入“归因”检查

Beyond Correctness: Attribution of Natural-Language Documentation for Formal Libraries

AI 导读

研究者提出 DocAuth 文档生成方法,用“归因”(attribution)判断文档语句是否依赖函数的具体行为,并为每句附上可检验的形式化性质与证据。

正文 · 原文

View PDF HTML (experimental)

Abstract:Formal languages are widely used in software engineering to specify and verify program properties. Because their mathematical notation and logic are hard to read, developers often rely on natural-language documentation to understand the functions in formal libraries. Yet a documentation statement can be provably true and still hold after the function's behavior changes. We call a statement's dependence on the function's specific behavior attribution, and we give a method to check it. We design and implement DocAuth, a documentation-generation method that uses attribution to decide what to publish and attaches to each published sentence the formal property recovered from it, together with checkable evidence. On 150 functions from the Community Books library of the ACL2 theorem prover, three large language models produce proved but non-attributable properties for about a third of the functions. DocAuth matches or exceeds the attribution rate of a mutation-based filter while delivering 37% more attributable sentences. Compared with a pipeline that checks truth alone, it raises the share of published sentences that a second model confirms as attributable from 82.9% to 94.7%. These results show that provable truth does not guarantee that documentation reflects what a function actually does. Attribution complements truth as a criterion for generating and evaluating documentation for formal libraries.
Comments: 20 pages, 9 figures, 6 tables
Subjects: Software Engineering (cs.SE); Artificial Intelligence (cs.AI)
ACM classes: D.2.4; D.2.7; I.2.7
Cite as: arXiv:2610.33094 [cs.SE]
  (or arXiv:2610.33094v1 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.2610.33094

arXiv-issued DOI via DataCite

Submission history

From: Sirui Jiang [view email]
[v1] Thu, 22 Oct 2026 07:42:17 UTC (379 KB)

来源:arXiv cs.AI · arxiv.org