Systems and methods for generating, linking, and presenting computer code representations from diverse sources
AssigneeSourcegraph, Inc.
InventorsSamuel Quinn Slack, Beyang Liu
Life of this patent
Estimating the term…
Abstract
Systems and methods for generating a language-independent representation of a software project's structure from its code comprises: generating a language-specific representation of code structure from a software project; augmenting the language-specific representation with additional, inferred information about its components; and mapping from language-specific components to language-independent components.
Claims20
A system for generating a language-independent representation of a software project's structure from its source code comprises:
- one or more language analyzers, each comprising a language structurer system and a language inferencer system for a selected language,
- wherein said language structurer system generates a language-specific representation of code structure from the software project, and said language inferencer system augments the language-specific representation with additional, inferred information;
- one or more language translators in communication with said one or more language analyzers for mapping from language-specific components to language-independent components, wherein said language-independent components represent a source-to-source translation that maintains a semantic structure of the software project's source code such that each language-independent component corresponds to at least one of a function, a method, a package, a class, a type, a field, a variable declaration, a comment, an interface, a reference to the function, a reference to the method, a reference to the package, a reference to the class, a reference to the type, a reference to the field, and a reference to the variable declaration;
- and
- a database for storage of the language-independent components.
A method for generating a language-independent representation of a software project's structure from its code comprises:
- generating a language-specific representation of code structure from the software project via one or more language structurer systems,
- augmenting the language-specific representation with additional, inferred information via one or more language inferencer systems;
- mapping from language-specific components to language-independent components via one or more language translators in communication with said one or more language analyzers, wherein said language-independent components represent a source-to-source translation that maintains a semantic structure of the software project's source code such that each language-independent component corresponds to at least one of a function, a method, a package, a class, a type, a field, a variable declaration, a comment, an interface, a reference to the function, a reference to the method, a reference to the package, a reference to the class, a reference to the type, a reference to the field, and a reference to the variable declaration;
- and
- storing the language-independent components in a database.
A non-transitory computer-readable medium having stored thereon a plurality of instructions for generating a language-independent representation of a software project's structure from its code, the instructions, when executed by a processor, causing the processor to perform:
- generating a language-specific representation of code structure from the software project via one or more language structurer systems,
- augmenting the language-specific representation with additional, inferred information via one or more language inferencer systems;
- mapping from language-specific components to language-independent components via one or more language translators in communication with said one or more language analyzers, wherein said language-independent components represent a source-to-source translation that maintains a semantic structure of the software project's source code such that each language-independent component corresponds to at least one of a function, a method, a package, a class, a type, a field, a variable declaration, a comment, an interface, a reference to the function, a reference to the method, a reference to the package, a reference to the class, a reference to the type, a reference to the field, and a reference to the variable declaration;
- and
- storing the language-independent components in a database.
Dependencies are inferred from the claim text.