JavaScript implementations are tested for conformance to the ECMAScript standard using a large hand-written test suite. Not only in this a tedious approach, it also relies solely on the natural language specification for differentiating behaviors, while hidden implementation details can also affect behavior and introduce divergences. We propose to generate conformance tests through dynamic symbolic execution of polyfills, drop-in replacements for newer JavaScript language features that are not yet widely supported. We then run these generated tests against multiple implementations of JavaScript, using a majority vote to identify the correct behavior. To facilitate test generation for polyfill code, we introduce a model for structured symbolic inputs that is suited to the dynamic nature of JavaScript. In our evaluation, we found 17 divergences in the widely used core-js polyfill and were able to increase branch coverage in interpreter code by up to 15%. Because polyfills are typically written even before standardization, our approach will allow to maintain and extend standardization test suites with reduced effort.


翻译:JavaScript 应用大型手写测试套件测试符合 ECMAScript 标准 。 不仅在这种乏味的方法中, 它还完全依赖自然语言规范来区分行为, 而隐藏的实施细节也会影响行为并引入差异。 我们提议通过动态执行多填充物来生成符合性测试, 用于替换尚未得到广泛支持的更新的 JavaScript 语言特征。 然后我们用多数选票对 JavaScript 的多重实施进行这些生成的测试, 以识别正确的行为 。 为了便利多填码的生成, 我们引入了适合 JavaScript 动态特性的结构化符号输入模式。 在我们的评估中, 我们发现在广泛使用的核心- j 多元填充物中存在17个差异, 并且能够将翻译代码的分支覆盖率提高15%。 由于多填充物通常在标准化之前就已写, 我们的方法将允许维持和扩展标准化测试套件, 并减少努力 。

0
下载
关闭预览

相关内容

【EMNLP2020】自然语言生成,Neural Language Generation
专知会员服务
38+阅读 · 2020年11月20日
【干货书】真实机器学习,264页pdf,Real-World Machine Learning
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
145+阅读 · 2019年10月12日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
100+阅读 · 2019年10月9日
【ACL2020放榜!】事件抽取、关系抽取、NER、Few-Shot 相关论文整理
深度学习自然语言处理
18+阅读 · 2020年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Msfvenom 常用生成 Payload 命令
黑白之道
9+阅读 · 2019年2月23日
NLP - 基于 BERT 的中文命名实体识别(NER)
AINLP
466+阅读 · 2019年2月10日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
已删除
清华大学研究生教育
3+阅读 · 2018年6月30日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
Arxiv
0+阅读 · 2021年10月10日
Generating Fact Checking Explanations
Arxiv
9+阅读 · 2020年4月13日
VIP会员
相关VIP内容
【EMNLP2020】自然语言生成,Neural Language Generation
专知会员服务
38+阅读 · 2020年11月20日
【干货书】真实机器学习,264页pdf,Real-World Machine Learning
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
145+阅读 · 2019年10月12日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
100+阅读 · 2019年10月9日
相关资讯
【ACL2020放榜!】事件抽取、关系抽取、NER、Few-Shot 相关论文整理
深度学习自然语言处理
18+阅读 · 2020年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Msfvenom 常用生成 Payload 命令
黑白之道
9+阅读 · 2019年2月23日
NLP - 基于 BERT 的中文命名实体识别(NER)
AINLP
466+阅读 · 2019年2月10日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
已删除
清华大学研究生教育
3+阅读 · 2018年6月30日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
Top
微信扫码咨询专知VIP会员