Digital Repository

Predicting the execution time complexity of a computer program using Machine Learning

Show simple item record

dc.contributor.author De Ranasinghe, I. M. M. P.
dc.contributor.author Munasinghe, L.
dc.date.accessioned 2022-11-03T10:04:21Z
dc.date.available 2022-11-03T10:04:21Z
dc.date.issued 2022
dc.identifier.citation De Ranasinghe I. M. M. P.; Munasinghe L. (2021) Predicting the execution time complexity of a computer program using Machine Learning, Proceedings of the International Conference on Applied and Pure Sciences (ICAPS 2021-Kelaniya) Volume 2, Faculty of Science, University of Kelaniya Sri Lanka. Page 49. en_US
dc.identifier.uri http://repository.kln.ac.lk/handle/123456789/25531
dc.description.abstract Performance enhancement of a computer program is an important aspect of today's world. The developers produce programs and there is a lack of accurate methods for predicting the execution time of a computer program prior to its execution in an executable environment. Predicting the execution time of a particular program before execution would be great to develop the program with the highest performance efficiency and the lowest execution latency. Theoretically, there are a lot of ways of calculating the complexity of a computer program. Mathematically it is impractical to find a universal method to compute the complexity of all types of programs. Therefore, this research introduces a Machine Learning based solution to predict an execution-time-based label for a given computer program. There are three main types of parameters in a computer program that affect the execution time, such as Static Code Features, Hypertext Transfer Protocol (HTTP) Calls, and the Hardware Performance of the execution environment. In this research, the Machine Learning (ML) model was trained for the parameters of the above types (Programs with Static Code & HTTP calls) by executing them on a fixed hardware infrastructure execution condition. We analysed the number of if conditions, methods, breaks, switches, loops, nested-loop-depth, frequencies, and the behaviour of HTTP calls, kind of features of a computer program in order to generate an accurate execution time complexity prediction label of a computer program. The label is forecasted based on five pre-defined complexity classes by considering the minimum and the maximum overall execution time of the considered dataset, such as Execution Time is Higher, Execution Time is High, Execution Time is Medium, Execution Time is Low, Execution Time is Lower. Further, in the collected dataset, the most prominent features which affect the complexity among the features that we considered are the number of HTTP calls and nested loop depth, followed by loops. Accuracy Score, Precision, Recall, and F1 Score values of the ML model were generated for the traditional classification algorithms such as Decision Tree Classifier, K Nearest Neighbour Classifier, Random Forest Classifier, Naive Bayes Classifier, Support Vector Classifier, and MLP Classifiers in order to verify the effectiveness of the model. The best accuracy score was achieved with an overall 88% by using the approach of Random Forest. The findings of this research can be optimized for implementing an Integrated Development Environment (IDE) plugin or a developer tool that can forecast the exact execution time of a given computer program live by integrating the specifications of the execution device. It will help developers to optimize a particular computer program and develop it for a minimum execution latency and enhance the performance of the program. en_US
dc.publisher Faculty of Science, University of Kelaniya Sri Lanka en_US
dc.subject Complexity, Execution, Machine Learning, Performance, Prediction en_US
dc.title Predicting the execution time complexity of a computer program using Machine Learning en_US


Files in this item

This item appears in the following Collection(s)

Show simple item record

Search Digital Repository


Browse

My Account