paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Random testing of a higher-order blockchain language (experience report)

高阶区块链语言的随机测试(经验报告)
ICFP 6(ICFP)2022匹配度 2/10 · 论文是使用 QuickChick 对高阶区块链语言实现进行随机测试的工业经验报告,涉及类型安全与编译器分析可靠性,属于 PL/形式化验证/测试范畴,但与用户核心关注的 LLM×静态分析、Agentic 程序分析、浮点或贝叶斯程序分析无直接关联。仅在“PL 理论形式化+工程落地”这一泛化兴趣上有微弱交集。引用 7 inbox
Tram Hoang, Anton Trunov, Leonidas Lampropoulos, Ilya Sergey
crossref: 2026-09-10

AI 速览

一句话:报告用 QuickChick 对高阶智能合约语言实现进行基于性质的随机测试,验证类型安全与编译器分析可靠性并发现缺陷。

本文是一篇经验报告,介绍在面向现代区块链、日均用户数千的高阶智能合约语言开发中,使用基于性质的测试(property-based testing)自动生成随机输入来检验可执行程序规约。作者将建立在 Coq 证明助手上的 QuickChick 框架集成到以 OCaml 实现的真实语言实现中,讨论为混合纯函数式与命令式计算、并带运行时资源计量的高阶合约语言生成良类型程序所面临的挑战。文中描述了所测试的语言实现性质及所需语义测试框架,范围从标准类型安全到优化编译器所用控制流与类型流分析的可靠性。最后列出 QuickChick 发现和重新发现的缺陷,并讨论其严重性与潜在影响。

问题
在真实高阶智能合约语言实现中,如何通过随机生成良类型程序来有效测试类型安全与优化编译器分析的可靠性。
方法
将 Coq 上的 QuickChick 属性测试框架集成到 OCaml 语言实现,构建语义测试 harness,并生成符合语言类型与运行时资源约束的程序。
评估
对语言实现的多项属性(从标准类型安全到控制流与类型流分析可靠性)运行随机测试,报告发现的缺陷并讨论其严重性与潜在影响。
原文摘要(Abstract)

We describe our experience of using property-based testing---an approach for automatically generating random inputs to check executable program specifications---in a development of a higher-order smart contract language that powers a state-of-the-art blockchain with thousands of active daily users. We outline the process of integrating QuickChick---a framework for property-based testing built on top of the Coq proof assistant---into a real-world language implementation in OCaml. We discuss the challenges we have encountered when generating well-typed programs for a realistic higher-order smart contract language, which mixes purely functional and imperative computations and features runtime resource accounting. We describe the set of the language implementation properties that we tested, as well as the semantic harness required to enable their validation. The properties range from the standard type safety to the soundness of a control- and type-flow analysis used by the optimizing compiler. Finally, we present the list of bugs discovered and rediscovered with the help of QuickChick and discuss their severity and possible ramifications.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1510,
  title = {Random testing of a higher-order blockchain language (experience report)},
  author = {Tram Hoang and Anton Trunov and Leonidas Lampropoulos and Ilya Sergey},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {ICFP},
  year = {2022},
  doi = {10.1145/3547653}
}