Compilation framework for dynamic inlining

US11157491B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11157491-B2
Application numberUS-201816164682-A
CountryUS
Kind codeB2
Filing dateOct 18, 2018
Priority dateOct 18, 2018
Publication dateOct 26, 2021
Grant dateOct 26, 2021

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.

Disclosed embodiments include generating code from a database query and providing a framework to develop complex data structures and the functions that access those data structures outside of the generated code to access the complex data structures. These data structure functions can be precompiled in order to save compilation time at query runtime, and linked to the generated code in a way that the framework can still inline function calls and apply various optimizations on the linked code.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: receiving a database query expressed in a database query language; and executing the database query to produce a query result, including: generating source code from the database query comprising statements expressed in a programming language that is not a machine level programming language; generating first intermediate code from the source code comprising statements expressed in an intermediate representation that is not a machine level programming language; linking function calls made in the first intermediate code to one or more functions stored in a library of functions to produce second intermediate code, each of the one or more functions comprising statements expressed in the intermediate representation, wherein the one or more functions are previously compiled from source code prior to receiving the database query, wherein the linking includes copying the one or more functions from the library of functions into the first intermediate code to produce the second intermediate code; transforming the second intermediate code to produce transformed intermediate code, said transforming including replacing at least one function call with statements that comprise a function called by the at least one function call to perform the one or more functions without invoking the one or more functions from the library of functions, wherein the programming language is a procedural source code to produce the first intermediate code; and generating machine executable code from the transformed intermediate code and executing the machine executable code to produce the query result. 2. The method of claim 1 , further comprising receiving the one or more functions and storing them in the library of functions, wherein the receiving and storing of the one or more functions occur separately and independently of receiving the database query and processing the database query. 3. The method of claim 1 , wherein the intermediate representation is independent of processor architecture, wherein the machine executable code is specific to a processor architecture. 4. The method of claim 1 , further comprising generating an execution plan for the database query and generating the source code based on the execution plan. 5. A non-transitory computer-readable storage medium having stored thereon computer executable instructions, which when executed by a computer device, cause the computer device to: receive a database query expressed in a database query language; and execute the database query to produce a query result, including: generating source code from the database query comprising statements expressed in a programming language that is not a machine level programming language; generating first intermediate code from the source code comprising statements expressed in an intermediate representation that is not a machine level programming language; linking function calls made in the first intermediate code to one or more functions stored in a library of functions to produce second intermediate code, each of the one or more functions comprising statements expressed in the intermediate representation, wherein the one or more functions are previously compiled from source code prior to receiving the database query, wherein the linking includes copying the one or more functions from the library of functions into the first intermediate code to produce the second intermediate code; transforming the second intermediate code to produce transformed intermediate code, said transforming including replacing at least one function call with statements that comprise a function called by the at least one function call to perform the one or more functions without invoking the one or more functions from the library of functions, wherein the programming language is a procedural language, wherein generating the first intermediate code includes compiling the source code to produce the first intermediate code; and generating machine executable code from the transformed intermediate code and executing the machine executable code to produce the query result. 6. The non-transitory computer-readable storage medium of claim 5 , wherein the intermediate representation is independent of processor architecture, wherein the machine executable code is specific to a processor architecture. 7. An apparatus comprising: one or more computer processors; and a computer-readable storage medium comprising instructions for controlling the one or more computer processors to be operable to: receive a database query expressed in a database query language; and execute the database query to produce a query result, including: generating source code from the database query comprising statements expressed in a programming language that is not a machine level programming language; generating first intermediate code from the source code comprising statements expressed in an intermediate representation that is not a machine level programming language; linking function calls made in the first intermediate code to one or more functions stored in a library of functions to produce second intermediate code, each of the one or more functions comprising statements expressed in the intermediate representation, wherein the one or more functions are previously compiled from source code prior to receiving the database query, wherein the linking includes copying the one or more functions from the library of functions into the first intermediate code to produce the second intermediate code; transforming the second intermediate code to produce transformed intermediate code, said transforming including replacing at least one function call with statements that comprise a function called by the at least one function call to perform the one or more functions without invoking the one or more functions from the library of functions, wherein the programming language is a procedural language, wherein generating the first intermediate code includes compiling the source code to produce the first intermediate code; and generating machine executable code from the transformed intermediate code and executing the machine executable code to produce the query result. 8. The apparatus of claim 7 , wherein the intermediate representation is independent of processor architecture, wherein the machine executable code is specific to a processor architecture.

Assignees

Inventors

Classifications

  • for particular applications; for extensibility, e.g. user defined types · CPC title

  • Compilation · CPC title

  • Embedded query languages · CPC title

  • Optimisation · CPC title

  • G06F8/4443Primary

    Inlining · 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 US11157491B2 cover?
Disclosed embodiments include generating code from a database query and providing a framework to develop complex data structures and the functions that access those data structures outside of the generated code to access the complex data structures. These data structure functions can be precompiled in order to save compilation time at query runtime, and linked to the generated code in a way tha…
Who is the assignee on this patent?
Sap Se
What technology area does this patent fall under?
Primary CPC classification G06F8/4443. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Oct 26 2021 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 2 related publications on this page (citations in our corpus or others sharing the same primary CPC).