期刊文献+

面向RISC-V的汇编程序语义等价性自动化测试系统 被引量:3

Automatic Testing System for Semantic Equivalence of RISC-V Assembly Programs
下载PDF
导出
摘要 本文设计并实现了一套面向RISC-V的汇编程序语义等价性自动化测试系统.在面向RISC-V开发软件时,尤其是基于扩展指令(例如向量指令)编写高效的程序时,很难避免以手写汇编的方式编写代码.例如,为标准的C函数库编写相应的向量版函数.与编译器自动生成的代码不同,手写的汇编代码虽然可以最大限度地提高程序的效率,但因绕过了编译时对程序的约束(如类型检查、寄存器分配等)而对开发者提出了更高的要求.能否对新版本与标准版本的汇编程序进行快速地、自动化的语义等价性测试,将大大影响代码的正确性和软件开发和调试的效率.已有面向RISC-V的测试框架缺乏对语义等价性测试的支持,也未考虑程序执行带来的副作用.本研究基于模拟器的动态测试环境,设计并实现了一套面向RISC-V的汇编程序语义等价性自动化测试系统.系统通过跟踪机器状态,捕获程序执行的副作用,并结合用户定义的测试目标生成测试报告.实验表明,本系统相比已有的测试系统,能够有效地对RISC-V汇编程序的语义等价性进行测试. In this study, we design and implement an automatic testing system for semantic equivalence of RISC-V assembly programs. While developing RISC-V programs, especially developing efficient programs based on extension instructions(such as vector extension), developers often write assembly code manually. For example, for the standard C function library, we often write the corresponding vector version functions for better performance. Without the compiler,the manually developed assembly code can maximize the efficiency of the program, but it skips many important compilation processes(such as type checking and register allocation), thus putting forward higher requirements for the developers. It will greatly affect the correctness of the code and the efficiency of software development and debugging if we can quickly and automatically test whether the rewritten version is semantically equivalent to the standard version of the program. The existing RISC-V testing framework lacks support for semantic equivalence testing and fails to consider the side effects caused by program executions. Based on the dynamic test environment of a simulator, this research designs and implements an automatic testing system for semantic equivalence of RISC-V assembly programs. It can capture side effects caused by program executions through monitoring machine states and generate testing reports with user-defined testing targets. Experiments show that the system, compared with existing testing systems, can test the semantic equivalence of RISC-V assembly programs.
作者 徐学政 王涛 方健 张光达 XU Xue-Zheng;WANG Tao;FANG Jian;ZHANG Guang-Da(Defense Innovation Institute,Academy of Military Sciences,Beijing 100097,China)
出处 《计算机系统应用》 2021年第11期33-40,共8页 Computer Systems & Applications
基金 国家自然科学基金(61802427)。
关键词 RISC-V 自动化测试 语义等价性 汇编程序 RISC-V automatic testing semantic equivalence assembly program
  • 相关文献

参考文献6

二级参考文献69

  • 1赵元聪,朱三元.面向对象软件测试的认识[J].计算机应用与软件,1996,13(3):1-4. 被引量:19
  • 2宫云战 刘海燕 万琳 等.软件测试性的分析与设计技术研究[A]..2000年全国测试学术会议(CTC2000)[C].北京,2000.271-274. 被引量:1
  • 3邵维忠 王立福 梅宏 等 见:杨芙清 何新贵主编.面向对象的软件测试--方法研究及系统设计[A].见:杨芙清, 何新贵主编.软件工程进展[C].北京: 清华大学出版社,1996.115-122. 被引量:1
  • 4Tracey N J. A Search-Based Automated Test-Data Generation Framework for Safety-Critical Software: [PhD thesis]. Department of Computer Science, University of York, 2000. 被引量:1
  • 5Korel B, Al-Yami A M. Assertion-Oriented Automated Test Data Generation. In: Proceedings of the 18^th International Conference on Software Engineering,Berlin:1996. 71-80. 被引量:1
  • 6Korel B, Al-Yami A M. Automated Regression Test Generation. In: Proceedings of the ACM SIGSOFT International Symposium on Software Testing and Analysis, Beach:1998. 143-152. 被引量:1
  • 7Weyuker E J. The Applicability of Program Schema Results to Programs. International Journal of Computer Information Sciences, 1979, 8(5): 387-403. 被引量:1
  • 8Ramanmoorthy C V, Ho S-B F, Chen W T. On the Automated Generation of Program Test Data. IEEE Transactions on Software Engineering, 1976, SE-2 (4): 293-300. 被引量:1
  • 9Kung D, Suchak N, Gao J, et al. On Object State Testing. In: Proceedings of COMPSAC'94, 1994. 222-227. 被引量:1
  • 10Goodenough J B, Gerhart S L. Toward a Theory of Test Data Selection. IEEE Transactions on Software Engineering, 1975, SE-3 (6): 156-173. 被引量:1

共引文献303

同被引文献5

引证文献3

二级引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部