paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Feature-Sensitive Coverage for Conformance Testing of Programming Language Implementations

面向编程语言实现一致性测试的特征敏感覆盖
PLDI 7(PLDI)2023匹配度 2/10 · 论文研究语言实现的一致性测试与覆盖准则,属于PL测试方向,但不涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心研究方向,与画像匹配度低。引用 3 inbox
Jihyeok Park, Dongjun Youn, Kanguk Lee, Sukyoung Ryu
crossref: 2026-09-10

AI 速览

一句话:提出特征敏感与特征调用路径敏感覆盖准则,提升语言实现一致性测试生成质量并发现大量 JS 实现缺陷。

语言实现一致性测试对保证正确执行环境很重要,但人工维护测试成本高。传统图覆盖从机械化语言规范生成测试时,无法区分使用相同语义函数的语言特征及其内部部分,导致测试质量下降。本文提出特征敏感(FS)覆盖及变体特征调用路径敏感(FCPS)覆盖,并用 k-limiting 扩展,细化测试需求。作者将其集成到基于覆盖率引导变异模糊测试的 JEST,针对 JavaScript 规范生成测试。对 ES13(2022),50 小时内合成 237,981 个一致性测试;评测 8 个主流 JavaScript 实现(4 引擎、4 转译器),发现 143 个不同缺陷,85 个获确认,83 个为新缺陷。

问题
传统图覆盖用于从机械化语言规范生成一致性测试时,无法区分使用相同语义函数的语言特征及同一特征内部不同部分,导致测试需求不够精细、测试质量下降。
方法
提出特征敏感(FS)覆盖和特征调用路径敏感(FCPS)覆盖,用最内层语言特征细化传统图覆盖的测试需求,并引入 k-limiting 扩展;将这些准则集成到 JEST 的覆盖率引导变异模糊测试中。
评估
以 JavaScript ES13 机械化规范为对象,50 小时自动合成 237,981 个一致性测试,并评测 8 个主流实现(4 个引擎、4 个转译器),发现 143 个不同缺陷,其中 85 个获确认、83 个为新缺陷。
原文摘要(Abstract)

The conformance testing of programming language implementations is crucial to support correct and consistent execution environments. Because manually maintaining conformance tests for real-world programming languages is cumbersome and labor-intensive, researchers have presented various ways to make conformance tests effective and efficient. One such approach is to use graph coverage, one of the most widely-used coverage criteria, to generate tests that reach different parts of a mechanized language specification. Since mechanized specifications use functions or inductive definitions to describe the semantics of language features, traditional graph coverage criteria for software work as they are. However, they may not produce high-quality conformance tests because language implementations often have specialized execution paths for different features, even when their semantics descriptions use the same functions. Traditional graph coverage may not distinguish test requirements of such language features, which degrades the quality of conformance testing. Similarly, it may not distinguish test requirements of different parts of the same language feature when their semantics descriptions use the same functions. We present feature-sensitive (FS) coverage as a novel coverage criterion to generate high-quality conformance tests for language implementations. It is a general extension of graph coverage, refining conventional test requirements using the innermost enclosing language features. We also introduce feature-call-path-sensitive (FCPS) coverage, a variant of FS coverage, and extend both coverage criteria using the 𝑘-limiting approach. To evaluate the effectiveness of the new coverage criteria for language implementations, we apply them to a mechanized specification of JavaScript. We extend JEST, the state-of-the-art JavaScript conformance test synthesizer using coverage-guided mutational fuzzing, with various FS and FCPS coverage criteria. For the latest JavaScript language specification (ES13, 2022), our tool automatically synthesizes 237,981 conformance tests in 50 hours with five coverage criteria. We evaluated the conformance of eight mainstream JavaScript implementations (four engines and four transpilers) with the synthesized conformance tests and discovered bugs in all of them. The tool detected 143 distinct conformance bugs (42 in engines and 101 in transpilers), 85 of which were confirmed by the developers and 83 of which were newly discovered bugs.

链接与引用

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

BibTeX
@article{paperbot1984,
  title = {Feature-Sensitive Coverage for Conformance Testing of Programming Language Implementations},
  author = {Jihyeok Park and Dongjun Youn and Kanguk Lee and Sukyoung Ryu},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {PLDI},
  year = {2023},
  doi = {10.1145/3591240}
}