<p>Metamorphic testing is a valuable approach for addressing the oracle problem, with the identification of metamorphic relations being a crucial task. Despite the availability of metamorphic relations in previously studied programs, many current studies do not leverage them, resulting in inefficiencies and reliability challenges when identifying metamorphic relations in new programs. SimiMR proposes the recommendation of verified metamorphic relations for new code by leveraging similarities with existing programs. This approach is based on the assumption that akin programs exhibit akin metamorphic relations, thus linking program similarity with metamorphic relations classification: semantic similarity corresponds with physical and computational model metamorphic relations, whereas syntactic similarity corresponds with code model ones. Experiments demonstrate that metamorphic relations in code models are effectively reusable among programs with similar syntax, whereas those in physical or computational models can be applied to semantically similar programs. SimiMR surpasses AutoMR and similar methods by enhancing identification efficiency, extending applicability, and minimizing redundancy. It operates with minimal domain knowledge, leverages existing metamorphic relations, and keeps identification costs low.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

A metamorphic relation recommendation method utilizing program syntax and semantic similarity

  • Yin Zhao,
  • Meng Li,
  • Zhuting Luo,
  • Xiaohua Yang,
  • Jie Liu,
  • Shiyu Yan,
  • Tao Yu

摘要

Metamorphic testing is a valuable approach for addressing the oracle problem, with the identification of metamorphic relations being a crucial task. Despite the availability of metamorphic relations in previously studied programs, many current studies do not leverage them, resulting in inefficiencies and reliability challenges when identifying metamorphic relations in new programs. SimiMR proposes the recommendation of verified metamorphic relations for new code by leveraging similarities with existing programs. This approach is based on the assumption that akin programs exhibit akin metamorphic relations, thus linking program similarity with metamorphic relations classification: semantic similarity corresponds with physical and computational model metamorphic relations, whereas syntactic similarity corresponds with code model ones. Experiments demonstrate that metamorphic relations in code models are effectively reusable among programs with similar syntax, whereas those in physical or computational models can be applied to semantically similar programs. SimiMR surpasses AutoMR and similar methods by enhancing identification efficiency, extending applicability, and minimizing redundancy. It operates with minimal domain knowledge, leverages existing metamorphic relations, and keeps identification costs low.