Meta-learning-based code self-adaptive generation method

A code generation and self-adaptive technology, applied in neural learning methods, creating/generating source code, biological neural network models, etc., can solve problems such as inability to adapt quickly, damage generalization performance, and take a long time
CN112114791AActive Publication Date: 2020-12-22NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
Publication Date
2020-12-22

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
Patent Text Reader

Abstract

The invention discloses a meta-learning-based code self-adaptive generation method, which comprises the following steps of firstly, constructing a data set containing different code styles, training abasic code generation model which adopts an encoder decoder structure, and calculating the state vector of a code graph by using a graph neural network through an encoder; representing current context information of the program; enabling the decoder to generate a target code expression according to the context information by using a generation rule in the language grammar; learning different codestyles through meta-learning, so that a self-adaptive code generation model capable of quickly and accurately learning new style codes is trained; and finally, enabling the user to specify a target style code, carrying out a meta-training process on the adaptive code generation model, thus the model can generate a code with a target style. According to the code generation method, a meta-learningtechnology is introduced, and codes can be generated correctly and efficiently according to different personalized code styles of programmers.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to a method for self-adaptive code generation based on meta-learning, in particular to a method for self-adaptive code generation by using program static analysis, graph neural network technology and meta-learning technology, and belongs to the technical field of software engineering. Background technique

[0002] An integrated development environment (IDE) has become a fundamental paradigm for modern software engineers, providing a set of useful services to accelerate software development. Code generation (completion) is one of the most valuable features in an IDE, especially when the developer is new to the codebase. It can suggest the next possible code unit, such as a variable name or function call, including API calls. In recent years, researchers have proposed many code generation models, which use machine learning techniques to extract data from a large number of open source code databases for training. However, different ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More