用可执行规范提升软件可靠性,应对AI时代的技术债务危机。
Escaping the Quicksand: A Call to Arms
- 结合代码、测试与可执行规范,实现更精准的验证反馈。
- 支持从测试到形式化证明的多层级验证,覆盖范围更广。
- 适合关注系统安全与长期维护的开发团队和研究者。
计算技术取得了惊人成功,但累积的技术债务带来了巨大的商业与社会风险。过去75年,我们通过测试与调试来实现需求规格,这种方式虽让产业持续发展,却代价高昂且效率低下,依赖脆弱的基础。如今,人工智能增强了开发能力,降低了编码成本,但也加速了技术债务积累,并自动放大了其中漏洞的风险。传统数学证明虽能覆盖所有情况,但应用困难,技术和文化上均存在障碍。本文主张采用务实策略:灵活结合测试、规格说明与形式化证明,构建更有效的反馈机制,尤其适用于人与AI协同开发。核心是增量式地共同开发可执行的、作为测试基准的部分规格说明,配合自然语言描述、代码与测试,明确设计并提升测试精度。更优方案是使用支持测试、基于属性的测试、符号执行与证明的完整规格体系,实现多层次反馈。然而,这需要成熟的语义基础设施——针对主流编程语言与其他抽象结构的规格与工具链。我们呼吁学界与工业界联合行动,共建这一基础,以构建更稳固的未来。
原文摘要 · Abstract (English)
Computing has been an astonishing success - but the accumulated technical debt exposes us all to huge costs in business and societal risk. For 75 years, we've built systems to prose specifications with test-and-debug development. That works well enough for industry to thrive, but it's an expensive and ineffective feedback loop, and leaves everyone relying on shaky foundations. Now, AI-enabled engineering is amplifying the success by reducing coding costs, but also amplifies the risks, by rapidly increasing technical debt, and by automating detection of the vulnerabilities therein. How can we do better? Research has long pursued mathematical proof of correctness, which, unlike testing, can cover all cases. This too has advanced massively, but it remains hard to apply, both technically and because of a deep-seated cultural disconnect. Instead, we argue for a pragmatic approach to flexible combinations of testing, *specification*, and proof, that provides more effective feedback loops for both AI and human development. Most simply, one can incrementally co-develop executable-as-test-oracle partial specifications alongside conventional prose descriptions, code, and tests. This clarifies design and makes testing much more discriminating. Developers can and should do it today. Or, even better, one can use specifications that support the full gamut of testing, property-based testing, symbolic execution, and proof. This enables a range of intertwined feedback loops, again both for AI and humans, from cheap testing to more expensive proof. However, making it really practical needs *semantics infrastructure*: specifications and tooling for the main programming languages and other abstractions, which we now more-or-less know how to build, but which is not yet in place. We call the community to arms to create and deploy it - to enable a future built on firmer ground.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。