arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.07553cs.SE
收藏

基于CodeBERT的Simulink变异测试

Simulink Mutation Testing using CodeBERT

Jingfan Zhang, Delaram Ghobari, Mehrdad Sabetzadeh, Shiva Nejati

AI总结:

本研究提出利用CodeBERT生成Simulink模型变异体的BERTiMuS方法,经工业基准测试验证,该方法可生成文献记载的变异模式,与现有工具FIM互补且在需求感知变异测试中表现更优。

摘要:

我们提出BERTiMuS,这是一种利用CodeBERT为Simulink模型生成变异体的方法。BERTiMuS先将Simulink模型转换为文本表示,对生成文本中的词元进行掩码处理,再使用CodeBERT预测被掩码的词元,将掩码词元替换为CodeBERT的预测结果即可得到Simulink变异体。我们采用工业基准中的Simulink模型评估BERTiMuS,并将其与Simulink领域最先进的变异工具FIM进行对比。结果表明,仅依靠CodeBERT,BERTiMuS就能生成文献中记载的基于模块的Simulink变异模式。此外,结果还显示:(a) BERTiMuS与FIM具有互补性;(b) 当采用考虑需求的变异测试概念时,BERTiMuS的表现优于FIM。

英文摘要:

We present BERTiMuS, an approach that uses CodeBERT to generate mutants for Simulink models. BERTiMuS converts Simulink models into textual representations, masks tokens from the derived text, and uses CodeBERT to predict the masked tokens. Simulink mutants are obtained by replacing the masked tokens with predictions from CodeBERT. We evaluate BERTiMuS using Simulink models from an industrial benchmark, and compare it with FIM -- a state-of-the-art mutation tool for Simulink. We show that, relying exclusively on CodeBERT, BERTiMuS can generate the block-based Simulink mutation patterns documented in the literature. Further, our results indicate that: (a) BERTiMuS is complementary to FIM, and (b) when one considers a requirements-aware notion of mutation testing, BERTiMuS outperforms FIM.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑