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

意图形式化:在AI代理时代可靠编码的重大挑战

Intent Formalization: A Grand Challenge for Reliable Coding in the Age of AI Agents

Microsoft Research(微软研究院)

Shuvendu K. Lahiri

AI总结:

本文探讨意图形式化作为解决AI生成代码与用户意图间差距的关键挑战,提出通过形式化规范提升软件可靠性的方法,并指出验证规范的瓶颈及未来研究方向。

摘要:

代理AI系统如今能生成流畅的代码,但核心问题仍是生成代码是否符合用户意图。意图差距一直是软件工程的难题,而AI生成代码加剧了这一问题。意图形式化——将非正式意图转化为可检查的形式规范——是决定AI是否提升软件可靠性的重要挑战。该方法提供从轻量测试到领域特定语言的多种选择。验证规范是关键瓶颈,需半自动化指标通过用户交互和代理制品评估规范质量。本文综述早期研究,展示该方法的潜力,并指出未来研究挑战。

英文摘要:

Agentic AI systems can now generate code with remarkable fluency, but a fundamental question remains: \emph{does the generated code actually do what the user intended?} The gap between informal natural language requirements and precise program behavior -- the \emph{intent gap} -- has always plagued software engineering, but AI-generated code amplifies it to an unprecedented scale. This article argues that \textbf{intent formalization} -- the translation of informal user intent into a set of checkable formal specifications -- is the key challenge that will determine whether AI makes software more reliable or merely more abundant. Intent formalization offers a tradeoff spectrum suitable to the reliability needs of different contexts: from lightweight tests that disambiguate likely misinterpretations, through full functional specifications for formal verification, to domain-specific languages from which correct code is synthesized automatically. The central bottleneck is \emph{validating specifications}: since there is no oracle for specification correctness other than the user, we need semi-automated metrics that can assess specification quality with or without code, through lightweight user interaction and proxy artifacts such as tests. We survey early research that demonstrates the \emph{potential} of this approach: interactive test-driven formalization that improves program correctness, AI-generated postconditions that catch real-world bugs missed by prior methods, and end-to-end verified pipelines that produce provably correct code from informal specifications. We outline the open research challenges -- scaling beyond benchmarks, achieving compositionality over changes, metrics for validating specifications, handling rich logics, designing human-AI specification interactions -- that define a research agenda spanning AI, programming languages, formal methods, and human-computer interaction.

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

↑