Skip to Main Content
Problems in computer science require some time to produce an output. Some can be executed in few seconds or minutes. Others require hours, days or even centuries to produce an output. In this paper, we propose a technique to classify a problem in any of the above two categories without executing the input source code for a large test case. First, a control flow graph is generated from the Intermediate code of the input source code. Then, this CFG is reduced and a set of linear equations is framed. The solution of these linear equations along with execution count of the loops is used to determine worst case execution time. This WCET is compared with a threshold to classify the problem as either having a definite or indefinite execution time. The main advantage of this approach is that control flow analysis is automatic and user annotations in terms of markers and scope are not required in the input code.