Cargando…
Learning Based Methods for Code Runtime Complexity Prediction
Predicting the runtime complexity of a programming code is an arduous task. In fact, even for humans, it requires a subtle analysis and comprehensive knowledge of algorithms to predict time complexity with high fidelity, given any code. As per Turing’s Halting problem proof, estimating code complexi...
Autores principales: | , , , , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
2020
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7148227/ http://dx.doi.org/10.1007/978-3-030-45439-5_21 |
_version_ | 1783520548183080960 |
---|---|
author | Sikka, Jagriti Satya, Kushal Kumar, Yaman Uppal, Shagun Shah, Rajiv Ratn Zimmermann, Roger |
author_facet | Sikka, Jagriti Satya, Kushal Kumar, Yaman Uppal, Shagun Shah, Rajiv Ratn Zimmermann, Roger |
author_sort | Sikka, Jagriti |
collection | PubMed |
description | Predicting the runtime complexity of a programming code is an arduous task. In fact, even for humans, it requires a subtle analysis and comprehensive knowledge of algorithms to predict time complexity with high fidelity, given any code. As per Turing’s Halting problem proof, estimating code complexity is mathematically impossible. Nevertheless, an approximate solution to such a task can help developers to get real-time feedback for the efficiency of their code. In this work, we model this problem as a machine learning task and check its feasibility with thorough analysis. Due to the lack of any open source dataset for this task, we propose our own annotated dataset, (The complete dataset is available for use at https://github.com/midas-research/corcod-dataset/blob/master/README.md) CoRCoD: Code Runtime Complexity Dataset, extracted from online coding platforms. We establish baselines using two different approaches: feature engineering and code embeddings, to achieve state of the art results and compare their performances. Such solutions can be highly useful in potential applications like automatically grading coding assignments, IDE-integrated tools for static code analysis, and others. |
format | Online Article Text |
id | pubmed-7148227 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2020 |
record_format | MEDLINE/PubMed |
spelling | pubmed-71482272020-04-13 Learning Based Methods for Code Runtime Complexity Prediction Sikka, Jagriti Satya, Kushal Kumar, Yaman Uppal, Shagun Shah, Rajiv Ratn Zimmermann, Roger Advances in Information Retrieval Article Predicting the runtime complexity of a programming code is an arduous task. In fact, even for humans, it requires a subtle analysis and comprehensive knowledge of algorithms to predict time complexity with high fidelity, given any code. As per Turing’s Halting problem proof, estimating code complexity is mathematically impossible. Nevertheless, an approximate solution to such a task can help developers to get real-time feedback for the efficiency of their code. In this work, we model this problem as a machine learning task and check its feasibility with thorough analysis. Due to the lack of any open source dataset for this task, we propose our own annotated dataset, (The complete dataset is available for use at https://github.com/midas-research/corcod-dataset/blob/master/README.md) CoRCoD: Code Runtime Complexity Dataset, extracted from online coding platforms. We establish baselines using two different approaches: feature engineering and code embeddings, to achieve state of the art results and compare their performances. Such solutions can be highly useful in potential applications like automatically grading coding assignments, IDE-integrated tools for static code analysis, and others. 2020-03-17 /pmc/articles/PMC7148227/ http://dx.doi.org/10.1007/978-3-030-45439-5_21 Text en © Springer Nature Switzerland AG 2020 This article is made available via the PMC Open Access Subset for unrestricted research re-use and secondary analysis in any form or by any means with acknowledgement of the original source. These permissions are granted for the duration of the World Health Organization (WHO) declaration of COVID-19 as a global pandemic. |
spellingShingle | Article Sikka, Jagriti Satya, Kushal Kumar, Yaman Uppal, Shagun Shah, Rajiv Ratn Zimmermann, Roger Learning Based Methods for Code Runtime Complexity Prediction |
title | Learning Based Methods for Code Runtime Complexity Prediction |
title_full | Learning Based Methods for Code Runtime Complexity Prediction |
title_fullStr | Learning Based Methods for Code Runtime Complexity Prediction |
title_full_unstemmed | Learning Based Methods for Code Runtime Complexity Prediction |
title_short | Learning Based Methods for Code Runtime Complexity Prediction |
title_sort | learning based methods for code runtime complexity prediction |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7148227/ http://dx.doi.org/10.1007/978-3-030-45439-5_21 |
work_keys_str_mv | AT sikkajagriti learningbasedmethodsforcoderuntimecomplexityprediction AT satyakushal learningbasedmethodsforcoderuntimecomplexityprediction AT kumaryaman learningbasedmethodsforcoderuntimecomplexityprediction AT uppalshagun learningbasedmethodsforcoderuntimecomplexityprediction AT shahrajivratn learningbasedmethodsforcoderuntimecomplexityprediction AT zimmermannroger learningbasedmethodsforcoderuntimecomplexityprediction |