Footnote:
Diese Datenquelle enthält auch Bestandsnachweise, die nicht zu einem Volltext führen.
Description:
Generating platform-specific machine code for query compilation is commonly applied in database management systems in two stages: First, the query compiler optimizes a given query plan on the relational level, then it hands it off to a general-purpose compiler that generates optimized machine code. In such a compilation stack, many optimizations such as dead code elimination are implemented twice: both in the query compiler and in the general-purpose compiler. While a unified tool would be desirable, the necessary interoperation requires shared abstractions whose design space is not well-explored due to their high implementation overhead. In this thesis, we study the design space for such abstractions by building a four-level compilation stack that represents a broad spectrum of design choices. For that purpose, we use xDSL, a Python-embedded compiler framework enabling quick prototyping of general-purpose and domain-specific compilers. Our work shows that xDSLis expressive enough to model and optimize relational abstractions, effectively resulting in a single tool for both general-purpose and query compilation. We also perform a runtime comparison showing that our four-level prototype achieves a 3x speedup over DuckDB in single-threaded execution. Finally, we derive four design principles and an optimized architecture based on a detailed description and discussion of the four-level compilation stack. We expect these four design principles to facilitate designing xDSL-style abstractions in the future, for the database domain and others.