Abstract
There are various ways to realize programs to meet the same requirements. Therefore, for evaluation of a program code, it is necessary not only to satisfy the requirement for it but also to evaluate how it achieves the purpose. We think that the knowledge of such alternative ways to achieve the same purpose is important for program education and software engineering. In this paper, we propose a method to analyze how the program achieves requirements. We propose particularly a vector representation that appropriately indicates the structure of an abstract syntax tree. We confirmed that our proposal not only analyzes fundamental programs as appears in textbooks effectively but also classifies algorithms that are adopted in various programs submitted to a programming contest. Based on this confirmation, we further investigated the relationship between the class name of the Java language and the program structure. As a result, it was shown that classes with similar program structure are named by certain similar linguistic expressions. Therefore, we conclude that our proposed method is a useful basis for representing the diversity of programs on vector space.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Mechtaev, S., Yi, J., Roychoudhury, A.: Directfix: looking for simple program repairs. In: Proceedings of the 37th International Conference on Software Engineering, vol. 1, pp. 448–458. IEEE Press (2015)
Nguyen, H.D.T., Qi, D., Roychoudhury, A., Chandra, S.: Semfix: program repair via semantic analysis. In: Proceedings of the 2013 International Conference on Software Engineering, pp. 772–781. IEEE Press (2013)
Le Goues, C., Nguyen, T., Forrest, S., Weimer, W.: Genprog: a generic method for automatic software repair. IEEE Trans. Softw. Eng. 38(1), 54–72 (2012)
Murakami, H., Hotta, K., Higo, Y., Kusumoto, S.: Predicting next changes at the fine-grained level. In: 2014 21st Asia-Pacific Software Engineering Conference (APSEC), vol. 1, pp. 119–126. IEEE (2014)
Mou, L., Li, G., Liu, Y., Peng, H., Jin, Z., Xu, Y., Zhang, L.: Building program vector representations for deep learning. arXiv preprint arXiv:1409.3358 (2014)
Gvero, T., Kuncak, V.: Synthesizing Java expressions from free-form queries. ACM SIGPLAN Not. 50(10), 416–432 (2015)
EclipseJDT: Eclipsejdt. http://www.eclipse.org/jdt. Accessed 27 Sept 2017
Allamanis, M., Sutton, C.: Mining source code repositories at massive scale using language modeling. In: The 10th Working Conference on Mining Software Repositories, pp. 207–216. IEEE (2013)
Lafore, R.: Java de manabu algorithm to data kouzou Java (Japanese). SB Creative (1999)
Kondou, Y.: Teihon Java programmer no tameno algorithm to data kouzou Java (Japanese). SB Creative (2011)
Igarashi, T.: Data kouzou to algorithm (Japanese). Suurikougaku-Sha (2007)
Shibata, B.: Meikai Java niyoru algorithm to data kouzou Java (Japanese). SB Creative (2007)
Watanobe, Y.: Aizu online judge. http://judge.u-aizu.ac.jp/onlinejudge/. Accessed 27 Sept 2017
Acknowledgment
This work was supported by JSPS KAKENHI (Grant-in-Aid for Scientific Research(C), Grant Number: 15K01100).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this paper
Cite this paper
Mashima, Y., Takeuchi, K. (2018). Vector Representation of Abstract Program Tree for Assessing Algorithm Variety for the Same Purpose. In: Huynh, VN., Inuiguchi, M., Tran, D., Denoeux, T. (eds) Integrated Uncertainty in Knowledge Modelling and Decision Making. IUKM 2018. Lecture Notes in Computer Science(), vol 10758. Springer, Cham. https://doi.org/10.1007/978-3-319-75429-1_11
Download citation
DOI: https://doi.org/10.1007/978-3-319-75429-1_11
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-75428-4
Online ISBN: 978-3-319-75429-1
eBook Packages: Computer ScienceComputer Science (R0)