peC语言的部分求值器及在编译器测试中的应用
作者:
基金项目:

吉林省科技发展计划(20150101054JC,20140520069JH,20150520060JH);国家自然科学基金(61300049);教育部高等学校博士学科点专项科研基金(20120061120059);吉林大学研究生创新基金(2016181)


Partial Evaluator for peC and Its Application to Compiler Validation
Author:
Fund Project:

Key Program for Science and Technology Development of Jilin Province of China (20150101054JC, 20140520069 JH, 20150520060JH); National Natural Science Foundation of China (61300049); Specialized Research Fund for the Doctoral Program of Higher Education of Ministry of Education of China (20120061120059); Graduate Innovation Fund of Jilin University (201681)

  • 摘要
  • | |
  • 访问统计
  • |
  • 参考文献 [19]
  • |
  • 相似文献 [20]
  • | | |
  • 文章评论
    摘要:

    部分求值技术在程序优化及软件自动生成等方面起着极为重要的作用.将部分求值技术应用到编译器测试中.为此,设计了一种C语言的子集peC语言,给出了该语言的部分求值策略的形式化描述,实现了peC语言的部分求值器,设计了基于部分求值技术的编译器测试框架.通过实验,该方法可以检测出大部分之前其他方法发现的GCC,LLVM编译器中的错误,此外还发现了其他方法不能发现的错误,这表明,将部分求值技术应用到编译器测试中是有效的.

    Abstract:

    Partial evaluation plays an important role in many areas such as program optimization and automatic software generation. This paper applies partial evaluation to validating compilers. The design of peC, which is a subset of C, and the formalized description of partial evaluation strategy for peC are presented. Furthermore, the implementation of a partial evaluator for peC, and a compiler testing framework based on partial evaluation are provided. Experiments show that this new approach can not only detect errors which can be detected by other methods in GCC and LLVM but also found some errors which are not detected by the other methods. In summary, the work by this paper demonstrates applying partial evaluation in testing compilers is effective.

    参考文献
    [1] Beckman L, Haraldson A, Oskarsson Ö, Sandewall E. A partial evaluator, and its use as a programming tool. Artificial Intelligence, 1976,7(4):319-357. [doi: 10.1016/0004-3702(76)90011-4]
    [2] Jones ND. An introduction to partial evaluation. ACM Computing Surveys, 1996,28(3):480-503. [doi: 10.1145/243439.243447]
    [3] Adams MD, Farmer A, Magalhães JP. Optimizing SYB is easy! In: Proc. of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation. 2014. 71-82. [doi: 10.1145/2543728.2543730]
    [4] Brady EC, Hammond K. Scrapping your inefficient engine: Using partial evaluation to improve domain-specific language implementation. ACM SIGPLAN Notices, 2010,45(9):297-308. [doi: 10.1145/1932681.1863587]
    [5] Birken K. Building code generators for DSLs using a partial evaluator for the Xtend language. In: Tiziana M, ed. Proc. of the Leveraging Applications of Formal Methods, Verification and Validation. New York: Springer-Verlag, 2014. 407-424. [doi: 10.1007/978-3-662-45234-9_29]
    [6] Tripp O, Ferrara P, Pistoia M. Hybrid security analysis of Web javascript code via dynamic partial evaluation. In: Proc. of the 2014 Int'l Symp. on Software Testing and Analysis. 2014. 49-59. [doi: 10.1145/2610384.2610385]
    [7] Razavi A, Kontogiannis K. Partial evaluation of model transformations. In: Proc. of the 34th Int'l Conf. on Software Engineering. New York: ACM Press, 2012. 562-572. [doi: 10.1109/icse.2012.6227160]
    [8] Le V, Afshari M, Su Z. Compiler validation via equivalence modulo inputs. In: Proc. of the 35th ACM SIGPLAN Conf. on Programming Language Design and Implementation. New York: ACM Press, 2014. 216-226. [doi: 10.1145/2666356.2594334]
    [9] Chen TY, Cheung SC, Yiu SM. Metamorphic testing: A new approach for generating next test cases. Technical Report, HKUST- CS98-01, 1998.
    [10] Tao Q, Wu W, Zhao C, Shen W. An automatic testing approach for compiler based on metamorphic testing technique. In: Proc. of the 17th Asia Pacific Software Engineering Conf. IEEE, 2010. 270-279. [doi: 10.1109/apsec.2010.39]
    [11] GNU compiler collection: gcov. https://gcc.gnu.org/onlinedocs/gcc/Gcov.html
    [12] Glenstrup A, Makholm H, Secher JP. C-Mix-Specialization of C programs. In: Proc. of the Partial Evaluation. 1998. 108-154.
    [13] Consel C, Hornof L, Lawall J, Marlet R, Muller G, Noyé J, Thibault S, Volanschi EN, Tempo: Specializing systems applications and beyond. In: Proc. of the ACM Computing Surveys, Symp. on Partial Evaluation. 1998. 19-23. [doi: 10.1145/289121.289140]
    [14] Liu L, Zhen HJ, Jin CZ. The partial evaluation technique based on information flow analysis. Ruan Jian Xue Bao/Journal of Software, 1995,6(8):509-513 (in Chinese with English abstract). http://www.jos.org.cn/ch/reader/create_pdf.aspx?file_no=1995081 0&journal_id=jos
    [15] The Clang Team. Clang documentation: LibTooling. http://clang.llvm.org/docs/LibTooling.html
    [16] GCC bug. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58731
    [17] LLVM bug. https://llvm.org/bugs/show_bug.cgi?id=16067
    附中文参考文献:
    [14] 刘磊,郑红军,金成植.基于信息流分析的部分求值技术.软件学报,1995,6(8):509-513. http://www.jos.org.cn/ch/reader/create_pdf. aspx?file_no=19950810&journal_id=jos
    引证文献
    网友评论
    网友评论
    分享到微博
    发 布
引用本文

郭德贵,王冠成,吕帅,刘磊. peC语言的部分求值器及在编译器测试中的应用.软件学报,2017,28(5):1221-1232

复制
分享
文章指标
  • 点击次数:3839
  • 下载次数: 6209
  • HTML阅读次数: 3133
  • 引用次数: 0
历史
  • 收稿日期:2016-06-02
  • 最后修改日期:2016-09-25
  • 在线发布日期: 2017-01-22
文章二维码
您是第19987359位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号