Code Base File Generation, Code Search, Joining, Optimization, and Porting Methods

A file generation and library file technology, applied in the computer field, can solve problems such as time-consuming, complicated workload, and difficult to summarize the operation mode and logic of code segments

Pending Publication Date: 2019-02-15
任志颖 +1
View PDF3 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Relevant technologies can only assist users to generate a single statement. Developers usually still need to convert a certain process into a code statement to achieve it, and must write it one by one. The workload is cumbersome and the existing code is often repeated.
[0004] In the code search part of the auxiliary programming method, most of the searches are based on natural language descriptions, and the codes rely on ma

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 Base File Generation, Code Search, Joining, Optimization, and Porting Methods
  • Code Base File Generation, Code Search, Joining, Optimization, and Porting Methods
  • Code Base File Generation, Code Search, Joining, Optimization, and Porting Methods

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0120] This embodiment discloses a method for generating code library files, such as figure 1 As shown, the steps are as follows:

[0121] Step S1: First obtain the programming language and environment information of the source code;

[0122] Step S2: Load the slicing rule file of the corresponding language according to the programming language and environment information of the source code, and then divide the source code into independent code segments with complete functions according to the slicing program in the slicing rule file; For each independent code segment, retrieve whether there is an external code called, if so, add the external code to the meta code segment, and finally generate each meta code segment without calling external code;

[0123] Step S3: For each meta-code segment, first generate a library file, and then store each meta-code segment and the source code address and language and environment information corresponding to each meta-code segment in the library f...

Embodiment 2

[0203] This embodiment discloses a code search method, the steps are as follows:

[0204] Step X1: First, obtain the code library file generation method in Embodiment 1 to generate a library file and a summary file pointing to the library file;

[0205] Step X2. After receiving the user's code segment search request:

[0206] Step X21: Obtain the input type of the code segment required by the user, and then filter out the summary file with the same input type as the input type of the code segment;

[0207] In this embodiment, the search shortcut key entered by the user can be set as the arrow ↙ toward the bottom left. When the user enters: searchin:int,int:↙, the system will match the input type entered by the user and each summary , Such as step X21, at this time, if there are 1000 summary files that meet this situation, the search result will be shown to us as:

[0208] Result: 1000Counts (a total of 1000 search results);

[0209] If the code segment that the user wants is not entered...

Embodiment 3

[0251] This embodiment discloses an automatic code connection method, the steps are as follows:

[0252] Step Y1: First, obtain the code library file generation method in Embodiment 1 to generate a library file for the user to select and a summary file pointing to the library file;

[0253] Step Y2. Obtain the user-defined user function name. For the library file selected by the user, read the function name of the summary file pointing to the library file, and define it as the library file function name; extract the corresponding library file metacode Modify the content of the function definition as follows: replace the library file function name in the function definition content with the user function name, and then add the modified function definition content to the source code input by the user;

[0254] Get the user-defined user function name; for the library file selected by the user, read the function name of the summary file pointing to the library file and define it as the l...

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

A Code Base File Generation, Code Search, Joining, Optimization, and Porting Method is disclosed. , First, the library file of each meta-code segment is generated, the characteristic information of each meta-code segment is stored in the library file, and the feature information in the library file is extracted and stored in the summary file together with the address of the library file, The usercan get the code segment of the library file by retrieving the summary file to realize the code recommendation, and then add the code segment selected by the user to the source code written by the user according to the user's settings to realize the code connection, on this basis, the automatic code optimization and the application of auxiliary program transplantation can be realized. The summaryfile pointing to the library file of the invention only stores the simplified characteristic information of the metacode segment, so that only the input/output parameter types of the code segment andthe output result and the like are analyzed, the full-text semantic analysis of the code segment is not needed, and the content of the metacode segment is summarized and the calculation amount of thecharacteristic is reduced.

Description

Technical field [0001] The invention relates to the field of computers, in particular to a method for code library file generation, code search, connection, optimization and transplantation. Background technique [0002] Programming is a process in which a computer uses a certain programming language to write program code in order to solve a certain problem, and finally get the result. The method of assisting the developer in programming in a specific way and reducing the developer's development time is called the assisted programming method. [0003] The current auxiliary programming methods are mostly highlighting special keywords, associative input of sentences, and error prompts. Relevant technologies can only assist users to generate a single statement. Developers usually still need to convert a certain process into code statements to achieve it, and must write statement by statement. The workload is complicated and the existing code is often rewritten. [0004] In the code se...

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): G06F16/33G06F16/30
CPCY02D10/00
Inventor 任志颖张千李旭东
Owner 任志颖
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