Journal of Jilin University(Engineering and Technology Edition) ›› 2020, Vol. 50 ›› Issue (1): 262-267.doi: 10.13229/j.cnki.jdxbgxb20181246

Previous Articles    

Static input determination method in partial evaluation for compiler test

Lei LIU(),Jie WENG,De-gui GUO()   

  1. College of Computer Science and Technology, Jilin University, Changchun 130012, China
  • Received:2018-12-19 Online:2020-01-01 Published:2020-02-06
  • Contact: De-gui GUO E-mail:liulei@jlu.edu.cn;guodg@jlu.edu.cn

Abstract:

The validation method based on partial evaluation is a novel and effect method to validate compilers. However, in this method the static inputs and their values are specified by hand in the partial evaluation stage, which possesses blindly and limits the framework to run automatically. This paper solves this limitation by proposing an automatic method, which is based on variable dependency, to specify the static inputs and their values. The validation framework can work automatically shipped with this method, therefore improve the efficiency of testing. Results of the experiment show that this method is applicable and effect.

Key words: computer software, compiler test, partial evaluation, static input, program static analysis

CLC Number: 

  • TP311

Fig.1

Compiler test framework based on partial evaluation"

Fig.2

A source program"

Fig.3

Resident program with c=0"

Fig.4

Source program p1"

Fig.5

Control flow graph of p1"

Fig.6

ref set after convergence"

Fig.7

Residential program?r"

1 Regehr J, Chen Y, Cuoq P, et al. Test-case reduction for C compiler bugs[C]∥Proceedings of the 33rd ACM Sigplan Conference on Programming Language Design and Implementation, Beijing, China, 2012: 335-346.
2 Le V, Afshari M, Su Z. Compiler validation via equivalence modulo inputs[C]∥Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, Edinburgh, United Kingdom, 2014: 216-226.
3 Chen T Y. Metamorphic testing: a simple method for alleviating the test oracle problem[C]∥Proceedings of the 10th International Workshop on Automation of Software Test, Florence, Italy, 2015: 53-54.
4 Tao Q, Wu W, Zhao C, et al. An automatic testing approach for compiler based on metamorphic testing technique[C]∥Asia Pacific Software Engineering Conference, Sydney, 2010: 270-279.
5 郭德贵, 王冠成, 吕帅, 等. peC语言的部分求值器及在编译器测试中的应用[J]. 软件学报, 2017, 28(5): 1221-1232.
Guo De-gui,Wang Guan-cheng,Lv Shuai,et al. Partial evaluator for pec and its application to compiler validation[J]. Journal of Software, 2017, 28(5): 1221-1232.
6 Beckman L, Haraldson A, Ö Oskarsson. et al. A partial evaluator, and its use as a programming tool[J]. Artificial Intelligence, 1976, 7(4): 319-357.
7 Jones N D. An introduction to partial evaluation[J]. ACM Computing Surveys, 1996, 28(3): 480–503.
8 The Clang Team. Clang documentation: LibTooling[DB/OL].[2018-09-24]. http:∥clang.llvm.org/docs/LibTooling.html.
9 Aho A V, Lam M S, Sethi R, et al. Compilers: Principles, Techniques, and Tools[M]. 2nd ed. Boston: Addison-Wesley Longman Publishing Co., Inc., 2006.
10 Le V, Sun C, Su Z. Randomized stress-testing of link-time optimizers[C]∥Proceedings of the International Symposium on Software Testing and Analysis, Beijing, China, 2015: 327-337.
11 Sun C, Le V, Zhang Q, et al. Toward understanding compiler bugs in GCC and LLVM[C]∥Proceedings of the 25th International Symposium on Software Testing and Analysis, Washington,USA, 2016: 294‒305.
12 Cuoq P, Monate B, Pacalet A, et al. Testing static analyzers with randomly generated programs[C]∥Proceedings of the 4th International Conference on NASA Formal Methods, Norfolk, VA, USA, 2012: 120‒125.
13 Yang X, Chen Y, Eide E, et al. Finding and understanding bugs in C compilers[J]. ACM Sigplan Notices, 2011, 46(6): 283‒294.
[1] MA Jian, FAN Jian-ping, LIU Feng, LI Hong-hui. The evolution model of objective-oriented software system [J]. 吉林大学学报(工学版), 2018, 48(2): 545-550.
[2] LUO Yang-xia, GUO Ye. Software recognition based on features of data dependency [J]. 吉林大学学报(工学版), 2017, 47(6): 1894-1902.
[3] LIU Lei, LIU Li-juan, WU Xin-wei, ZHANG Peng. Compiler testing method based on ECP metamorphic relation [J]. 吉林大学学报(工学版), 2017, 47(4): 1262-1267.
[4] YING Huan, WANG Dong-hui, WU Cheng-gang, WANG Zhe, TANG Bo-wen, LI Jian-jun. Efficient deterministic replay technique on commodity system environment [J]. 吉林大学学报(工学版), 2017, 47(1): 208-217.
[5] LI Yong, HUANG Zhi-qiu, WANG Yong, FANG Bing-wu. New approach of cross-project defect prediction based on multi-source data [J]. 吉林大学学报(工学版), 2016, 46(6): 2034-2041.
[6] WANG Nian-bin, ZHU Guan-wen, ZHOU Lian-ke, WANG Hong-wei. Novel dataspace index for efficient processing of path query [J]. 吉林大学学报(工学版), 2016, 46(3): 911-916.
[7] CHEN Peng-fei, TIAN Di, YANG Guang. Design and implementation of LIBS software based on MVC architecture [J]. 吉林大学学报(工学版), 2016, 46(1): 242-245.
[8] TE Ri-gen, JIANG Sheng, LI Xiong-fei, LI Jun. Document compression scheme based on integer data [J]. 吉林大学学报(工学版), 2016, 46(1): 228-234.
[9] FENG Xiao-ning, WANG Zhuo, ZHANG Xu. Formal method for routing protocol of WSN based on L-π calculus [J]. 吉林大学学报(工学版), 2015, 45(5): 1565-1571.
[10] LIU Lei, WANG Yan-yan, SHEN Chun, LI Yu-xiang, LIU Lei. Performance portable GPU parallel optimization technique on Bellman-Ford algorithm [J]. 吉林大学学报(工学版), 2015, 45(5): 1559-1564.
[11] LI Ming-zhe, WANG Jin-lin, CHEN Xiao, CHEN Jun. Architecture model of streaming media applications on network processors(VPL) [J]. 吉林大学学报(工学版), 2015, 45(5): 1572-1580.
[12] WANG Ke-chao, WANG Tian-tian, SU Xiao-hong, MA Pei-jun. Plagiarism detection in student programs based on frequent closed sequence mining [J]. 吉林大学学报(工学版), 2015, 45(4): 1260-1265.
[13] HUANG Hong-tao,WANG Jing,YE Hai-zhi,HUANG Shao-bin. Lazy slicing based method for verifying linear temporal logic property [J]. 吉林大学学报(工学版), 2015, 45(1): 245-251.
[14] HE Qin-lu, LI Zhan-huai, WANG Le-xiao, WANG Rui. Testing technology for aggregate bandwidth of cloud storage system [J]. 吉林大学学报(工学版), 2014, 44(4): 1104-1111.
[15] FAN Da-juan, HUANG Zhi-qiu, XIAO Fang-xiong, ZHU Yi, WANG Jin. Compatibility analysis and adaptor generation for multi-service interaction [J]. 吉林大学学报(工学版), 2014, 44(4): 1094-1103.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!