Check patentability & draft patents in minutes with Patsnap Eureka AI!

Method for modeling source code with code segments missing source locations

A code segment, source location technology, applied in program control devices, special data processing applications, structured data retrieval, etc., can solve problems such as difficulties in supporting other languages

Active Publication Date: 2017-05-17
GOOGLE LLC
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Most tools are good at representing one or more languages, but have trouble supporting others

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 modeling source code with code segments missing source locations
  • Method for modeling source code with code segments missing source locations
  • Method for modeling source code with code segments missing source locations

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0018] Exemplary data models and services provide a language-neutral canonical representation of source code and compiler metadata. This model represents source code as a data graph. A data graph is a data structure that stores data and shows the relationship between the data using a finite set of points, call nodes, lines, call edges. Such as figure 2 As depicted, relationships within a graph are represented by using edges to connect nodes to each other.

[0019] In order to create a data graph model from source code, the source code must be translated into a collection of nodes and edges that form a graph. A convenient way to produce a high level of precision is to reuse an existing compiler for the source code. The compiler may be provided with an indexer that extracts data from the compiler to construct nodes and edges for the data graph model.

[0020] figure 1 a and 1b show two example fragments of a source code file that can be used together to indicate the words ...

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 present invention discloses a system and method for modeling code segments without locations. Source code can be indexed and modeled in a data graph using nodes representing code segments and edges representing relationships between nodes. However, some code elements may be hidden or implicit, and thus may lack location information. In these cases, code fiction is created and represented as nodes in the graph. Fictitious nodes can be specially assigned so that the fictitious nodes can be easily distinguished from real source code nodes. The graph is then updated to include code fictional location information in nodes that interact with the hidden or implicit code. The data graph can then be provided to the user, or as a service to be consumed by the coding tool.

Description

Background technique [0001] Software developers use several different programming languages ​​to write source code. Each programming language has different syntax and semantics. Coding tools (including code browsers, integrated development environments (IDEs), and historical analysis tools) are required to understand the language of the source code so that these tools can be used by software developers. Most tools are good at representing one or more languages, but have trouble supporting others. In order to have proper tool support across all programming languages, there should be a single code model that can be used by all tools. Representing the semantics and syntax of source code for all languages ​​requires complex data models and services that understand the nuances of each language. There is also a need for data models and services capable of indexing elements and showing relationships between elements from any programming language and across languages. Contents of...

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): G06F9/44
CPCG06F8/75G06F8/73G06F16/22
Inventor J·V·戈格S·F·耶奇M·J·弗洛姆贝格A·沙利G·S·韦斯特J·A·丹尼特L·埃斯佩霍尔特R·A·布朗斯坦
Owner GOOGLE LLC
Features
  • R&D
  • 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