Code completion method and device, computer device and storage medium

A computer and completion technology, applied in computer parts, calculation, code compilation, etc., can solve problems such as inability to complete code and limited content of completion

Pending Publication Date: 2020-01-14
ONE CONNECT SMART TECH CO LTD SHENZHEN
View PDF0 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The content that these methods can complete is limited, and code completion can only be performed based on a

Method used

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
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Code completion method and device, computer device and storage medium
  • Code completion method and device, computer device and storage medium
  • Code completion method and device, computer device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0065] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0066] In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0067] figure 1 It is a flow chart of the code completion method provided by the embodiment of the present invention. The code completion method is applied to a computer device for code completion of relatively c...

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

PUM

No PUM Login to view more

Abstract

The invention provides a code completion method. The method comprises the steps of obtaining a plurality of training source codes; generating abstract syntax trees of a plurality of training source codes, and generating parent abstract syntax trees and child abstract syntax trees of the plurality of training source codes according to the abstract syntax trees; generating parent control flow graphsof the plurality of training source codes according to the parent abstract syntax trees of the plurality of training source codes, and generating child control flow graphs of the plurality of training source codes according to the child abstract syntax trees of the plurality of training source codes; constructing a Bayesian prediction model according to the parent control flow graphs and the child control flow graphs of the plurality of training source codes; obtaining a source code to be completed; and inputting the to-be-completed source code into the Bayesian prediction model for code completion to obtain a subsequent code of the to-be-completed source code. The invention further provides a code completion device, a computer device and a computer readable storage medium. According to the method, complex codes can be complemented, and the software code writing efficiency is improved.

Description

technical field [0001] The present invention relates to the technical field of computer software, in particular to a code completion method, device, computer device and computer-readable storage medium. Background technique [0002] Code completion refers to prompting subsequent codes according to the input codes during the programming process, thereby improving the efficiency of software development. The current common code completion methods are based on simple grammatical inference or word frequency statistics of common words, or n-gram methods based on shallow semantic information. The content that these methods can complete is limited, and code completion can only be performed based on a limited number of elements in the source code, and code completion cannot be performed for more complex code. Contents of the invention [0003] In view of the above, it is necessary to provide a code completion method, device, computer device and computer-readable storage medium, wh...

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

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F8/41G06K9/62
CPCG06F8/42G06F8/44G06F18/29G06F18/214
Inventor 刘利
Owner ONE CONNECT SMART TECH CO LTD SHENZHEN
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products