Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for carrying out JavaScript type inference based on deep learning

A deep learning and type technology, applied in the field of deep learning, can solve the problems of undetectable reference types, custom types, etc., and achieve the effect of improving the training speed

Inactive Publication Date: 2020-02-11
HUNAN UNIV
View PDF4 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

There are also some other code inspection tools, but these tools have some shortcomings, such as the inability to detect type errors such as reference types and custom types, so type inference for JavaScript is necessary

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
  • Method for carrying out JavaScript type inference based on deep learning

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0035]The hardware environment of the present invention is mainly a server whose GPU model is GeForce GTX 1080Ti. The software is implemented on the platform of ubuntu 16.04, based on the deep learning framework CNTK (Computational Network Toolkit), and developed in python language. CNTK supports various neural network models and algorithms, which greatly facilitates the realization of the entire system. The experimental data comes from a certain amount of open source projects on Github. The operation is mainly divided into four parts: data preprocessing, model building and training, model evaluation, and type inference. details as follows:

[0036] 1. Data preprocessing

[0037] Data preprocessing mainly includes data screening, conversion, segmentation, and presentation. The specific implementation is as follows:

[0038] Screening: Select a certain amount of open source projects with rich types and a large number of stars; check the files in each open source project, a...

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 relates to deep learning in the field of artificial intelligence, in particular to source code learning. A method comprises the steps of data collection and processing, model construction, model training, model evaluation and type inference. The step of data collection and processing comprises: firstly, downloading a certain amount of source codes on Github; screening source codes with rich types as a final data set; then converting data into a format in which tokens and types are aligned and matched, meanwhile, generating token and type vocabulary libraries, and finally, expressing the source code as a data format, such as a vector, suitable for learning by utilizing token-type mapping. The construction of the model comprises the steps of firstly determining the type of theneural network, then determining the number of layers of the neural network, and finally determining the number of neurons of each layer. The training of the model comprises the steps of tracking a loss function value and a classification error, and updating model parameters until the model with relatively high accuracy is obtained. The model evaluation comprises statistics of the accuracy and consistency of the model. The type inference comprises the steps of loading the trained model with higher accuracy, marking the type deduction result behind the corresponding identifier, and finally outputting the type inference result in the form of a file. The process is shown in Figure 1.

Description

technical field [0001] The invention relates to deep learning in the field of artificial intelligence, in particular to a learning of source codes. Specifically, after processing the source code, it is used as the input of the neural network, and then trained to obtain a model with high accuracy, so as to perform JavaScript type inference. Background technique [0002] In recent years, deep learning has been widely used in speech recognition, machine translation, automatic driving and other fields. At present, the learning of source code has also attracted people's attention. The advantage of deep learning is that it can extract highly complex features through deep neural networks, while machine learning needs to define features by itself. At present, deep neural networks have achieved success in a series of natural language tasks. Unlike natural language, programs contain rich, clear, and complex structural information. Traditional natural language processing models (NLP,...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41G06F11/36G06N3/04G06N3/08
CPCG06F8/437G06F11/3608G06N3/08G06N3/045
Inventor 孙建华刘利娜陈浩
Owner HUNAN UNIV
Features
  • Generate Ideas
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More