Feature-Sensitive Coverage for Conformance Testing of Programming Language Implementations

被引:1
作者
Park, Jihyeok [1 ]
Youn, Dongjun [2 ]
Lee, Kanguk [2 ]
Ryu, Sukyoung [2 ]
机构
[1] Korea Univ, Seoul, South Korea
[2] Korea Adv Inst Sci & Technol, Daejeon, South Korea
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2023年 / 7卷 / PLDI期
基金
新加坡国家研究基金会;
关键词
mechanized specification; conformance test synthesis; coverage-guided fuzzing; feature-sensitive coverage; SEMANTICS;
D O I
10.1145/3591240
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:23
相关论文
共 57 条
[1]  
Ammann P., 2016, Introduction to software testing, DOI 10.1017/9781316771273
[2]  
[Anonymous], 2010, Practical Model-Based Testing: A Tools Approach
[3]   Model-based API Testing of Apache ZooKeeper [J].
Artho, Cyrille ;
Gros, Quentin ;
Rousset, Guillaume ;
Banzai, Kazuaki ;
Ma, Lei ;
Kitamura, Takashi ;
Hagiya, Masami ;
Tanabe, Yoshinori ;
Yamamoto, Mitsuharu .
2017 10TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST), 2017, :288-298
[4]   Partition-based Coverage Metrics and Type-guided Search in Concolic Testing for Java']JavaScript Applications [J].
Bae, Sora ;
Park, Joonyoung ;
Ryu, Sukyoung .
2017 IEEE/ACM 5TH INTERNATIONAL FME WORKSHOP ON FORMAL METHODS IN SOFTWARE ENGINEERING (FORMALISE) PROCEEDINGS, 2017, :72-78
[5]   Jit-Picking: Differential Fuzzing of Java']JavaScript Engines [J].
Bernhard, Lukas ;
Scharnowski, Tobias ;
Schloegel, Moritz ;
Blazytko, Tim ;
Holz, Thorsten .
PROCEEDINGS OF THE 2022 ACM SIGSAC CONFERENCE ON COMPUTER AND COMMUNICATIONS SECURITY, CCS 2022, 2022, :351-364
[6]   Mechanized Semantics for the Clight Subset of the C Language [J].
Blazy, Sandrine ;
Leroy, Xavier .
JOURNAL OF AUTOMATED REASONING, 2009, 43 (03) :263-288
[7]   Skeletal Semantics and Their Interpretations [J].
Bodin, Martin ;
Gardner, Philippa ;
Jensen, Thomas ;
Schmitt, Alan .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL)
[8]  
Bogdanas D, 2015, ACM SIGPLAN NOTICES, V50, P445, DOI [10.1145/2775051.2676982, 10.1145/2676726.2676982]
[9]   JS']JSExplain: A Double Debugger for Java']JavaScript [J].
Chargueraud, Arthur ;
Schmitt, Alan ;
Wood, Thomas .
COMPANION PROCEEDINGS OF THE WORLD WIDE WEB CONFERENCE 2018 (WWW 2018), 2018, :691-699
[10]   Deep Differential Testing of JVM Implementations [J].
Chen, Yuting ;
Su, Ting ;
Su, Zhendong .
2019 IEEE/ACM 41ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2019), 2019, :1257-1268