System and method for providing code completion features for code modules

US10437574B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10437574-B2
Application numberUS-201615287325-A
CountryUS
Kind codeB2
Filing dateOct 6, 2016
Priority dateJun 4, 2013
Publication dateOct 8, 2019
Grant dateOct 8, 2019

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Systems and methods are described for providing code completion features for code modules that have been incorporated into a source code document being edited by a user of a source code editor. Embodiment dynamically load and apply partial code evaluation to code modules referenced in the source code document (and any code modules referenced directly or indirectly by such code modules) while the user is editing it. The partial code evaluation is performed on a background thread that is separate from a main thread used to execute the user interface for the source code editor. The results of such partial code evaluation are cached and used to provide code completion information for the code modules.

First claim

Opening claim text (preview).

What is claimed is: 1. A method for providing code completion features for a source code document being edited by a user of a source code editor, comprising: determining that the user has entered a statement of incorporation into the source code document that will cause a first code module that is not part of the source code document to be linked at runtime and that code completion information is required for at least one code entity associated with the first code module; and in response to the determining step, loading module code, the module code including code of the first code module, executing the loaded module code in a partial code evaluator to generate partial code evaluation results, the executing the loaded module code in the partial code evaluator comprising executing only a selected portion of the loaded module code, deriving the code completion information from the partial code evaluation results, and providing the code completion information to the user of the source code editor. 2. The method of claim 1 , wherein the first code module comprises a code module written in a dynamic programming language. 3. The method of claim 2 , wherein the first code module comprises a node.js module. 4. The method of claim 1 , wherein loading the module code comprises: determining a location of a file that stores at least a portion of the first code module. 5. The method of claim 1 , wherein the module code includes code of the first code module and code of one or more additional code modules referenced directly or indirectly by the first code module. 6. The method of claim 1 , wherein executing the loaded module code in the partial code evaluator comprises: building an abstract syntax tree based upon the loaded module code; and evaluating nodes of the abstract syntax tree in the partial code evaluator. 7. The method of claim 1 , further comprising: caching the partial code evaluation results; wherein deriving the code completion information comprises deriving the code completion information from the cached partial code evaluation results. 8. The method of claim 7 , wherein caching the partial code evaluation results comprises caching the partial code evaluation results in at least one of volatile memory and non-volatile memory. 9. The method of claim 7 , further comprising: clearing the cached partial code evaluation results in response to determining that a file that stores at least a portion of the first code module has changed. 10. The method of claim 6 , further comprising: utilizing the cached partial code evaluation results to derive code completion information for a second source code document. 11. The method of claim 1 , wherein the step of executing the module code in the partial code evaluator is executed on a background thread that is separate from a main thread upon which an interface for the source code editor is executed. 12. The method of claim 1 , further comprising: while the module code is being executed in the partial code evaluator, providing code completion information to the user of the source code editor that is based upon one or more default values rather than upon the partial code evaluation results. 13. A computer program product comprising a computer readable storage device having computer program logic recorded thereon for enabling a processing unit to provide code completion features for a source code document being edited by a user of a source code editor, the computer program logic comprising: first computer program logic that, when executed by the processing unit, determines that the user has entered a statement of incorporation into the source code document that will cause a code module that is not part of the source code document to be linked at runtime and that code completion information is to be obtained for at least one code entity associated with the code module; and second computer program logic that, when executed by the processing unit, performs the following in response to the determination: loads partial code evaluation results obtained by pre-applying partial code evaluation to code of the code module, the pre-applying the partial code evaluation to the code of the code module comprising executing only a selected portion of the code of the code module, derives the code completion information from the partial code evaluation results, and provides the code completion information to the user of the source code editor. 14. The computer program product of claim 13 , wherein the code module comprises a code module written in a dynamic programming language. 15. The computer program product of claim 14 , wherein the code module comprises a node.js module. 16. A system, comprising: one or more processors; and a storage medium that stores computer program logic that is executable by the one or more processors, the computer program logic comprising: a programming language engine that, in response to a determination that a user has entered a statement of incorporation into a source code document that will cause a first code module that is not part of the source code document to be linked at runtime and that code completion information is to be obtained for at least one code entity associated with the first code module: determines whether the first code module is a core module or a custom module; in response to determining that the first code module is a core module, obtains from a module loader partial code evaluation results obtained by pre-applying partial code evaluation to code of the first code module, the pre-applying the partial code evaluation to the code of the first code module comprising executing only a selected portion of the code of the first code module, and derives the code completion information from the partial code evaluation results obtained by pre-applying partial code evaluation to the code-of the first code module; and in response to determining that the first code module is a custom module, obtains from the module loader module code, the module code including code of the first code module, executes the module code in a partial code evaluator to generate partial code evaluation results, the executing the module code in the partial code evaluator comprising executing only a selected portion of the module code, and derives the code completion information from the partial code evaluation results obtained by executing the module code in the partial code evaluator; and a code completion engine that provides the code completion information to the user of the source code editor. 17. The system of claim 16 , wherein the first code module comprises a code module written in a dynamic programming language. 18. The system of claim 17 , wherein the code module comprises a node.js module. 19. The system of claim 16 , wherein the module code comprises code of the first code module and code of one or more additional code modules referenced directly or indirectly by the first code module. 20. The system of claim 16 , wherein the computer program logic further comprises: a cache that caches the partial code evaluation results obtained by executing the module code in the partial code evaluator.

Assignees

Inventors

Classifications

  • using formal methods, e.g. equivalence checking or property checking · CPC title

  • Computer-aided design [CAD] · CPC title

  • Dependency analysis; Data or control flow analysis · CPC title

  • Preprocessors · CPC title

  • Requirements analysis; Specification techniques · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10437574B2 cover?
Systems and methods are described for providing code completion features for code modules that have been incorporated into a source code document being edited by a user of a source code editor. Embodiment dynamically load and apply partial code evaluation to code modules referenced in the source code document (and any code modules referenced directly or indirectly by such code modules) while th…
Who is the assignee on this patent?
Microsoft Technology Licensing Llc
What technology area does this patent fall under?
Primary CPC classification G06F8/33. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Oct 08 2019 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 5 related publications on this page (citations in our corpus or others sharing the same primary CPC).