Abstract
Code completion is a very important feature of modern integrated development environments. Research has been done for years to improve code completion systems for general-purpose languages. However, only little literature can be found for (AI-based) code completion for domain specific languages (DSLs). A DSL is a special-purpose programming language tailored for a specific application domain. In this paper, we investigate whether AI-based state-of-the-art code completion approaches can also be applied for DSLs. This is demonstrated using the domain-specific language TTI (Thermal Text Input). TTI is used for power transformer design specification in an industrial context, where an existing code completion shall be replaced by an advanced machine learning approach. For this purpose, implementations of two code completion systems are adapted to our needs. One of them shows very promising results and achieves a top-5 accuracy of 97%. To evaluate the practical applicability, the approach is integrated into an existing editor of a power transformer manufacturer.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
References
Bahdanau, D., Cho, K., Bengio, Y.: Neural machine translation by jointly learning to align and translate. arXiv, Computation and Language 1409 (2014)
Bruch, M., Monperrus, M., Mezini, M.: Learning from examples to improve code completion systems. In: Proceedings of the 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering, ESEC/FSE 2009, pp. 213–222. Association for Computing Machinery, New York (2009). https://doi.org/10.1145/1595696.1595728
Chung, J., Gulcehre, C., Cho, K., Bengio, Y.: Empirical evaluation of gated recurrent neural networks on sequence modeling. In: NIPS 2014 Workshop on Deep Learning (2014)
Erdweg, S., et al.: The state of the art in language workbenches. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds.) SLE 2013. LNCS, vol. 8225, pp. 197–217. Springer, Cham (2013). https://doi.org/10.1007/978-3-319-02654-1_11
Franks, C., Tu, Z., Devanbu, P., Hellendoorn, V.: Cacheca: a cache language model based code suggestion tool. In: Proceedings of the 37th International Conference on Software Engineering, ICSE 2015, vol. 2, pp. 705–708. IEEE Press (2015). https://dl.acm.org/doi/10.5555/2819009.2819143
Goodfellow, I.J., et al.: Generative adversarial nets. In: NIPS 2014, pp. 2672–2680. MIT Press, Cambridge (2014)
Hou, D., Pletcher, D.: Towards a better code completion system by API grouping, filtering, and popularity-based ranking. In: Proceedings of the 2nd International Workshop on Recommendation Systems for Software Engineering, RSSE 2010, pp. 26–30. Association for Computing Machinery, New York (2010)
Husain, H., Wu, H.H., Gazit, T., Allamanis, M., Brockschmidt, M.: CodeSearchNet challenge: evaluating the state of semantic code search. arXiv preprint arXiv:1909.09436 (2019)
Jurafsky, D., Martin, J.H.: N-gram language models. In: Speech and Language Processing. Prentice-Hall Inc., Upper Saddle River (2009). https://web.stanford.edu/jurafsky/slp3/3.pdf. Accessed 08 Oct 2023
Li, J., Wang, Y., King, I., Lyu, M.R.: Code completion with neural attention and pointer networks. In: Proceedings of the 27th International Joint Conference on Artificial Intelligence, IJCAI 2018, pp. 4159–4165. AAAI Press (2018). https://dl.acm.org/doi/10.5555/3304222.3304348
Liaw, R., Liang, E., Nishihara, R., Moritz, P., Gonzalez, J.E., Stoica, I.: Tune: a research platform for distributed model selection and training. arXiv preprint arXiv:1807.05118 (2018)
Mernik, M., Heering, J., Sloane, A.M.: When and how to develop domain-specific languages. ACM Comput. Surv. 37(4), 316–344 (2005). https://doi.org/10.1145/1118890.1118892
Moritz, P., et al.: Ray: a distributed framework for emerging AI applications. In: Proceedings of the 13th USENIX Conference on Operating Systems Design and Implementation, OSDI 2018, pp. 561–577. USENIX Association, USA (2018). https://dl.acm.org/doi/10.5555/3291168.3291210
Oriol Vinyals, M.F., Jaitly, N.: Pointer networks. In: Proceedings of the 28th International Conference on Neural Information Processing Systems, NIPS 2015, pp. 2692–2700. MIT Press, Cambridge (2015)
Pfeiffer, M., Pichler, J.: A comparison of tool support for textual domain-specific languages. In: Proceedings of the 8th OOPSLA Workshop on Domain-Specific Modeling, pp. 1–7. Citeseer (2008)
Pletcher, D.M., Hou, D.: BCC: enhancing code completion for better API usability. In: 2009 IEEE International Conference on Software Maintenance, pp. 393–394. IEEE (2009). https://doi.org/10.1109/ICSM.2009.5306289
Raychev, V., Vechev, M., Yahav, E.: Code completion with statistical language models. In: ACM SIGPLAN Notices, PLDI 2014, vol. 49, pp. 419–428. Association for Computing Machinery, New York (2014). https://doi.org/10.1145/2666356.2594321
Robbes, R., Lanza, M.: How program history can improve code completion. In: 2008 23rd IEEE/ACM International Conference on Automated Software Engineering, ASE 2008, pp. 317–326. IEEE Computer Society, USA (2008). https://doi.org/10.1109/ASE.2008.42
Svyatkovskiy, A., Zhao, Y., Fu, S., Sundaresan, N.: Pythia: AI-assisted code completion system. In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD 2019, pp. 2727–2735. Association for Computing Machinery, New York (2019). https://doi.org/10.1145/3292500.3330699
Ziegler, A., et al.: Productivity assessment of neural code completion. In: Proceedings of the 6th ACM SIGPLAN International Symposium on Machine Programming, MAPS 2022, pp. 21–29. Association for Computing Machinery, New York (2022). https://doi.org/10.1145/3520312.3534864
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Piereder, C., Fleck, G., Geist, V., Moser, M., Pichler, J. (2024). Using AI-Based Code Completion for Domain-Specific Languages. In: Kadgien, R., Jedlitschka, A., Janes, A., Lenarduzzi, V., Li, X. (eds) Product-Focused Software Process Improvement. PROFES 2023. Lecture Notes in Computer Science, vol 14483. Springer, Cham. https://doi.org/10.1007/978-3-031-49266-2_16
Download citation
DOI: https://doi.org/10.1007/978-3-031-49266-2_16
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-49265-5
Online ISBN: 978-3-031-49266-2
eBook Packages: Computer ScienceComputer Science (R0)