Automatic program correction method based on knowledge graph
A knowledge map and program technology, applied in the field of program automatic correction, can solve problems such as troublesome, low efficiency, and complicated writing
Patent Information
- Authority / Receiving Office
- CN · China
- Current Assignee / Owner
- Publication Date
- 2021-03-12
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The present invention relates to a method for automatically correcting programs, in particular to a method for automatically correcting programs based on knowledge graphs. Background technique
[0002] At present, the automation development technology of program design is changing from the original componentized and model-driven method to the deep learning-based and semantic-driven method. At present, there are already existing methods for generating required program fragments through natural language processing. However, these methods require large-scale computing support of neural networks, and there is no unified standard. The logical structure, construction methods, and automated practical applications of code knowledge graphs are not It has not been solved well, and it cannot provide a complete programming method. Programmers need to be very rigorous when writing programs, and there must be no gaps or mistakes. Amendment, programming is complex, ...
Examples
Embodiment Construction
[0055] The present invention will be further described below in conjunction with the examples, but not as a basis for limiting the present invention.
[0056] Example.
[0057] A method for automatically correcting programs based on knowledge graphs, such as figure 1 As shown, it specifically includes the following steps:
[0058] S1. Obtain the open source code on the network, analyze the acquired source code through the code knowledge graph construction program, and generate the code knowledge graph;
[0059] S2. Write a skeleton program that allows missing or errors;
[0060] S3. Analyze the skeleton program through the code completion program, use the code knowledge graph to correct and supplement the skeleton program, and obtain a complete program that is normally executed.
[0061] In the S1., the code knowledge graph is an RDF triple structure. The RDF triple structure consists of code entities and code relations. Code entities are all grammatical components of a p...