The following is a list of potential projects for semester or master-thesis projects in Squid and dbStage. If you have any questions or proposals of your own, don’t hesitate to contact us (Lionel Parreaux and Amir Shaikhha).
Squid intends to be a pragmatic compiler framework that is ready for use by real Scala programmers to design real software based on robust metaprogramming facilities with unprecedented power.
We welcome any work to improve its features and implement new ones. Here are a few possible avenues for research and development:
Optimize/Stage Squid Rewrite Rules
Squid allows users to conveniently define type-safe rewritings in a high-level quasiquote-based sub-language. These rewritings are then used together to automatically transform programs. The efficiency of rewriting is therefore central in the design of various domain-specific compilers and optimizers. We would like to apply the multi-stage programming capabilities of Squid to Squid itself, in order to make these as efficient as possible.
Further Support for Higher-Order Matching
We have already started implemented features inspired by higher-order matching in the quasiquoting capabilities of Squid. However, this could benefit from better algorithmic support, unlocking a new kind of expressiveness for rewrite rules.
Implement a Graph-like IR
Program code can be represented in different ways, with different trade-offs. Fortunately, Squid is reusable, in the sense that it does not impose a particular intermediate representation (IR) underlying the manipulation of code. So far, we have mostly used palin AST and ANF (A-Normal Form) representations. We would also like to see the advantages of a graph-based IR, and how it can unlock more optimization opportunities and allow the generation of more efficient code.
Better Typing of Quasiquotes, and Extensions to
Squid extends Scala’s type system using macros and custom string interpolators (quasiquotes). There are a number of ways in which we know this system can be improved, revamped and generalized.
Enhance the Program Transformation Interface for Users
Squid has advanced support for user-defined program transformation strategies, but the interface could be made more intuitive and more expressive yet. We could also add new and refined transformation capabilities, making some metaprogramming use cases easier.
The dbStage project is still young, so there are lots of opportunities for developing it in novel directions, and for experimenting with new designs.
We also welcome work on adding specific database features to dbStage. The point of dbStage is to be modular so that custom functionalities can be composed easily, while retaining maximal performance, following the abstraction without regret mantra.
Some examples of possible projects for dbStage are:
- design new query optimization algorithms
- support more advanced data representations, such as mixed row/column store, and external indexes
- implement support for JVM off-heap memory allocation to store data in a more compact way
- generation of efficient C code from optimized database query code in Scala
- design a customizable storage manager, and cache-aware algorithms
- add support transaction processing