An Ontology-Based Code Fragment Annotation and Reuse System

A technology of code fragments and ontology, which is applied in the field of building an efficient software integrated development environment, can solve the problems of unfavorable code fragment sharing and reuse, memory loss, time-consuming and labor-intensive problems, and achieve the goal of improving storage and reuse efficiency and improving operation efficiency Effect

Inactive Publication Date: 2018-04-20
BEIJING INSTITUTE OF TECHNOLOGYGY
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In addition, the code fragments accumulated during the implementation of the previous project are difficult to be reused in the next project due to reasons such as memory loss and difficulty in finding
The code fragments published in the blog system are not limited by time and space, but because the blog system is usually published in unstructured text, and the text contains a large number of natural language descriptions, which is not conducive to centralized retrieval, programmers only Can use a general search engine to search, and read and filter one by one, which is time-consuming and laborious, and does not conform to the basic idea of ​​​​quick reuse of code fragments
[0004] Integrated development environments (such as Eclipse and Visual Studio) or dedicated code fragment management systems (such as github's gist subsystem, CSDN's code subsystem) can easily manage and search code fragments, but for efficient reuse of code fragments There are still big obstacles: some code snippets are submitted by programmers in a hurry during the development process, so the code snippet titles and corresponding function descriptions are very short, and some code snippets are submitted without corresponding function and purpose descriptions , so it is not conducive to the sharing and reuse of code snippets
Some blog systems or code snippet management systems provide the function and purpose of labeling each code snippet, but these tags are usually automatically extracted by the system based on the description of existing code snippets, or added by users when submitting code snippets, so Without a unified standard, not only is it not conducive to the sharing of code fragments, but also it is impossible to efficiently implement heterogeneous integration and joint retrieval of code fragments among multiple code fragment management systems

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
  • An Ontology-Based Code Fragment Annotation and Reuse System
  • An Ontology-Based Code Fragment Annotation and Reuse System
  • An Ontology-Based Code Fragment Annotation and Reuse System

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0048] see figure 1 , a domain ontology related to programming includes four main components, namely: algorithm (Algorithm), data structure (Data Structure), programming language (Language) and application (Application). In this ontology fragment, the algorithm is further divided into two types: sorting and searching, and sorting is further divided into bubble sorting, quick sorting, and insertion sorting. The same sorting algorithm implemented in different programming languages ​​can be marked with the same ontology class. For example, the quick sort algorithm implemented in C and Java is marked as "Programming / Algorithm / Sort / Quick_sort". The data structure is also independent of the specific programming language, and the same abstract data structure "set" can be implemented in both C and Java. The Language branch under Programming is closely related to each programming language. For example, terms related to object-oriented programming are all under this branch. Applicati...

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 an ontology-based code fragment labeling and reusing system, which is suitable for the construction of an efficient software integrated development environment. The system includes a code segment ontology labeling model, a code segment ontology labeling module, an ontology labeling model learning module, a server-side management module, and a client-side management module. Among them, the code snippet labeling model is used to automatically label the newly submitted code snippets; the ontology labeling model learning module learns and generates the code snippet ontology labeling model; the client-side management module completes the collection, submission, and query functions of code snippets; server-side management The module is responsible for user management, receives the code fragments submitted by the client and stores them in the database; the code fragment ontology annotation module is responsible for annotating and reusing the code. The invention realizes mutual understanding, mutual operation and mutual sharing of code fragments among different programmers and different code fragment management systems.

Description

technical field [0001] The invention relates to an ontology-based code segment labeling and reuse system, which belongs to the field of computer software design and implementation, and is suitable for the construction of an efficient software integrated development environment. Background technique [0002] A code snippet refers to a small piece of program written in a certain programming language, usually containing 1 line to hundreds of lines of code. The meaning of its existence lies in: (1) a code snippet gives the usage method of an interface API;( 2) A specific function is realized, such as heap sorting or radix sorting; (3) It is a code template or statement combination that is frequently input when programming in a certain programming language. In the process of software design and development, programmers expect certain code fragments to be rewritten, and usually save a large number of code fragments through text files, blog systems, software integrated development ...

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 Patents(China)
IPC IPC(8): G06F8/73G06F8/36H04L29/06
Inventor 计卫星廖心怡高志伟王一拙高玉金石峰
Owner BEIJING INSTITUTE OF TECHNOLOGYGY
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