Paper
13 December 2021 A random code generation method based on syntax tree layering model
Pu Yu, Hui Shu, Xiaobing Xiong, Fei Kang
Author Affiliations +
Proceedings Volume 12087, International Conference on Electronic Information Engineering and Computer Technology (EIECT 2021); 120871S (2021) https://doi.org/10.1117/12.2624688
Event: International Conference on Electronic Information Engineering and Computer Technology (EIECT 2021), 2021, Kunming, China
Abstract
Aiming at the problem that automatic code generation technology requires a lot of human intervention and cannot produce a lot of source code, a random code generation method based on syntax tree hierarchical model was proposed. In this technique, the syntax elements in the code abstract syntax tree are divided into five layers according to different degrees of refinement by constructing a hierarchical syntax tree model, and the element composition expression is proposed to formally describe the structure of the code at the text level. Based on this approach, an automatic code generation framework is proposed. Supported by a corpus, the framework can generate multiple nested element formation expressions which are finally converted into usable source code by translators. Experiments from the three dimensions of code complexity, control flow and semantic similarity prove that this method can generate a large number of source code randomly, and the generated code has low similarity in control flow diagram and semantics.
© (2021) COPYRIGHT Society of Photo-Optical Instrumentation Engineers (SPIE). Downloading of the abstract is permitted for personal use only.
Pu Yu, Hui Shu, Xiaobing Xiong, and Fei Kang "A random code generation method based on syntax tree layering model", Proc. SPIE 12087, International Conference on Electronic Information Engineering and Computer Technology (EIECT 2021), 120871S (13 December 2021); https://doi.org/10.1117/12.2624688
Advertisement
Advertisement
RIGHTS & PERMISSIONS
Get copyright permission  Get copyright permission on Copyright Marketplace
KEYWORDS
Computer programming

Computer programming languages

Databases

Evolutionary algorithms

Chemical elements

Artificial intelligence

Prototyping

RELATED CONTENT


Back to Top