Font Size: a A A

Compiler Testing Optimization Research Based On Machine Learning

Posted on:2019-08-19Degree:MasterType:Thesis
Country:ChinaCandidate:G C WangFull Text:PDF
GTID:2428330548959129Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Compilers are one of the most fundamental software systems.When compiler bugs occur,they frustracte programmers and may lead to unintended application behavior and disasters.Compiler testing has been an important area for compiler quality.Recently,many techniques advance development of automated compiler testing.Generally,they rely on the test generation tools(e.g.,Csmith)for generating a large number of test programs(which are test inputs of compilers).Compilers are huge and complicated software system and developers use a large number of test programs for testing compilers.Compiler testing suffers from the serious efficiency problem.Although existing compiler testing methods introduce additional features to improve the compiler testing process,they all have serious efficiency issues.Compiler testing optimization is an approach for optimizing execution sequence of test programs and it can accelerate compiler testing and advance compiler testing effectiveness.Many compiler testing acceleration approaches utilize some criteria to priority test programs,so as to test programs that are more likely to trigger compiler bugs are executed earlier.However,all these acceleration approaches ignore a serious problem in compiler testing,which is that different failing test programs tend to trigger the same compiler bug to a large degree.Test coverage is a proper approximation to help distingish them,but collecting coverage dynamically is extremely costly and even infeasible in compiler testing.In this paper,we propose the first method to predict test coverage statically for compilers,and then propose to prioritize test programs by clustering them according to the predicted coverage information,in order to accelerate compiler testing.Predicting coverage is to predict the covered fraction of each compiler module(e.g.,source file or method)by a test program.This can be regarded as a multi-output regression problem,where each label refers to the covered fraction of each compiler module.Similar to the typical process of applying machine learning,the step of predicting coverage containsidentifying features,labelling,building a prediction model,and predicting and aligning coverage.The novel acceleration approach through coverage prediction is called COP(short for COverage Prediction).Our evaluation on GCC and LLVM demonstrates that COP significantly accelerates compiler testing,achieving an average of 51.01% speedup in test execution time.Moreover,COP outperforms significantly the state-ofthe-art acceleration approach by averagely improving 17.16%?82.51% speedups in different settings.
Keywords/Search Tags:Compiler Testing, Coverage Information, Machine Learning, Test Prioritization
PDF Full Text Request
Related items