摘要

For the safety of real-time systems, it is very important that the execution time of programs must meet all time constraints, even under the worst case. To expose timeliness defects which may cause an execution timeout as early as possible, we have studied a novel nonlinear approach for estimating worst case execution time (WCET) during programming phase, called NL-WCET. In this paper, we propose a program features model, based on which NL-WCET employs least square support vector machine (LSSVM) to learn the program features, and then estimates WCET. To improve the accuracy of NL-WCET, we develop an algorithm for training samples optimization. The experimental results show that both the model and the algorithm have distinct effects on the accuracy of NL-WCET. When static similarity is 80 %, cosine similarity is 99.5 % and max quotient between corresponding items is 50, the average error of NL-WCET is merely 0.82 %, quite lower than conventional WCET measurement. Meanwhile it also has higher efficiency than conventional WCET analysis. Thus NL-WCET is suitable for being used during programming phase, and can help programmers to discover timeliness defects as early as possible.